Remove GUtf8InputStream for now
[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 if HAVE_THREADS
45 THREAD_FLAGS=-DG_THREADS_MANDATORY
46 endif
47
48 AM_CPPFLAGS = \
49         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
50         -I$(top_builddir)                               \
51         -I$(top_srcdir)                                 \
52         -I$(top_srcdir)/glib                            \
53         -I$(top_srcdir)/gmodule                         \
54         $(GLIB_DEBUG_FLAGS)                             \
55         $(THREAD_FLAGS)                                 \
56         -DG_DISABLE_DEPRECATED                          \
57         -DGIO_COMPILATION                               \
58         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
59
60 lib_LTLIBRARIES = libgio-2.0.la
61
62 marshal_sources = \
63         gio-marshal.h   \
64         gio-marshal.c   \
65         $(NULL)
66
67 if CROSS_COMPILING
68   glib_genmarshal=$(GLIB_GENMARSHAL)
69 else
70   glib_genmarshal=../gobject/glib-genmarshal
71 endif
72
73 gio-marshal.h: gio-marshal.list
74         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
75           mv $@.tmp $@
76
77 gio-marshal.c: gio-marshal.h gio-marshal.list
78         (echo "#include \"gio-marshal.h\""; \
79         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
80           mv $@.tmp $@
81
82 local_sources = \
83         glocaldirectorymonitor.c        \
84         glocaldirectorymonitor.h        \
85         glocalfile.c                    \
86         glocalfile.h                    \
87         glocalfileenumerator.c          \
88         glocalfileenumerator.h          \
89         glocalfileinfo.c                \
90         glocalfileinfo.h                \
91         glocalfileinputstream.c         \
92         glocalfileinputstream.h         \
93         glocalfilemonitor.c             \
94         glocalfilemonitor.h             \
95         glocalfileoutputstream.c        \
96         glocalfileoutputstream.h        \
97         glocalfileiostream.c            \
98         glocalfileiostream.h            \
99         glocalvfs.c                     \
100         glocalvfs.h                     \
101         $(NULL)
102
103 platform_libadd =
104 platform_deps =
105 appinfo_sources =
106
107 if HAVE_INOTIFY
108 SUBDIRS += inotify
109 platform_libadd += inotify/libinotify.la
110 platform_deps += inotify/libinotify.la
111 endif
112
113 if HAVE_FEN
114 AM_CPPFLAGS += -DHAVE_FEN
115 SUBDIRS += fen
116 platform_libadd += fen/libfen.la
117 platform_deps += fen/libfen.la
118 endif
119
120 if OS_WIN32
121 SUBDIRS += win32
122 platform_libadd += win32/libgiowin32.la
123 platform_deps += win32/libgiowin32.la
124 endif
125
126
127 SUBDIRS += .
128
129 if HAVE_FAM
130 SUBDIRS += fam
131 endif
132
133 if OS_UNIX
134 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
135 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
136 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
137 unix_sources = \
138         gunixconnection.c       \
139         gunixfdlist.c           \
140         gunixfdmessage.c        \
141         gunixmount.c            \
142         gunixmount.h            \
143         gunixmounts.c           \
144         gunixmounts.h           \
145         gunixresolver.c         \
146         gunixresolver.h         \
147         gunixsocketaddress.c    \
148         gunixvolume.c           \
149         gunixvolume.h           \
150         gunixvolumemonitor.c    \
151         gunixvolumemonitor.h    \
152         gunixinputstream.c      \
153         gunixoutputstream.c     \
154         $(NULL)
155
156
157 giounixincludedir=$(includedir)/gio-unix-2.0/gio
158 giounixinclude_HEADERS = \
159         gdesktopappinfo.h       \
160         gfiledescriptorbased.h  \
161         gunixconnection.h       \
162         gunixmounts.h           \
163         gunixfdlist.h           \
164         gunixfdmessage.h        \
165         gunixinputstream.h      \
166         gunixoutputstream.h     \
167         gunixsocketaddress.h    \
168         $(NULL)
169 endif
170
171 if OS_WIN32
172 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
173 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
174 win32_sources = \
175         gwin32mount.c \
176         gwin32mount.h \
177         gwin32resolver.c \
178         gwin32resolver.h \
179         gwin32volumemonitor.c \
180         gwin32volumemonitor.h \
181         $(NULL)
182
183 endif
184
185 SUBDIRS += tests
186
187 libgio_2_0_la_SOURCES =         \
188         gappinfo.c              \
189         gasynchelper.c          \
190         gasynchelper.h          \
191         gasyncinitable.c        \
192         gasyncresult.c          \
193         gbufferedinputstream.c  \
194         gbufferedoutputstream.c \
195         gcancellable.c          \
196         gcontenttype.c          \
197         gcontenttypeprivate.h   \
198         gcharsetconverter.c     \
199         gconverter.c            \
200         gconverterinputstream.c \
201         gconverteroutputstream.c        \
202         gdatainputstream.c      \
203         gdataoutputstream.c     \
204         gdrive.c                \
205         gdummyfile.h            \
206         gdummyfile.c            \
207         gemblem.h               \
208         gemblem.c               \
209         gemblemedicon.h         \
210         gemblemedicon.c         \
211         gfile.c                 \
212         gfileattribute.c        \
213         gfileattribute-priv.h   \
214         gfiledescriptorbased.h  \
215         gfiledescriptorbased.c  \
216         gfileenumerator.c       \
217         gfileicon.c             \
218         gfileinfo.c             \
219         gfileinfo-priv.h        \
220         gfileinputstream.c      \
221         gfilemonitor.c          \
222         gfilenamecompleter.c    \
223         gfileoutputstream.c     \
224         gfileiostream.c         \
225         gfilterinputstream.c    \
226         gfilteroutputstream.c   \
227         gicon.c                 \
228         ginetaddress.c          \
229         ginetsocketaddress.c    \
230         ginitable.c             \
231         ginputstream.c          \
232         gioenums.h              \
233         gioerror.c              \
234         giomodule.c             \
235         giomodule-priv.h        \
236         gioscheduler.c          \
237         giostream.c             \
238         gloadableicon.c         \
239         gmount.c                \
240         gmemoryinputstream.c    \
241         gmemoryoutputstream.c   \
242         gmountoperation.c       \
243         gnativevolumemonitor.c  \
244         gnativevolumemonitor.h  \
245         gnetworkaddress.c       \
246         gnetworkingprivate.h    \
247         gnetworkservice.c       \
248         goutputstream.c         \
249         gpollfilemonitor.c      \
250         gpollfilemonitor.h      \
251         gresolver.c             \
252         gseekable.c             \
253         gsimpleasyncresult.c    \
254         gsocket.c               \
255         gsocketaddress.c        \
256         gsocketaddressenumerator.c \
257         gsocketclient.c         \
258         gsocketconnectable.c    \
259         gsocketconnection.c     \
260         gsocketcontrolmessage.c \
261         gsocketinputstream.c    \
262         gsocketinputstream.h    \
263         gsocketlistener.c       \
264         gsocketoutputstream.c   \
265         gsocketoutputstream.h   \
266         gsocketservice.c        \
267         gsrvtarget.c            \
268         gtcpconnection.c        \
269         gthreadedsocketservice.c\
270         gthemedicon.c           \
271         gthreadedresolver.c     \
272         gthreadedresolver.h     \
273         gunionvolumemonitor.c   \
274         gunionvolumemonitor.h   \
275         gvfs.c                  \
276         gvolume.c               \
277         gvolumemonitor.c        \
278         gzlibcompressor.c       \
279         gzlibdecompressor.c     \
280         gmountprivate.h         \
281         gioenumtypes.h          \
282         gioenumtypes.c          \
283         gioalias.h              \
284         gioaliasdef.c           \
285         $(appinfo_sources)      \
286         $(unix_sources)         \
287         $(win32_sources)        \
288         $(local_sources)        \
289         $(marshal_sources)      \
290         $(NULL)
291
292 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
293
294 libgio_2_0_la_LIBADD = \
295         $(top_builddir)/glib/libglib-2.0.la             \
296         $(top_builddir)/gobject/libgobject-2.0.la       \
297         $(top_builddir)/gmodule/libgmodule-2.0.la       \
298         $(platform_libadd)                              \
299         $(ZLIB_LIBS)                                    \
300         $(SELINUX_LIBS)                                 \
301         $(GLIB_LIBS)                                    \
302         $(XATTR_LIBS)                                   \
303         $(NULL)
304
305 if PLATFORM_WIN32
306 no_undefined = -no-undefined
307 endif
308
309 if OS_WIN32_AND_DLL_COMPILATION
310 export_symbols = -export-symbols gio.def
311 gio_def = gio.def
312
313 gio_win32_res = gio-win32-res.o
314 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
315
316 install-def-file:
317         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
318
319 uninstall-def-file:
320         -rm $(DESTDIR)$(libdir)/gio-2.0.def
321 else
322 install-def-file:
323 uninstall-def-file:
324
325 export_symbols = -export-symbols-regex '^g_.*'
326 endif
327
328 install-data-local: install-ms-lib install-def-file
329         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
330
331 uninstall-local: uninstall-ms-lib uninstall-def-file
332
333 libgio_2_0_la_LDFLAGS = \
334         $(gio_win32_res_ldflag) \
335         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
336         -export-dynamic $(no_undefined) $(export_symbols)
337
338 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
339
340 gio-win32-res.o: gio.rc
341         $(WINDRES) gio.rc $@
342
343 gio_headers =                   \
344         gappinfo.h              \
345         gasyncinitable.h        \
346         gasyncresult.h          \
347         gbufferedinputstream.h  \
348         gbufferedoutputstream.h \
349         gcancellable.h          \
350         gcontenttype.h          \
351         gcharsetconverter.h     \
352         gconverter.h            \
353         gconverterinputstream.h \
354         gconverteroutputstream.h        \
355         gdatainputstream.h      \
356         gdataoutputstream.h     \
357         gdrive.h                \
358         gemblem.h               \
359         gemblemedicon.h         \
360         gfile.h                 \
361         gfileattribute.h        \
362         gfileenumerator.h       \
363         gfileicon.h             \
364         gfileinfo.h             \
365         gfileinputstream.h      \
366         gfilemonitor.h          \
367         gfilenamecompleter.h    \
368         gfileoutputstream.h     \
369         gfileiostream.h         \
370         gfilterinputstream.h    \
371         gfilteroutputstream.h   \
372         gicon.h                 \
373         ginetaddress.h          \
374         ginetsocketaddress.h    \
375         ginputstream.h          \
376         ginitable.h             \
377         gio.h                   \
378         giotypes.h              \
379         gioenums.h              \
380         gioerror.h              \
381         giomodule.h             \
382         gioscheduler.h          \
383         giostream.h             \
384         gloadableicon.h         \
385         gmount.h                \
386         gmemoryinputstream.h    \
387         gmemoryoutputstream.h   \
388         gmountoperation.h       \
389         gnativevolumemonitor.h  \
390         gnetworkaddress.h       \
391         gnetworkservice.h       \
392         goutputstream.h         \
393         gresolver.h             \
394         gseekable.h             \
395         gsimpleasyncresult.h    \
396         gsocket.h               \
397         gsocketaddress.h        \
398         gsocketaddressenumerator.h \
399         gsocketclient.h         \
400         gsocketconnectable.h    \
401         gsocketconnection.h     \
402         gsocketcontrolmessage.h \
403         gsocketlistener.h       \
404         gsocketservice.h        \
405         gsrvtarget.h            \
406         gtcpconnection.h        \
407         gthreadedsocketservice.h\
408         gthemedicon.h           \
409         gvfs.h                  \
410         gvolume.h               \
411         gvolumemonitor.h        \
412         gzlibcompressor.h       \
413         gzlibdecompressor.h     \
414         $(NULL)
415
416 gioincludedir=$(includedir)/glib-2.0/gio/
417 gioinclude_HEADERS =            \
418         $(gio_headers)          \
419         gioenumtypes.h
420
421 # these sources (also mentioned above) are generated.
422 BUILT_SOURCES =                 \
423         gio-marshal.h           \
424         gio-marshal.c           \
425         gioalias.h              \
426         gioaliasdef.c           \
427         gioenumtypes.h          \
428         gioenumtypes.c          \
429         $(NULL)
430
431 EXTRA_DIST +=                   \
432         gio-marshal.list        \
433         gio.symbols             \
434         gioenumtypes.h.template \
435         gioenumtypes.c.template \
436         makefile.msc            \
437         makegioalias.pl         \
438         abicheck.sh             \
439         pltcheck.sh             \
440         gio.rc.in               \
441         $(NULL)
442
443 BUILT_EXTRA_DIST =              \
444         gio.rc
445
446 CLEANFILES =                    \
447         $(marshal_sources)      \
448         $(NULL)
449
450 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
451         ( top_builddir=`cd $(top_builddir) && pwd`; \
452           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
453             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
454
455 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
456         ( top_builddir=`cd $(top_builddir) && pwd`; \
457           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
458             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
459
460 gio-2.0.lib: libgio-2.0.la gio.def
461         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
462
463 bin_PROGRAMS = gio-querymodules
464 gio_querymodules_SOURCES = gio-querymodules.c
465 gio_querymodules_LDADD   = \
466         $(top_builddir)/glib/libglib-2.0.la             \
467         $(top_builddir)/gobject/libgobject-2.0.la       \
468         $(top_builddir)/gmodule/libgmodule-2.0.la       \
469         libgio-2.0.la                                   \
470         $(NULL)
471
472 dist-hook: $(BUILT_EXTRA_DIST)
473         files='$(BUILT_EXTRA_DIST)'; \
474         for f in $$files; do \
475           if test -f $$f; then d=.; else d=$(srcdir); fi; \
476           cp $$d/$$f $(distdir) || exit 1; done
477
478 if HAVE_GLIB_RUNTIME_LIBDIR
479 install-data-hook:
480         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
481         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
482         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
483         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
484         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
485 endif