Add GConverter interface
[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         glocalfileiostream.c            \
93         glocalfileiostream.h            \
94         glocalvfs.c                     \
95         glocalvfs.h                     \
96         $(NULL)
97
98 platform_libadd =
99 platform_deps =
100 appinfo_sources =
101
102 if HAVE_INOTIFY
103 SUBDIRS += inotify
104 platform_libadd += inotify/libinotify.la
105 platform_deps += inotify/libinotify.la
106 endif
107
108 if HAVE_FEN
109 AM_CPPFLAGS += -DHAVE_FEN
110 SUBDIRS += fen
111 platform_libadd += fen/libfen.la
112 platform_deps += fen/libfen.la
113 endif
114
115 if OS_WIN32
116 SUBDIRS += win32
117 platform_libadd += win32/libgiowin32.la
118 platform_deps += win32/libgiowin32.la
119 endif
120
121
122 SUBDIRS += .
123
124 if HAVE_FAM
125 SUBDIRS += fam
126 endif
127
128 if OS_UNIX
129 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
130 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
131 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
132 unix_sources = \
133         gunixconnection.c       \
134         gunixfdmessage.c        \
135         gunixmount.c            \
136         gunixmount.h            \
137         gunixmounts.c           \
138         gunixmounts.h           \
139         gunixresolver.c         \
140         gunixresolver.h         \
141         gunixsocketaddress.c    \
142         gunixvolume.c           \
143         gunixvolume.h           \
144         gunixvolumemonitor.c    \
145         gunixvolumemonitor.h    \
146         gunixinputstream.c      \
147         gunixoutputstream.c     \
148         $(NULL)
149
150
151 giounixincludedir=$(includedir)/gio-unix-2.0/gio
152 giounixinclude_HEADERS = \
153         gdesktopappinfo.h       \
154         gunixconnection.h       \
155         gunixmounts.h           \
156         gunixfdmessage.h        \
157         gunixinputstream.h      \
158         gunixoutputstream.h     \
159         gunixsocketaddress.h    \
160         $(NULL)
161 endif
162
163 if OS_WIN32
164 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
165 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
166 win32_sources = \
167         gwin32mount.c \
168         gwin32mount.h \
169         gwin32resolver.c \
170         gwin32resolver.h \
171         gwin32volumemonitor.c \
172         gwin32volumemonitor.h \
173         $(NULL)
174
175 endif
176
177 SUBDIRS += tests
178
179 libgio_2_0_la_SOURCES =         \
180         gappinfo.c              \
181         gasynchelper.c          \
182         gasynchelper.h          \
183         gasyncinitable.c        \
184         gasyncresult.c          \
185         gbufferedinputstream.c  \
186         gbufferedoutputstream.c \
187         gcancellable.c          \
188         gcontenttype.c          \
189         gcontenttypeprivate.h   \
190         gconverter.c            \
191         gdatainputstream.c      \
192         gdataoutputstream.c     \
193         gdrive.c                \
194         gdummyfile.h            \
195         gdummyfile.c            \
196         gemblem.h               \
197         gemblem.c               \
198         gemblemedicon.h         \
199         gemblemedicon.c         \
200         gfile.c                 \
201         gfileattribute.c        \
202         gfileattribute-priv.h   \
203         gfileenumerator.c       \
204         gfileicon.c             \
205         gfileinfo.c             \
206         gfileinfo-priv.h        \
207         gfileinputstream.c      \
208         gfilemonitor.c          \
209         gfilenamecompleter.c    \
210         gfileoutputstream.c     \
211         gfileiostream.c         \
212         gfilterinputstream.c    \
213         gfilteroutputstream.c   \
214         gicon.c                 \
215         ginetaddress.c          \
216         ginetsocketaddress.c    \
217         ginitable.c             \
218         ginputstream.c          \
219         gioenums.h              \
220         gioerror.c              \
221         giomodule.c             \
222         giomodule-priv.h        \
223         gioscheduler.c          \
224         giostream.c             \
225         gloadableicon.c         \
226         gmount.c                \
227         gmemoryinputstream.c    \
228         gmemoryoutputstream.c   \
229         gmountoperation.c       \
230         gnativevolumemonitor.c  \
231         gnativevolumemonitor.h  \
232         gnetworkaddress.c       \
233         gnetworkingprivate.h    \
234         gnetworkservice.c       \
235         goutputstream.c         \
236         gpollfilemonitor.c      \
237         gpollfilemonitor.h      \
238         gresolver.c             \
239         gseekable.c             \
240         gsimpleasyncresult.c    \
241         gsocket.c               \
242         gsocketaddress.c        \
243         gsocketaddressenumerator.c \
244         gsocketclient.c         \
245         gsocketconnectable.c    \
246         gsocketconnection.c     \
247         gsocketcontrolmessage.c \
248         gsocketinputstream.c    \
249         gsocketinputstream.h    \
250         gsocketlistener.c       \
251         gsocketoutputstream.c   \
252         gsocketoutputstream.h   \
253         gsocketservice.c        \
254         gsrvtarget.c            \
255         gtcpconnection.c        \
256         gthreadedsocketservice.c\
257         gthemedicon.c           \
258         gthreadedresolver.c     \
259         gthreadedresolver.h     \
260         gunionvolumemonitor.c   \
261         gunionvolumemonitor.h   \
262         gvfs.c                  \
263         gvolume.c               \
264         gvolumemonitor.c        \
265         gmountprivate.h         \
266         gioenumtypes.h          \
267         gioenumtypes.c          \
268         gioalias.h              \
269         gioaliasdef.c           \
270         $(appinfo_sources)      \
271         $(unix_sources)         \
272         $(win32_sources)        \
273         $(local_sources)        \
274         $(marshal_sources)      \
275         $(NULL)
276
277 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
278
279 libgio_2_0_la_LIBADD = \
280         $(top_builddir)/glib/libglib-2.0.la             \
281         $(top_builddir)/gobject/libgobject-2.0.la       \
282         $(top_builddir)/gmodule/libgmodule-2.0.la       \
283         $(platform_libadd)                              \
284         $(SELINUX_LIBS)                                 \
285         $(GLIB_LIBS)                                    \
286         $(XATTR_LIBS)                                   \
287         $(NULL)
288
289 if PLATFORM_WIN32
290 no_undefined = -no-undefined
291 endif
292
293 if OS_WIN32_AND_DLL_COMPILATION
294 export_symbols = -export-symbols gio.def
295 gio_def = gio.def
296
297 install-def-file:
298         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
299
300 uninstall-def-file:
301         -rm $(DESTDIR)$(libdir)/gio-2.0.def
302 else
303 install-def-file:
304 uninstall-def-file:
305
306 export_symbols = -export-symbols-regex '^g_.*'
307 endif
308
309 install-data-local: install-ms-lib install-def-file
310         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
311
312 uninstall-local: uninstall-ms-lib uninstall-def-file
313
314 libgio_2_0_la_LDFLAGS = \
315         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
316         -export-dynamic $(no_undefined) $(export_symbols)
317
318 libgio_2_0_la_DEPENDENCIES = $(gio_def) $(platform_deps)
319
320 gio_headers =                   \
321         gappinfo.h              \
322         gasyncinitable.h        \
323         gasyncresult.h          \
324         gbufferedinputstream.h  \
325         gbufferedoutputstream.h \
326         gcancellable.h          \
327         gcontenttype.h          \
328         gconverter.h            \
329         gdatainputstream.h      \
330         gdataoutputstream.h     \
331         gdrive.h                \
332         gemblem.h               \
333         gemblemedicon.h         \
334         gfile.h                 \
335         gfileattribute.h        \
336         gfileenumerator.h       \
337         gfileicon.h             \
338         gfileinfo.h             \
339         gfileinputstream.h      \
340         gfilemonitor.h          \
341         gfilenamecompleter.h    \
342         gfileoutputstream.h     \
343         gfileiostream.h         \
344         gfilterinputstream.h    \
345         gfilteroutputstream.h   \
346         gicon.h                 \
347         ginetaddress.h          \
348         ginetsocketaddress.h    \
349         ginputstream.h          \
350         ginitable.h             \
351         gio.h                   \
352         giotypes.h              \
353         gioenums.h              \
354         gioerror.h              \
355         giomodule.h             \
356         gioscheduler.h          \
357         giostream.h             \
358         gloadableicon.h         \
359         gmount.h                \
360         gmemoryinputstream.h    \
361         gmemoryoutputstream.h   \
362         gmountoperation.h       \
363         gnativevolumemonitor.h  \
364         gnetworkaddress.h       \
365         gnetworkservice.h       \
366         goutputstream.h         \
367         gresolver.h             \
368         gseekable.h             \
369         gsimpleasyncresult.h    \
370         gsocket.h               \
371         gsocketaddress.h        \
372         gsocketaddressenumerator.h \
373         gsocketclient.h         \
374         gsocketconnectable.h    \
375         gsocketconnection.h     \
376         gsocketcontrolmessage.h \
377         gsocketlistener.h       \
378         gsocketservice.h        \
379         gsrvtarget.h            \
380         gtcpconnection.h        \
381         gthreadedsocketservice.h\
382         gthemedicon.h           \
383         gvfs.h                  \
384         gvolume.h               \
385         gvolumemonitor.h        \
386         $(NULL)
387
388 gioincludedir=$(includedir)/glib-2.0/gio/
389 gioinclude_HEADERS =            \
390         $(gio_headers)          \
391         gioenumtypes.h
392
393 # these sources (also mentioned above) are generated.
394 BUILT_SOURCES =                 \
395         gio-marshal.h           \
396         gio-marshal.c           \
397         gioalias.h              \
398         gioaliasdef.c           \
399         gioenumtypes.h          \
400         gioenumtypes.c          \
401         $(NULL)
402
403 EXTRA_DIST +=                   \
404         gio-marshal.list        \
405         gio.symbols             \
406         gioenumtypes.h.template \
407         gioenumtypes.c.template \
408         makefile.msc            \
409         makegioalias.pl         \
410         abicheck.sh             \
411         pltcheck.sh             \
412         $(NULL)
413
414 CLEANFILES =                    \
415         $(marshal_sources)      \
416         $(NULL)
417
418 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
419         ( top_builddir=`cd $(top_builddir) && pwd`; \
420           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
421             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
422
423 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
424         ( top_builddir=`cd $(top_builddir) && pwd`; \
425           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
426             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
427
428 gio-2.0.lib: libgio-2.0.la gio.def
429         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
430
431 if HAVE_GLIB_RUNTIME_LIBDIR
432 install-data-hook:
433         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
434         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
435         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
436         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
437         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
438 endif