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