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