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