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