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