[kdbus] Integrate kdbus core with new API.
[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         gkdbusconnection.c      \
400         gmount.c                \
401         gmemoryinputstream.c    \
402         gmemoryoutputstream.c   \
403         gmountoperation.c       \
404         gnativevolumemonitor.c  \
405         gnativevolumemonitor.h  \
406         gnetworkaddress.c       \
407         gnetworking.c           \
408         gnetworkingprivate.h    \
409         gnetworkmonitor.c       \
410         gnetworkmonitorbase.c   \
411         gnetworkmonitorbase.h   \
412         gnetworkservice.c       \
413         goutputstream.c         \
414         gpermission.c           \
415         gpollableinputstream.c  \
416         gpollableoutputstream.c \
417         gpollableutils.c        \
418         gpollfilemonitor.c      \
419         gpollfilemonitor.h      \
420         gproxy.c                \
421         gproxyaddress.c         \
422         gproxyaddressenumerator.c \
423         gproxyresolver.c        \
424         gresolver.c             \
425         gresource.c             \
426         gresourcefile.c         \
427         gresourcefile.h         \
428         gseekable.c             \
429         gsimpleasyncresult.c    \
430         gsimplepermission.c     \
431         gsocket.c               \
432         gsocketaddress.c        \
433         gsocketaddressenumerator.c \
434         gsocketclient.c         \
435         gsocketconnectable.c    \
436         gsocketconnection.c     \
437         gsocketcontrolmessage.c \
438         gsocketinputstream.c    \
439         gsocketinputstream.h    \
440         gsocketlistener.c       \
441         gsocketoutputstream.c   \
442         gsocketoutputstream.h   \
443         gsubprocesslauncher.c   \
444         gsubprocess.c           \
445         gsubprocesslauncher-private.h   \
446         gsocketservice.c        \
447         gsrvtarget.c            \
448         gsimpleproxyresolver.c  \
449         gtask.c                 \
450         gtcpconnection.c        \
451         gtcpwrapperconnection.c \
452         gthreadedsocketservice.c\
453         gthemedicon.c           \
454         gthreadedresolver.c     \
455         gthreadedresolver.h     \
456         gtlsbackend.c           \
457         gtlscertificate.c       \
458         gtlsclientconnection.c  \
459         gtlsconnection.c        \
460         gtlsdatabase.c          \
461         gtlsfiledatabase.c      \
462         gtlsinteraction.c       \
463         gtlspassword.c          \
464         gtlsserverconnection.c  \
465         gunionvolumemonitor.c   \
466         gunionvolumemonitor.h   \
467         gvfs.c                  \
468         gvolume.c               \
469         gvolumemonitor.c        \
470         gzlibcompressor.c       \
471         gzlibdecompressor.c     \
472         gmountprivate.h         \
473         gioenumtypes.h          \
474         gioenumtypes.c          \
475         $(appinfo_sources)      \
476         $(unix_sources)         \
477         $(win32_sources)        \
478         $(application_sources)  \
479         $(settings_sources)     \
480         $(gdbus_sources)        \
481         $(local_sources)        \
482         $(NULL)
483
484 EXTRA_DIST += strinfo.c
485
486 libgio_2_0_la_LIBADD = \
487         $(top_builddir)/gobject/libgobject-2.0.la       \
488         $(top_builddir)/gmodule/libgmodule-2.0.la       \
489         $(top_builddir)/glib/libglib-2.0.la             \
490         $(platform_libadd)                              \
491         $(ZLIB_LIBS)                                    \
492         $(SELINUX_LIBS)                                 \
493         $(GLIB_LIBS)                                    \
494         $(XATTR_LIBS)                                   \
495         $(NETWORK_LIBS)                                 \
496         $(NULL)
497
498 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
499
500 if PLATFORM_WIN32
501 no_undefined = -no-undefined
502 endif
503
504 if OS_WIN32_AND_DLL_COMPILATION
505 gio_win32_res = gio-win32-res.o
506 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
507 endif
508
509 install-data-local: install-ms-lib
510         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
511
512 uninstall-local: uninstall-ms-lib
513
514 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
515 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
516         $(gio_win32_res_ldflag) \
517         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
518         -export-dynamic $(no_undefined)
519
520 if OS_COCOA
521 # This is dumb.  The ObjC source file should be properly named .m
522 libgio_2_0_la_CFLAGS += -xobjective-c
523 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
524 endif
525
526 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
527
528 gio-win32-res.o: gio.rc
529         $(WINDRES) gio.rc $@
530
531 gio_headers =                   \
532         gappinfo.h              \
533         gasyncinitable.h        \
534         gasyncresult.h          \
535         gbufferedinputstream.h  \
536         gbufferedoutputstream.h \
537         gbytesicon.h            \
538         gcancellable.h          \
539         gcontenttype.h          \
540         gcharsetconverter.h     \
541         gconverter.h            \
542         gconverterinputstream.h \
543         gconverteroutputstream.h        \
544         gdatainputstream.h      \
545         gdataoutputstream.h     \
546         gdrive.h                \
547         gemblem.h               \
548         gemblemedicon.h         \
549         gfile.h                 \
550         gfileattribute.h        \
551         gfileenumerator.h       \
552         gfileicon.h             \
553         gfileinfo.h             \
554         gfileinputstream.h      \
555         gfilemonitor.h          \
556         gfilenamecompleter.h    \
557         gfileoutputstream.h     \
558         gfileiostream.h         \
559         gfilterinputstream.h    \
560         gfilteroutputstream.h   \
561         gicon.h                 \
562         ginetaddress.h          \
563         ginetaddressmask.h      \
564         ginetsocketaddress.h    \
565         ginputstream.h          \
566         ginitable.h             \
567         gio.h                   \
568         giotypes.h              \
569         gioenums.h              \
570         gioerror.h              \
571         giomodule.h             \
572         gioscheduler.h          \
573         giostream.h             \
574         gkdbus.h                \
575         gkdbusconnection.h      \
576         gloadableicon.h         \
577         gmount.h                \
578         gmemoryinputstream.h    \
579         gmemoryoutputstream.h   \
580         gmountoperation.h       \
581         gnativevolumemonitor.h  \
582         gnetworkaddress.h       \
583         gnetworkmonitor.h       \
584         gnetworkservice.h       \
585         goutputstream.h         \
586         gpermission.h           \
587         gpollableinputstream.h  \
588         gpollableoutputstream.h \
589         gpollableutils.h        \
590         gproxyaddress.h         \
591         gproxy.h                \
592         gproxyaddressenumerator.h \
593         gproxyresolver.h        \
594         gresolver.h             \
595         gresource.h             \
596         gseekable.h             \
597         gsimpleasyncresult.h    \
598         gsimplepermission.h     \
599         gsocket.h               \
600         gsocketaddress.h        \
601         gsocketaddressenumerator.h \
602         gsocketclient.h         \
603         gsocketconnectable.h    \
604         gsocketconnection.h     \
605         gsocketcontrolmessage.h \
606         gsocketlistener.h       \
607         gsocketservice.h        \
608         gsrvtarget.h            \
609         gsimpleproxyresolver.h  \
610         gtask.h                 \
611         gsubprocess.h           \
612         gsubprocesslauncher.h   \
613         gtcpconnection.h        \
614         gtcpwrapperconnection.h \
615         gthreadedsocketservice.h\
616         gthemedicon.h           \
617         gtlsbackend.h           \
618         gtlscertificate.h       \
619         gtlsclientconnection.h  \
620         gtlsconnection.h        \
621         gtlsdatabase.h          \
622         gtlsfiledatabase.h      \
623         gtlsinteraction.h       \
624         gtlspassword.h          \
625         gtlsserverconnection.h  \
626         gvfs.h                  \
627         gvolume.h               \
628         gvolumemonitor.h        \
629         gzlibcompressor.h       \
630         gzlibdecompressor.h     \
631         $(application_headers)  \
632         $(settings_headers)     \
633         $(gdbus_headers)        \
634         $(NULL)
635
636 gioincludedir=$(includedir)/glib-2.0/gio/
637 gioinclude_HEADERS =            \
638         $(gio_headers)          \
639         gioenumtypes.h
640
641 nodist_gioinclude_HEADERS =     \
642         gnetworking.h           \
643         $(NULL)
644
645 # these sources (also mentioned above) are generated.
646 BUILT_SOURCES +=                \
647         gconstructor_as_data.h  \
648         gioenumtypes.h          \
649         gioenumtypes.c          \
650         gdbus-daemon-generated.c \
651         gdbus-daemon-generated.h \
652         gnetworking.h           \
653         $(NULL)
654
655 EXTRA_DIST +=                   \
656         data-to-c.pl            \
657         gioenumtypes.h.template \
658         gioenumtypes.c.template \
659         makefile.msc            \
660         gio.rc.in               \
661         gschema.dtd             \
662         gconstructor_as_data.h  \
663         gnetworking.h.win32     \
664         $(NULL)
665
666 BUILT_EXTRA_DIST +=             \
667         gio.rc
668
669 # This is read by gobject-introspection/misc/ and gtk-doc
670 gio-public-headers.txt: Makefile
671         $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
672
673 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
674
675
676 DISTCLEANFILES +=               \
677         gioenumtypes.h          \
678         gioenumtypes.c
679
680 all-local: gio-public-headers.txt
681
682 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
683         $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
684             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
685
686 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
687         $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
688             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
689
690 gio.def: libgio-2.0.la
691         $(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
692
693 gio-2.0.lib: libgio-2.0.la gio.def
694         $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
695
696 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
697
698 glib_compile_resources_LDADD = libgio-2.0.la            \
699         $(top_builddir)/gobject/libgobject-2.0.la       \
700         $(top_builddir)/glib/libglib-2.0.la             \
701         $(NULL)
702
703 glib_compile_resources_SOURCES = \
704         gvdb/gvdb-format.h              \
705         gvdb/gvdb-builder.h             \
706         gvdb/gvdb-builder.c             \
707         glib-compile-resources.c
708
709 gio_querymodules_SOURCES = gio-querymodules.c
710 gio_querymodules_LDADD   = libgio-2.0.la                \
711         $(top_builddir)/gobject/libgobject-2.0.la       \
712         $(top_builddir)/gmodule/libgmodule-2.0.la       \
713         $(top_builddir)/glib/libglib-2.0.la             \
714         $(NULL)
715
716 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
717         $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
718
719 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
720 glib_compile_schemas_SOURCES = \
721         gconstructor_as_data.h \
722         gvdb/gvdb-format.h              \
723         gvdb/gvdb-builder.h             \
724         gvdb/gvdb-builder.c             \
725         glib-compile-schemas.c
726
727 gsettings_LDADD = libgio-2.0.la                         \
728         $(top_builddir)/gobject/libgobject-2.0.la       \
729         $(top_builddir)/glib/libglib-2.0.la             \
730         $(NULL)
731 gsettings_SOURCES = gsettings-tool.c
732
733 schemadir = $(datadir)/glib-2.0/schemas
734 dist_schema_DATA = gschema.dtd
735
736 # ------------------------------------------------------------------------
737 # gdbus(1) tool
738
739 bin_PROGRAMS += gdbus
740 gdbus_SOURCES = gdbus-tool.c
741 gdbus_LDADD = libgio-2.0.la                             \
742         $(top_builddir)/gobject/libgobject-2.0.la       \
743         $(top_builddir)/glib/libglib-2.0.la             \
744         $(NULL)
745
746 if OS_UNIX
747 # ------------------------------------------------------------------------
748 # gapplication(1) tool
749 bin_PROGRAMS += gapplication
750 gapplication_SOURCES = gapplication-tool.c
751 gapplication_LDADD = libgio-2.0.la                      \
752         $(top_builddir)/gobject/libgobject-2.0.la       \
753         $(top_builddir)/glib/libglib-2.0.la             \
754         $(NULL)
755 endif
756
757 completiondir = $(datadir)/bash-completion/completions
758 completion_DATA = \
759         completion/gapplication                         \
760         completion/gdbus                                \
761         completion/gsettings                            \
762         completion/gresource
763 EXTRA_DIST += $(completion_DATA)
764
765 # ------------------------------------------------------------------------
766 # gresource tool
767
768 bin_PROGRAMS += gresource
769 gresource_SOURCES = gresource-tool.c
770 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
771 gresource_LDADD = libgio-2.0.la                         \
772         $(top_builddir)/gobject/libgobject-2.0.la       \
773         $(top_builddir)/glib/libglib-2.0.la             \
774         $(LIBELF_LIBS)
775
776 # ------------------------------------------------------------------------
777
778 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
779         files='$(BUILT_EXTRA_DIST)'; \
780         for f in $$files; do \
781           if test -f $$f; then d=.; else d=$(srcdir); fi; \
782           cp $$d/$$f $(distdir) || exit 1; done
783
784 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
785         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
786                 case $$F in \
787                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
788                 *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
789                      ;; \
790                 esac; \
791         done | sort -u >libgio.sourcefiles
792         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
793         rm libgio.sourcefiles
794
795 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
796         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
797                 case $$F in \
798                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
799                 *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'" />' \
800                      ;; \
801                 esac; \
802         done | sort -u >libgio.vs10.sourcefiles
803         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
804         rm libgio.vs10.sourcefiles
805
806 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
807         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
808                 case $$F in \
809                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
810                 *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
811                      ;; \
812                 esac; \
813         done | sort -u >libgio.vs10.sourcefiles.filters
814         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
815         rm libgio.vs10.sourcefiles.filters
816
817 if HAVE_GLIB_RUNTIME_LIBDIR
818 install-data-hook:
819         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
820         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
821         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
822         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
823         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
824 endif