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