Added. Added. Added. Added. Added. Added. Added. Added. Added. Added.
[platform/upstream/glib.git] / gio / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 SUBDIRS=
6
7 if OS_UNIX
8 SUBDIRS += xdgmime
9 endif
10
11 if MS_LIB_AVAILABLE
12 noinst_DATA = gio-2.0.lib
13
14 install-ms-lib:
15         $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
16
17 uninstall-ms-lib:
18         -rm $(DESTDIR)$(libdir)/gio-2.0.lib
19 else
20 install-ms-lib:
21 uninstall-ms-lib:
22 endif
23
24 gio.def: gio.symbols
25         (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > gio.def.tmp && \
26           mv gio.def.tmp gio.def
27
28 gioalias.h: gio.symbols
29         $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h.tmp && \
30           mv gioalias.h.tmp gioalias.h
31
32 gioaliasdef.c: gio.symbols
33         $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c.tmp && \
34           mv gioaliasdef.c.tmp gioaliasdef.c
35
36 if OS_LINUX
37 if HAVE_GNUC_VISIBILITY
38 TESTS = abicheck.sh pltcheck.sh
39 endif
40 endif
41
42 AM_CPPFLAGS = \
43         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
44         -I$(top_builddir)                               \
45         -I$(top_srcdir)                                 \
46         -I$(top_srcdir)/glib                            \
47         -I$(top_srcdir)/gmodule                         \
48         $(GLIB_DEBUG_FLAGS)                             \
49         -DG_DISABLE_DEPRECATED                          \
50         -DGIO_COMPILATION                               \
51         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
52
53 lib_LTLIBRARIES = libgio-2.0.la
54
55 marshal_sources = \
56         gio-marshal.h   \
57         gio-marshal.c   \
58         $(NULL)
59
60 if CROSS_COMPILING
61   glib_genmarshal=$(GLIB_GENMARSHAL)
62 else
63   glib_genmarshal=../gobject/glib-genmarshal
64 endif
65
66 gio-marshal.h: gio-marshal.list
67         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
68           mv $@.tmp $@
69
70 gio-marshal.c: gio-marshal.h gio-marshal.list
71         (echo "#include \"gio-marshal.h\""; \
72         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
73           mv $@.tmp $@
74
75 local_sources = \
76         glocaldirectorymonitor.c        \
77         glocaldirectorymonitor.h        \
78         glocalfile.c                    \
79         glocalfile.h                    \
80         glocalfileenumerator.c          \
81         glocalfileenumerator.h          \
82         glocalfileinfo.c                \
83         glocalfileinfo.h                \
84         glocalfileinputstream.c         \
85         glocalfileinputstream.h         \
86         glocalfilemonitor.c             \
87         glocalfilemonitor.h             \
88         glocalfileoutputstream.c        \
89         glocalfileoutputstream.h        \
90         glocalvfs.c                     \
91         glocalvfs.h                     \
92         $(NULL)
93
94 platform_libadd =
95 appinfo_sources =
96
97 if HAVE_INOTIFY
98 SUBDIRS += inotify
99 platform_libadd += inotify/libinotify.la
100 endif
101
102 if HAVE_FEN
103 AM_CPPFLAGS += -DHAVE_FEN
104 SUBDIRS += fen
105 platform_libadd += fen/libfen.la
106 endif
107
108 if OS_WIN32
109 SUBDIRS += win32
110 platform_libadd += win32/libgiowin32.la
111 endif
112
113
114 SUBDIRS += .
115
116 if HAVE_FAM
117 SUBDIRS += fam
118 endif
119
120 if OS_UNIX
121 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
122 platform_libadd += xdgmime/libxdgmime.la
123 unix_sources = \
124         gunixmount.c            \
125         gunixmount.h            \
126         gunixmounts.c           \
127         gunixmounts.h           \
128         gunixvolume.c           \
129         gunixvolume.h           \
130         gunixvolumemonitor.c    \
131         gunixvolumemonitor.h    \
132         gunixinputstream.c      \
133         gunixoutputstream.c     \
134         $(NULL)
135
136
137 giounixincludedir=$(includedir)/gio-unix-2.0/gio
138 giounixinclude_HEADERS = \
139         gdesktopappinfo.h       \
140         gunixmounts.h           \
141         gunixinputstream.h      \
142         gunixoutputstream.h     \
143         $(NULL)
144 endif
145
146 if OS_WIN32
147 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
148 platform_libadd += -lshlwapi
149 endif
150
151 SUBDIRS += tests
152
153 libgio_2_0_la_SOURCES =         \
154         gappinfo.c              \
155         gasynchelper.c          \
156         gasynchelper.h          \
157         gasyncresult.c          \
158         gbufferedinputstream.c  \
159         gbufferedoutputstream.c \
160         gcancellable.c          \
161         gcontenttype.c          \
162         gcontenttypeprivate.h   \
163         gdatainputstream.c      \
164         gdataoutputstream.c     \
165         gdrive.c                \
166         gdummyfile.h            \
167         gdummyfile.c            \
168         gfile.c                 \
169         gfileattribute.c        \
170         gfileattribute-priv.h   \
171         gfileenumerator.c       \
172         gfileicon.c             \
173         gfileinfo.c             \
174         gfileinputstream.c      \
175         gfilemonitor.c          \
176         gfilenamecompleter.c    \
177         gfileoutputstream.c     \
178         gfilterinputstream.c    \
179         gfilteroutputstream.c   \
180         gicon.c                 \
181         ginputstream.c          \
182         gioerror.c              \
183         giomodule.c             \
184         giomodule-priv.h        \
185         gioscheduler.c          \
186         gloadableicon.c         \
187         gmount.c                \
188         gmemoryinputstream.c    \
189         gmemoryoutputstream.c   \
190         gmountoperation.c       \
191         gnativevolumemonitor.c  \
192         gnativevolumemonitor.h  \
193         goutputstream.c         \
194         gpollfilemonitor.c      \
195         gpollfilemonitor.h      \
196         gseekable.c             \
197         gsimpleasyncresult.c    \
198         gthemedicon.c           \
199         gunionvolumemonitor.c   \
200         gunionvolumemonitor.h   \
201         gvfs.c                  \
202         gvolume.c               \
203         gvolumemonitor.c        \
204         gmountprivate.h         \
205         gioenumtypes.h          \
206         gioenumtypes.c          \
207         gioalias.h              \
208         gioaliasdef.c           \
209         $(appinfo_sources)      \
210         $(unix_sources)         \
211         $(local_sources)        \
212         $(marshal_sources)      \
213         $(NULL)
214
215 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
216
217 libgio_2_0_la_LIBADD = \
218         $(top_builddir)/glib/libglib-2.0.la             \
219         $(top_builddir)/gobject/libgobject-2.0.la       \
220         $(top_builddir)/gmodule/libgmodule-2.0.la       \
221         $(platform_libadd)                              \
222         $(SELINUX_LIBS)                                 \
223         $(GLIB_LIBS)                                    \
224         $(XATTR_LIBS)                                   \
225         $(NULL)
226
227 if PLATFORM_WIN32
228 no_undefined = -no-undefined
229 endif
230
231 if OS_WIN32
232 export_symbols = -export-symbols gio.def
233
234 install-def-file:
235         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
236
237 uninstall-def-file:
238         -rm $(DESTDIR)$(libdir)/gio-2.0.def
239 else
240 install-def-file:
241 uninstall-def-file:
242
243 export_symbols = -export-symbols-regex '^g_.*'
244 endif
245
246 install-data-local: install-ms-lib install-def-file
247
248 uninstall-local: uninstall-ms-lib uninstall-def-file
249
250 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) $(export_symbols)
251
252 gio_headers =                   \
253         gappinfo.h              \
254         gasyncresult.h          \
255         gbufferedinputstream.h  \
256         gbufferedoutputstream.h \
257         gcancellable.h          \
258         gcontenttype.h          \
259         gdatainputstream.h      \
260         gdataoutputstream.h     \
261         gdrive.h                \
262         gfile.h                 \
263         gfileattribute.h        \
264         gfileenumerator.h       \
265         gfileicon.h             \
266         gfileinfo.h             \
267         gfileinputstream.h      \
268         gfilemonitor.h          \
269         gfilenamecompleter.h    \
270         gfileoutputstream.h     \
271         gfilterinputstream.h    \
272         gfilteroutputstream.h   \
273         gicon.h                 \
274         ginputstream.h          \
275         gio.h                   \
276         gioenumtypes.h          \
277         gioerror.h              \
278         giomodule.h             \
279         gioscheduler.h          \
280         gloadableicon.h         \
281         gmount.h                \
282         gmemoryinputstream.h    \
283         gmemoryoutputstream.h   \
284         gmountoperation.h       \
285         gnativevolumemonitor.h  \
286         goutputstream.h         \
287         gseekable.h             \
288         gsimpleasyncresult.h    \
289         gthemedicon.h           \
290         gvfs.h                  \
291         gvolume.h               \
292         gvolumemonitor.h        \
293         $(NULL)
294
295 gioincludedir=$(includedir)/glib-2.0/gio/
296 gioinclude_HEADERS =            \
297         $(gio_headers)          \
298         gioenumtypes.h
299
300 # these sources (also mentioned above) are generated.
301 BUILT_SOURCES =                 \
302         gio-marshal.h           \
303         gio-marshal.c           \
304         gioalias.h              \
305         gioaliasdef.c           \
306         gioenumtypes.h          \
307         gioenumtypes.c          \
308         $(NULL)
309
310 EXTRA_DIST +=                   \
311         gio-marshal.list        \
312         gio.symbols             \
313         gioenumtypes.h.template \
314         gioenumtypes.c.template \
315         makegioalias.pl         \
316         abicheck.sh             \
317         pltcheck.sh             \
318         $(NULL)
319
320 CLEANFILES =                    \
321         $(marshal_sources)      \
322         $(NULL)
323
324 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
325         ( top_builddir=`cd $(top_builddir) && pwd`; \
326           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
327             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
328
329 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
330         ( top_builddir=`cd $(top_builddir) && pwd`; \
331           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
332             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
333
334 gio-2.0.lib: libgio-2.0.la gio.def
335         lib -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@