Add GConverterInputStream
[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         gcharsetconverter.c     \
191         gconverter.c            \
192         gconverterinputstream.c \
193         gdatainputstream.c      \
194         gdataoutputstream.c     \
195         gdrive.c                \
196         gdummyfile.h            \
197         gdummyfile.c            \
198         gemblem.h               \
199         gemblem.c               \
200         gemblemedicon.h         \
201         gemblemedicon.c         \
202         gfile.c                 \
203         gfileattribute.c        \
204         gfileattribute-priv.h   \
205         gfileenumerator.c       \
206         gfileicon.c             \
207         gfileinfo.c             \
208         gfileinfo-priv.h        \
209         gfileinputstream.c      \
210         gfilemonitor.c          \
211         gfilenamecompleter.c    \
212         gfileoutputstream.c     \
213         gfileiostream.c         \
214         gfilterinputstream.c    \
215         gfilteroutputstream.c   \
216         gicon.c                 \
217         ginetaddress.c          \
218         ginetsocketaddress.c    \
219         ginitable.c             \
220         ginputstream.c          \
221         gioenums.h              \
222         gioerror.c              \
223         giomodule.c             \
224         giomodule-priv.h        \
225         gioscheduler.c          \
226         giostream.c             \
227         gloadableicon.c         \
228         gmount.c                \
229         gmemoryinputstream.c    \
230         gmemoryoutputstream.c   \
231         gmountoperation.c       \
232         gnativevolumemonitor.c  \
233         gnativevolumemonitor.h  \
234         gnetworkaddress.c       \
235         gnetworkingprivate.h    \
236         gnetworkservice.c       \
237         goutputstream.c         \
238         gpollfilemonitor.c      \
239         gpollfilemonitor.h      \
240         gresolver.c             \
241         gseekable.c             \
242         gsimpleasyncresult.c    \
243         gsocket.c               \
244         gsocketaddress.c        \
245         gsocketaddressenumerator.c \
246         gsocketclient.c         \
247         gsocketconnectable.c    \
248         gsocketconnection.c     \
249         gsocketcontrolmessage.c \
250         gsocketinputstream.c    \
251         gsocketinputstream.h    \
252         gsocketlistener.c       \
253         gsocketoutputstream.c   \
254         gsocketoutputstream.h   \
255         gsocketservice.c        \
256         gsrvtarget.c            \
257         gtcpconnection.c        \
258         gthreadedsocketservice.c\
259         gthemedicon.c           \
260         gthreadedresolver.c     \
261         gthreadedresolver.h     \
262         gunionvolumemonitor.c   \
263         gunionvolumemonitor.h   \
264         gvfs.c                  \
265         gvolume.c               \
266         gvolumemonitor.c        \
267         gmountprivate.h         \
268         gioenumtypes.h          \
269         gioenumtypes.c          \
270         gioalias.h              \
271         gioaliasdef.c           \
272         $(appinfo_sources)      \
273         $(unix_sources)         \
274         $(win32_sources)        \
275         $(local_sources)        \
276         $(marshal_sources)      \
277         $(NULL)
278
279 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
280
281 libgio_2_0_la_LIBADD = \
282         $(top_builddir)/glib/libglib-2.0.la             \
283         $(top_builddir)/gobject/libgobject-2.0.la       \
284         $(top_builddir)/gmodule/libgmodule-2.0.la       \
285         $(platform_libadd)                              \
286         $(SELINUX_LIBS)                                 \
287         $(GLIB_LIBS)                                    \
288         $(XATTR_LIBS)                                   \
289         $(NULL)
290
291 if PLATFORM_WIN32
292 no_undefined = -no-undefined
293 endif
294
295 if OS_WIN32_AND_DLL_COMPILATION
296 export_symbols = -export-symbols gio.def
297 gio_def = gio.def
298
299 install-def-file:
300         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
301
302 uninstall-def-file:
303         -rm $(DESTDIR)$(libdir)/gio-2.0.def
304 else
305 install-def-file:
306 uninstall-def-file:
307
308 export_symbols = -export-symbols-regex '^g_.*'
309 endif
310
311 install-data-local: install-ms-lib install-def-file
312         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
313
314 uninstall-local: uninstall-ms-lib uninstall-def-file
315
316 libgio_2_0_la_LDFLAGS = \
317         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
318         -export-dynamic $(no_undefined) $(export_symbols)
319
320 libgio_2_0_la_DEPENDENCIES = $(gio_def) $(platform_deps)
321
322 gio_headers =                   \
323         gappinfo.h              \
324         gasyncinitable.h        \
325         gasyncresult.h          \
326         gbufferedinputstream.h  \
327         gbufferedoutputstream.h \
328         gcancellable.h          \
329         gcontenttype.h          \
330         gcharsetconverter.h     \
331         gconverter.h            \
332         gconverterinputstream.h \
333         gdatainputstream.h      \
334         gdataoutputstream.h     \
335         gdrive.h                \
336         gemblem.h               \
337         gemblemedicon.h         \
338         gfile.h                 \
339         gfileattribute.h        \
340         gfileenumerator.h       \
341         gfileicon.h             \
342         gfileinfo.h             \
343         gfileinputstream.h      \
344         gfilemonitor.h          \
345         gfilenamecompleter.h    \
346         gfileoutputstream.h     \
347         gfileiostream.h         \
348         gfilterinputstream.h    \
349         gfilteroutputstream.h   \
350         gicon.h                 \
351         ginetaddress.h          \
352         ginetsocketaddress.h    \
353         ginputstream.h          \
354         ginitable.h             \
355         gio.h                   \
356         giotypes.h              \
357         gioenums.h              \
358         gioerror.h              \
359         giomodule.h             \
360         gioscheduler.h          \
361         giostream.h             \
362         gloadableicon.h         \
363         gmount.h                \
364         gmemoryinputstream.h    \
365         gmemoryoutputstream.h   \
366         gmountoperation.h       \
367         gnativevolumemonitor.h  \
368         gnetworkaddress.h       \
369         gnetworkservice.h       \
370         goutputstream.h         \
371         gresolver.h             \
372         gseekable.h             \
373         gsimpleasyncresult.h    \
374         gsocket.h               \
375         gsocketaddress.h        \
376         gsocketaddressenumerator.h \
377         gsocketclient.h         \
378         gsocketconnectable.h    \
379         gsocketconnection.h     \
380         gsocketcontrolmessage.h \
381         gsocketlistener.h       \
382         gsocketservice.h        \
383         gsrvtarget.h            \
384         gtcpconnection.h        \
385         gthreadedsocketservice.h\
386         gthemedicon.h           \
387         gvfs.h                  \
388         gvolume.h               \
389         gvolumemonitor.h        \
390         $(NULL)
391
392 gioincludedir=$(includedir)/glib-2.0/gio/
393 gioinclude_HEADERS =            \
394         $(gio_headers)          \
395         gioenumtypes.h
396
397 # these sources (also mentioned above) are generated.
398 BUILT_SOURCES =                 \
399         gio-marshal.h           \
400         gio-marshal.c           \
401         gioalias.h              \
402         gioaliasdef.c           \
403         gioenumtypes.h          \
404         gioenumtypes.c          \
405         $(NULL)
406
407 EXTRA_DIST +=                   \
408         gio-marshal.list        \
409         gio.symbols             \
410         gioenumtypes.h.template \
411         gioenumtypes.c.template \
412         makefile.msc            \
413         makegioalias.pl         \
414         abicheck.sh             \
415         pltcheck.sh             \
416         $(NULL)
417
418 CLEANFILES =                    \
419         $(marshal_sources)      \
420         $(NULL)
421
422 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
423         ( top_builddir=`cd $(top_builddir) && pwd`; \
424           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
425             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
426
427 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
428         ( top_builddir=`cd $(top_builddir) && pwd`; \
429           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
430             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
431
432 gio-2.0.lib: libgio-2.0.la gio.def
433         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
434
435 if HAVE_GLIB_RUNTIME_LIBDIR
436 install-data-hook:
437         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
438         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
439         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
440         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
441         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
442 endif