Add GTestDBus object
[platform/upstream/glib.git] / gio / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 DIST_SUBDIRS =
6 SUBDIRS = gdbus-2.0/codegen
7
8 if OS_UNIX
9 SUBDIRS += xdgmime
10 endif
11
12 if OS_WIN32_AND_DLL_COMPILATION
13 if MS_LIB_AVAILABLE
14 noinst_DATA = gio-2.0.lib
15
16 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
17 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
18 endif
19 endif
20
21 install-ms-lib:
22         $(install_ms_lib_cmd)
23
24 uninstall-ms-lib:
25         $(uninstall_ms_lib_cmd)
26
27 gio.def: gio.symbols
28         $(AM_V_GEN) (echo 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) > $(builddir)/gio.def.tmp && \
29           mv $(builddir)/gio.def.tmp $(builddir)/gio.def
30
31 if OS_LINUX
32 if HAVE_GNUC_VISIBILITY
33 TESTS = abicheck.sh
34 endif
35 endif
36
37 AM_CPPFLAGS = \
38         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
39         $(gmodule_INCLUDES)                             \
40         $(GLIB_DEBUG_FLAGS)                             \
41         -DGIO_COMPILATION                               \
42         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
43
44 lib_LTLIBRARIES = libgio-2.0.la
45
46 gdbus_headers =                         \
47         gdbusauthobserver.h             \
48         gcredentials.h                  \
49         gdbusutils.h                    \
50         gdbuserror.h                    \
51         gdbusaddress.h                  \
52         gdbusconnection.h               \
53         gdbusmessage.h                  \
54         gdbusnameowning.h               \
55         gdbusnamewatching.h             \
56         gdbusproxy.h                    \
57         gdbusintrospection.h            \
58         gdbusmethodinvocation.h         \
59         gdbusserver.h                   \
60         gdbusinterface.h                \
61         gdbusinterfaceskeleton.h        \
62         gdbusobject.h                   \
63         gdbusobjectskeleton.h           \
64         gdbusobjectproxy.h              \
65         gdbusobjectmanager.h            \
66         gdbusobjectmanagerclient.h      \
67         gdbusobjectmanagerserver.h      \
68         gtestdbus.h                     \
69         $(NULL)
70
71 gdbus_sources =                                                         \
72         gdbusutils.h                    gdbusutils.c                    \
73         gdbusaddress.h                  gdbusaddress.c                  \
74         gdbusauthobserver.h             gdbusauthobserver.c             \
75         gdbusauth.h                     gdbusauth.c                     \
76         gdbusauthmechanism.h            gdbusauthmechanism.c            \
77         gdbusauthmechanismanon.h        gdbusauthmechanismanon.c        \
78         gdbusauthmechanismexternal.h    gdbusauthmechanismexternal.c    \
79         gdbusauthmechanismsha1.h        gdbusauthmechanismsha1.c        \
80         gdbuserror.h                    gdbuserror.c                    \
81         gdbusconnection.h               gdbusconnection.c               \
82         gdbusmessage.h                  gdbusmessage.c                  \
83         gdbusnameowning.h               gdbusnameowning.c               \
84         gdbusnamewatching.h             gdbusnamewatching.c             \
85         gdbusproxy.h                    gdbusproxy.c                    \
86         gdbusprivate.h                  gdbusprivate.c                  \
87         gdbusintrospection.h            gdbusintrospection.c            \
88         gdbusmethodinvocation.h         gdbusmethodinvocation.c         \
89         gdbusserver.h                   gdbusserver.c                   \
90         gdbusinterface.h                gdbusinterface.c                \
91         gdbusinterfaceskeleton.h        gdbusinterfaceskeleton.c        \
92         gdbusobject.h                   gdbusobject.c                   \
93         gdbusobjectskeleton.h           gdbusobjectskeleton.c           \
94         gdbusobjectproxy.h              gdbusobjectproxy.c              \
95         gdbusobjectmanager.h            gdbusobjectmanager.c            \
96         gdbusobjectmanagerclient.h      gdbusobjectmanagerclient.c      \
97         gdbusobjectmanagerserver.h      gdbusobjectmanagerserver.c      \
98         gtestdbus.h                     gtestdbus.c                     \
99         $(NULL)
100
101 settings_headers = \
102         gsettingsbackend.h              \
103         gsettingsschema.h               \
104         gsettings.h
105
106 settings_sources = \
107         gvdb/gvdb-format.h              \
108         gvdb/gvdb-reader.h              \
109         gvdb/gvdb-reader.c              \
110         gdelayedsettingsbackend.h       \
111         gdelayedsettingsbackend.c       \
112         gkeyfilesettingsbackend.c       \
113         gmemorysettingsbackend.c        \
114         gnullsettingsbackend.c          \
115         gsettingsbackendinternal.h      \
116         gsettingsbackend.c              \
117         gsettingsschema.h               \
118         gsettingsschema-internal.h      \
119         gsettingsschema.c               \
120         gsettings-mapping.h             \
121         gsettings-mapping.c             \
122         gsettings.c
123
124 if OS_WIN32
125 settings_sources += \
126         gregistrysettingsbackend.h      \
127         gregistrysettingsbackend.c
128 endif
129
130 if OS_COCOA
131 settings_sources += \
132         gnextstepsettingsbackend.c
133 endif
134
135 application_headers = \
136         gapplication.h                  \
137         gapplicationcommandline.h       \
138                                         \
139         gactiongroup.h                  \
140         gactionmap.h                    \
141         gsimpleactiongroup.h            \
142         gremoteactiongroup.h            \
143         gactiongroupexporter.h          \
144         gdbusactiongroup.h              \
145         gaction.h                       \
146         gsimpleaction.h                 \
147                                         \
148         gmenumodel.h                    \
149         gmenu.h                         \
150         gmenuexporter.h                 \
151         gdbusmenumodel.h                \
152         $(NULL)
153
154 application_sources = \
155         gapplication.c                          \
156         gapplicationcommandline.c               \
157         gapplicationimpl-dbus.c                 \
158         gapplicationimpl.h                      \
159                                                 \
160         gactiongroup.c                          \
161         gactionmap.c                            \
162         gsimpleactiongroup.c                    \
163         gremoteactiongroup.c                    \
164         gactiongroupexporter.c                  \
165         gdbusactiongroup.c                      \
166         gaction.c                               \
167         gsimpleaction.c                         \
168                                                 \
169         gmenumodel.c                            \
170         gmenu.c                                 \
171         gmenuexporter.c                         \
172         gdbusmenumodel.c                        \
173         $(NULL)
174
175 local_sources = \
176         glocaldirectorymonitor.c        \
177         glocaldirectorymonitor.h        \
178         glocalfile.c                    \
179         glocalfile.h                    \
180         glocalfileenumerator.c          \
181         glocalfileenumerator.h          \
182         glocalfileinfo.c                \
183         glocalfileinfo.h                \
184         glocalfileinputstream.c         \
185         glocalfileinputstream.h         \
186         glocalfilemonitor.c             \
187         glocalfilemonitor.h             \
188         glocalfileoutputstream.c        \
189         glocalfileoutputstream.h        \
190         glocalfileiostream.c            \
191         glocalfileiostream.h            \
192         glocalvfs.c                     \
193         glocalvfs.h                     \
194         gsocks4proxy.c                  \
195         gsocks4proxy.h                  \
196         gsocks4aproxy.c                 \
197         gsocks4aproxy.h                 \
198         gsocks5proxy.c                  \
199         gsocks5proxy.h                  \
200         $(NULL)
201
202 platform_libadd =
203 platform_deps =
204 appinfo_sources =
205
206 if HAVE_INOTIFY
207 SUBDIRS += inotify
208 platform_libadd += inotify/libinotify.la
209 platform_deps += inotify/libinotify.la
210 endif
211
212 if HAVE_FEN
213 AM_CPPFLAGS += -DHAVE_FEN
214 SUBDIRS += fen
215 platform_libadd += fen/libfen.la
216 platform_deps += fen/libfen.la
217 endif
218
219 if OS_WIN32
220 SUBDIRS += win32
221 platform_libadd += win32/libgiowin32.la
222 platform_deps += win32/libgiowin32.la
223 endif
224
225 SUBDIRS += .
226
227 if HAVE_FAM
228 SUBDIRS += fam
229 endif
230
231 if OS_UNIX
232 appinfo_sources += gdesktopappinfo.c
233 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
234 platform_deps += xdgmime/libxdgmime.la
235 unix_sources = \
236         gfiledescriptorbased.c  \
237         gunixconnection.c       \
238         gunixcredentialsmessage.c       \
239         gunixfdlist.c           \
240         gunixfdmessage.c        \
241         gunixmount.c            \
242         gunixmount.h            \
243         gunixmounts.c           \
244         gunixsocketaddress.c    \
245         gunixvolume.c           \
246         gunixvolume.h           \
247         gunixvolumemonitor.c    \
248         gunixvolumemonitor.h    \
249         gunixinputstream.c      \
250         gunixoutputstream.c     \
251         $(NULL)
252
253
254 giounixincludedir=$(includedir)/gio-unix-2.0/gio
255 giounixinclude_HEADERS = \
256         gdesktopappinfo.h       \
257         gfiledescriptorbased.h  \
258         gunixconnection.h       \
259         gunixcredentialsmessage.h       \
260         gunixmounts.h           \
261         gunixfdlist.h           \
262         gunixfdmessage.h        \
263         gunixinputstream.h      \
264         gunixoutputstream.h     \
265         gunixsocketaddress.h    \
266         $(NULL)
267
268 if HAVE_NETLINK
269 unix_sources +=                  \
270         gnetworkmonitornetlink.c \
271         gnetworkmonitornetlink.h \
272         $(NULL)
273 endif
274 endif
275
276 win32_actual_sources = \
277         gwin32mount.c \
278         gwin32mount.h \
279         gwin32volumemonitor.c \
280         gwin32volumemonitor.h \
281         gwin32inputstream.c \
282         gwin32outputstream.c \
283         gwin32outputstream.h \
284         $(NULL)
285
286 win32_more_sources_for_vcproj = \
287         gwin32appinfo.c \
288         gregistrysettingsbackend.c \
289         win32/gwin32directorymonitor.c \
290         win32/gwinhttpfile.c \
291         win32/gwinhttpfileinputstream.c \
292         win32/gwinhttpfileoutputstream.c \
293         win32/gwinhttpvfs.c
294
295 if OS_WIN32
296 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
297 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
298 win32_sources = $(win32_actual_sources)
299
300 giowin32includedir=$(includedir)/gio-win32-2.0/gio
301 giowin32include_HEADERS = \
302         gwin32inputstream.h \
303         gwin32outputstream.h \
304         $(NULL)
305
306 endif
307
308 if BUILD_MODULAR_TESTS
309 SUBDIRS += tests 
310 else
311 DIST_SUBDIRS += tests
312 endif
313
314 libgio_2_0_la_SOURCES =         \
315         gappinfo.c              \
316         gasynchelper.c          \
317         gasynchelper.h          \
318         gasyncinitable.c        \
319         gasyncresult.c          \
320         gbufferedinputstream.c  \
321         gbufferedoutputstream.c \
322         gcancellable.c          \
323         gcontenttype.c          \
324         gcontenttypeprivate.h   \
325         gcharsetconverter.c     \
326         gconverter.c            \
327         gconverterinputstream.c \
328         gconverteroutputstream.c        \
329         gcredentials.c          \
330         gdatainputstream.c      \
331         gdataoutputstream.c     \
332         gdrive.c                \
333         gdummyfile.h            \
334         gdummyfile.c            \
335         gdummyproxyresolver.c   \
336         gdummyproxyresolver.h   \
337         gdummytlsbackend.c      \
338         gdummytlsbackend.h      \
339         gemblem.h               \
340         gemblem.c               \
341         gemblemedicon.h         \
342         gemblemedicon.c         \
343         gfile.c                 \
344         gfileattribute.c        \
345         gfileattribute-priv.h   \
346         gfileenumerator.c       \
347         gfileicon.c             \
348         gfileinfo.c             \
349         gfileinfo-priv.h        \
350         gfileinputstream.c      \
351         gfilemonitor.c          \
352         gfilenamecompleter.c    \
353         gfileoutputstream.c     \
354         gfileiostream.c         \
355         gfilterinputstream.c    \
356         gfilteroutputstream.c   \
357         gicon.c                 \
358         ginetaddress.c          \
359         ginetaddressmask.c      \
360         ginetsocketaddress.c    \
361         ginitable.c             \
362         ginputstream.c          \
363         gioenums.h              \
364         gioerror.c              \
365         giomodule.c             \
366         giomodule-priv.h        \
367         gioscheduler.c          \
368         giostream.c             \
369         gloadableicon.c         \
370         gmount.c                \
371         gmemoryinputstream.c    \
372         gmemoryoutputstream.c   \
373         gmountoperation.c       \
374         gnativevolumemonitor.c  \
375         gnativevolumemonitor.h  \
376         gnetworkaddress.c       \
377         gnetworkingprivate.h    \
378         gnetworkmonitor.c       \
379         gnetworkmonitorbase.c   \
380         gnetworkmonitorbase.h   \
381         gnetworkservice.c       \
382         goutputstream.c         \
383         gpermission.c           \
384         gpollableinputstream.c  \
385         gpollableoutputstream.c \
386         gpollableutils.c        \
387         gpollfilemonitor.c      \
388         gpollfilemonitor.h      \
389         gproxyresolver.c        \
390         gresolver.c             \
391         gresource.c             \
392         gresourcefile.c         \
393         gresourcefile.h         \
394         gseekable.c             \
395         gsimpleasyncresult.c    \
396         gsimplepermission.c     \
397         gsocket.c               \
398         gsocketaddress.c        \
399         gsocketaddressenumerator.c \
400         gsocketclient.c         \
401         gsocketconnectable.c    \
402         gsocketconnection.c     \
403         gsocketcontrolmessage.c \
404         gsocketinputstream.c    \
405         gsocketinputstream.h    \
406         gsocketlistener.c       \
407         gsocketoutputstream.c   \
408         gsocketoutputstream.h   \
409         gproxy.c                \
410         gproxyaddress.c         \
411         gproxyaddressenumerator.c \
412         gsocketservice.c        \
413         gsrvtarget.c            \
414         gtcpconnection.c        \
415         gtcpwrapperconnection.c \
416         gthreadedsocketservice.c\
417         gthemedicon.c           \
418         gthreadedresolver.c     \
419         gthreadedresolver.h     \
420         gtlsbackend.c           \
421         gtlscertificate.c       \
422         gtlsclientconnection.c  \
423         gtlsconnection.c        \
424         gtlsdatabase.c          \
425         gtlsfiledatabase.c      \
426         gtlsinteraction.c       \
427         gtlspassword.c          \
428         gtlsserverconnection.c  \
429         gunionvolumemonitor.c   \
430         gunionvolumemonitor.h   \
431         gvfs.c                  \
432         gvolume.c               \
433         gvolumemonitor.c        \
434         gzlibcompressor.c       \
435         gzlibdecompressor.c     \
436         gmountprivate.h         \
437         gioenumtypes.h          \
438         gioenumtypes.c          \
439         $(appinfo_sources)      \
440         $(unix_sources)         \
441         $(win32_sources)        \
442         $(application_sources)  \
443         $(settings_sources)     \
444         $(gdbus_sources)        \
445         $(local_sources)        \
446         $(NULL)
447
448 EXTRA_DIST += strinfo.c
449
450 libgio_2_0_la_LIBADD = \
451         $(top_builddir)/glib/libglib-2.0.la             \
452         $(top_builddir)/gobject/libgobject-2.0.la       \
453         $(top_builddir)/gmodule/libgmodule-2.0.la       \
454         $(platform_libadd)                              \
455         $(ZLIB_LIBS)                                    \
456         $(SELINUX_LIBS)                                 \
457         $(GLIB_LIBS)                                    \
458         $(XATTR_LIBS)                                   \
459         $(NETWORK_LIBS)                                 \
460         $(NULL)
461
462 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
463
464 if PLATFORM_WIN32
465 no_undefined = -no-undefined
466 endif
467
468 if OS_WIN32_AND_DLL_COMPILATION
469 export_symbols = -export-symbols $(builddir)/gio.def
470 gio_def = gio.def
471
472 gio_win32_res = gio-win32-res.o
473 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
474
475 install-def-file:
476         $(INSTALL) $(builddir)/gio.def $(DESTDIR)$(libdir)/gio-2.0.def
477
478 uninstall-def-file:
479         -rm $(DESTDIR)$(libdir)/gio-2.0.def
480 else
481 install-def-file:
482 uninstall-def-file:
483
484 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
485 endif
486
487 install-data-local: install-ms-lib install-def-file
488         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
489
490 uninstall-local: uninstall-ms-lib uninstall-def-file
491
492 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
493         $(gio_win32_res_ldflag) \
494         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
495         -export-dynamic $(no_undefined) $(export_symbols)
496
497 if OS_COCOA
498 # This is dumb.  The ObjC source file should be properly named .m
499 libgio_2_0_la_CFLAGS = -xobjective-c
500 libgio_2_0_la_LDFLAGS += -framework Foundation
501 endif
502
503 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
504
505 gio-win32-res.o: gio.rc
506         $(WINDRES) gio.rc $@
507
508 gio_headers =                   \
509         gappinfo.h              \
510         gasyncinitable.h        \
511         gasyncresult.h          \
512         gbufferedinputstream.h  \
513         gbufferedoutputstream.h \
514         gcancellable.h          \
515         gcontenttype.h          \
516         gcharsetconverter.h     \
517         gconverter.h            \
518         gconverterinputstream.h \
519         gconverteroutputstream.h        \
520         gdatainputstream.h      \
521         gdataoutputstream.h     \
522         gdrive.h                \
523         gemblem.h               \
524         gemblemedicon.h         \
525         gfile.h                 \
526         gfileattribute.h        \
527         gfileenumerator.h       \
528         gfileicon.h             \
529         gfileinfo.h             \
530         gfileinputstream.h      \
531         gfilemonitor.h          \
532         gfilenamecompleter.h    \
533         gfileoutputstream.h     \
534         gfileiostream.h         \
535         gfilterinputstream.h    \
536         gfilteroutputstream.h   \
537         gicon.h                 \
538         ginetaddress.h          \
539         ginetaddressmask.h      \
540         ginetsocketaddress.h    \
541         ginputstream.h          \
542         ginitable.h             \
543         gio.h                   \
544         giotypes.h              \
545         gioenums.h              \
546         gioerror.h              \
547         giomodule.h             \
548         gioscheduler.h          \
549         giostream.h             \
550         gloadableicon.h         \
551         gmount.h                \
552         gmemoryinputstream.h    \
553         gmemoryoutputstream.h   \
554         gmountoperation.h       \
555         gnativevolumemonitor.h  \
556         gnetworkaddress.h       \
557         gnetworkmonitor.h       \
558         gnetworkservice.h       \
559         goutputstream.h         \
560         gpermission.h           \
561         gpollableinputstream.h  \
562         gpollableoutputstream.h \
563         gpollableutils.h        \
564         gproxyaddress.h         \
565         gproxy.h                \
566         gproxyaddressenumerator.h \
567         gproxyresolver.h        \
568         gresolver.h             \
569         gresource.h             \
570         gseekable.h             \
571         gsimpleasyncresult.h    \
572         gsimplepermission.h     \
573         gsocket.h               \
574         gsocketaddress.h        \
575         gsocketaddressenumerator.h \
576         gsocketclient.h         \
577         gsocketconnectable.h    \
578         gsocketconnection.h     \
579         gsocketcontrolmessage.h \
580         gsocketlistener.h       \
581         gsocketservice.h        \
582         gsrvtarget.h            \
583         gtcpconnection.h        \
584         gtcpwrapperconnection.h \
585         gthreadedsocketservice.h\
586         gthemedicon.h           \
587         gtlsbackend.h           \
588         gtlscertificate.h       \
589         gtlsclientconnection.h  \
590         gtlsconnection.h        \
591         gtlsdatabase.h          \
592         gtlsfiledatabase.h      \
593         gtlsinteraction.h       \
594         gtlspassword.h          \
595         gtlsserverconnection.h  \
596         gvfs.h                  \
597         gvolume.h               \
598         gvolumemonitor.h        \
599         gzlibcompressor.h       \
600         gzlibdecompressor.h     \
601         $(application_headers)  \
602         $(settings_headers)     \
603         $(gdbus_headers)        \
604         $(NULL)
605
606 gioincludedir=$(includedir)/glib-2.0/gio/
607 gioinclude_HEADERS =            \
608         $(gio_headers)          \
609         gioenumtypes.h
610
611 # these sources (also mentioned above) are generated.
612 BUILT_SOURCES =                 \
613         gconstructor_as_data.h  \
614         gioenumtypes.h          \
615         gioenumtypes.c          \
616         $(NULL)
617
618 EXTRA_DIST +=                   \
619         data-to-c.pl            \
620         gio.symbols             \
621         gioenumtypes.h.template \
622         gioenumtypes.c.template \
623         makefile.msc            \
624         abicheck.sh             \
625         gio.rc.in               \
626         gschema.dtd             \
627         gconstructor_as_data.h  \
628         $(NULL)
629
630 BUILT_EXTRA_DIST =              \
631         gio.rc
632
633 # This is read by gobject-introspection/misc/ and gtk-doc
634 gio-public-headers.txt: Makefile
635         echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
636
637 CLEANFILES = gio-public-headers.txt gconstructor_as_data.h
638
639 all-local: gio-public-headers.txt
640
641 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
642         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
643           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
644             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
645
646 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
647         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
648           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
649             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
650
651 gio-2.0.lib: libgio-2.0.la gio.def
652         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
653
654 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
655
656 glib_compile_resources_LDADD = \
657         $(top_builddir)/glib/libglib-2.0.la \
658         $(top_builddir)/gobject/libgobject-2.0.la       \
659         libgio-2.0.la
660
661 glib_compile_resources_SOURCES = \
662         gvdb/gvdb-format.h              \
663         gvdb/gvdb-builder.h             \
664         gvdb/gvdb-builder.c             \
665         glib-compile-resources.c
666
667 gio_querymodules_SOURCES = gio-querymodules.c
668 gio_querymodules_LDADD   = \
669         $(top_builddir)/glib/libglib-2.0.la             \
670         $(top_builddir)/gobject/libgobject-2.0.la       \
671         $(top_builddir)/gmodule/libgmodule-2.0.la       \
672         libgio-2.0.la                                   \
673         $(NULL)
674
675 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
676         $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
677
678 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
679 glib_compile_schemas_SOURCES = \
680         gconstructor_as_data.h \
681         gvdb/gvdb-format.h              \
682         gvdb/gvdb-builder.h             \
683         gvdb/gvdb-builder.c             \
684         glib-compile-schemas.c
685
686 gsettings_LDADD = \
687         $(top_builddir)/glib/libglib-2.0.la             \
688         $(top_builddir)/gobject/libgobject-2.0.la       \
689         libgio-2.0.la
690 gsettings_SOURCES = gsettings-tool.c
691
692 schemadir = $(datadir)/glib-2.0/schemas
693 dist_schema_DATA = gschema.dtd
694
695 # ------------------------------------------------------------------------
696 # gdbus(1) tool
697
698 bin_PROGRAMS += gdbus
699 gdbus_SOURCES = gdbus-tool.c
700 gdbus_LDADD = libgio-2.0.la \
701         $(top_builddir)/glib/libglib-2.0.la             \
702         $(top_builddir)/gobject/libgobject-2.0.la
703
704 completiondir = $(sysconfdir)/bash_completion.d
705 completion_DATA = \
706         gdbus-bash-completion.sh                \
707         gsettings-bash-completion.sh            \
708         gresource-bash-completion.sh
709 EXTRA_DIST += $(completion_DATA)
710
711 # ------------------------------------------------------------------------
712 # gresource tool
713
714 bin_PROGRAMS += gresource
715 gresource_SOURCES = gresource-tool.c
716 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
717 gresource_LDADD = libgio-2.0.la \
718         $(top_builddir)/glib/libglib-2.0.la             \
719         $(top_builddir)/gobject/libgobject-2.0.la \
720         $(LIBELF_LIBS)
721
722 # ------------------------------------------------------------------------
723
724 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
725         files='$(BUILT_EXTRA_DIST)'; \
726         for f in $$files; do \
727           if test -f $$f; then d=.; else d=$(srcdir); fi; \
728           cp $$d/$$f $(distdir) || exit 1; done
729
730 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
731         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
732                 case $$F in \
733                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
734                 *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
735                      ;; \
736                 esac; \
737         done | sort -u >libgio.sourcefiles
738         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
739         rm libgio.sourcefiles
740
741 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
742         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
743                 case $$F in \
744                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
745                 *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'" />' \
746                      ;; \
747                 esac; \
748         done | sort -u >libgio.vs10.sourcefiles
749         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
750         rm libgio.vs10.sourcefiles
751
752 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
753         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
754                 case $$F in \
755                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
756                 *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
757                      ;; \
758                 esac; \
759         done | sort -u >libgio.vs10.sourcefiles.filters
760         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
761         rm libgio.vs10.sourcefiles.filters
762
763 if HAVE_GLIB_RUNTIME_LIBDIR
764 install-data-hook:
765         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
766         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
767         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
768         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
769         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
770 endif