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