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