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