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