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