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