1 include $(top_srcdir)/glib.mk
3 SUBDIRS = gdbus-2.0/codegen
9 if OS_WIN32_AND_DLL_COMPILATION
11 noinst_DATA += gio-2.0.lib
13 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
14 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
22 $(uninstall_ms_lib_cmd)
25 -DG_LOG_DOMAIN=\"GLib-GIO\" \
29 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
31 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
33 lib_LTLIBRARIES = libgio-2.0.la
46 gdbusintrospection.h \
47 gdbusmethodinvocation.h \
50 gdbusinterfaceskeleton.h \
52 gdbusobjectskeleton.h \
54 gdbusobjectmanager.h \
55 gdbusobjectmanagerclient.h \
56 gdbusobjectmanagerserver.h \
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 \
90 # These are not built into the library yet
91 EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h dbus-daemon.xml
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 \
100 $(srcdir)/dbus-daemon.xml \
112 gdelayedsettingsbackend.h \
113 gdelayedsettingsbackend.c \
114 gkeyfilesettingsbackend.c \
115 gmemorysettingsbackend.c \
116 gnullsettingsbackend.c \
117 gsettingsbackendinternal.h \
120 gsettingsschema-internal.h \
122 gsettings-mapping.h \
123 gsettings-mapping.c \
127 settings_sources += \
128 gregistrysettingsbackend.h \
129 gregistrysettingsbackend.c
133 settings_sources += \
134 gnextstepsettingsbackend.c
137 application_headers = \
139 gapplicationcommandline.h \
143 gsimpleactiongroup.h \
144 gremoteactiongroup.h \
145 gactiongroupexporter.h \
157 application_sources = \
159 gapplicationcommandline.c \
160 gapplicationimpl-dbus.c \
165 gsimpleactiongroup.c \
166 gremoteactiongroup.c \
167 gactiongroupexporter.c \
168 gdbusactiongroup-private.h \
181 glocaldirectorymonitor.c \
182 glocaldirectorymonitor.h \
185 glocalfileenumerator.c \
186 glocalfileenumerator.h \
189 glocalfileinputstream.c \
190 glocalfileinputstream.h \
191 glocalfilemonitor.c \
192 glocalfilemonitor.h \
193 glocalfileoutputstream.c \
194 glocalfileoutputstream.h \
195 glocalfileiostream.c \
196 glocalfileiostream.h \
213 platform_libadd += inotify/libinotify.la
214 platform_deps += inotify/libinotify.la
219 platform_libadd += kqueue/libkqueue.la
220 platform_deps += kqueue/libkqueue.la
224 AM_CPPFLAGS += -DHAVE_FEN
226 platform_libadd += fen/libfen.la
227 platform_deps += fen/libfen.la
232 platform_libadd += win32/libgiowin32.la
233 platform_deps += win32/libgiowin32.la
243 appinfo_sources += gdesktopappinfo.c
244 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
245 platform_deps += xdgmime/libxdgmime.la
247 gfiledescriptorbased.c \
249 gunixcredentialsmessage.c \
255 gunixsocketaddress.c \
258 gunixvolumemonitor.c \
259 gunixvolumemonitor.h \
261 gunixoutputstream.c \
263 gcontenttypeprivate.h \
267 giounixincludedir=$(includedir)/gio-unix-2.0/gio
268 giounixinclude_HEADERS = \
270 gfiledescriptorbased.h \
272 gunixcredentialsmessage.h \
277 gunixoutputstream.h \
278 gunixsocketaddress.h \
283 gnetworkmonitornetlink.c \
284 gnetworkmonitornetlink.h \
289 gdbus_daemon_sources = \
292 gdbus-daemon-generated.c \
293 gdbus-daemon-generated.h \
296 win32_actual_sources = \
297 $(gdbus_daemon_sources) \
298 gcontenttype-win32.c \
301 gwin32volumemonitor.c \
302 gwin32volumemonitor.h \
303 gwin32inputstream.c \
304 gwin32outputstream.c \
305 gwin32outputstream.h \
308 win32_more_sources_for_vcproj = \
310 gregistrysettingsbackend.c \
311 win32/gwin32directorymonitor.c \
312 win32/gwinhttpfile.c \
313 win32/gwinhttpfileinputstream.c \
314 win32/gwinhttpfileoutputstream.c \
318 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
319 platform_libadd += -lshlwapi -lws2_32 -ldnsapi -liphlpapi
320 win32_sources = $(win32_actual_sources)
322 giowin32includedir=$(includedir)/gio-win32-2.0/gio
323 giowin32include_HEADERS = \
324 gwin32inputstream.h \
325 gwin32outputstream.h \
330 libgio_2_0_la_SOURCES = \
336 gbufferedinputstream.c \
337 gbufferedoutputstream.c \
340 gcharsetconverter.c \
342 gconverterinputstream.c \
343 gconverteroutputstream.c \
345 gcredentialsprivate.h \
347 gdataoutputstream.c \
351 gdummyproxyresolver.c \
352 gdummyproxyresolver.h \
361 gfileattribute-priv.h \
368 gfilenamecompleter.c \
369 gfileoutputstream.c \
371 gfilterinputstream.c \
372 gfilteroutputstream.c \
376 ginetsocketaddress.c \
388 gmemoryinputstream.c \
389 gmemoryoutputstream.c \
391 gnativevolumemonitor.c \
392 gnativevolumemonitor.h \
395 gnetworkingprivate.h \
397 gnetworkmonitorbase.c \
398 gnetworkmonitorbase.h \
402 gpollableinputstream.c \
403 gpollableoutputstream.c \
409 gproxyaddressenumerator.c \
416 gsimpleasyncresult.c \
417 gsimplepermission.c \
420 gsocketaddressenumerator.c \
422 gsocketconnectable.c \
423 gsocketconnection.c \
424 gsocketcontrolmessage.c \
425 gsocketinputstream.c \
426 gsocketinputstream.h \
428 gsocketoutputstream.c \
429 gsocketoutputstream.h \
432 gsimpleproxyresolver.c \
435 gtcpwrapperconnection.c \
436 gthreadedsocketservice.c\
438 gthreadedresolver.c \
439 gthreadedresolver.h \
442 gtlsclientconnection.c \
448 gtlsserverconnection.c \
449 gunionvolumemonitor.c \
450 gunionvolumemonitor.h \
455 gzlibdecompressor.c \
462 $(application_sources) \
463 $(settings_sources) \
468 EXTRA_DIST += strinfo.c
470 libgio_2_0_la_LIBADD = \
471 $(top_builddir)/glib/libglib-2.0.la \
472 $(top_builddir)/gobject/libgobject-2.0.la \
473 $(top_builddir)/gmodule/libgmodule-2.0.la \
482 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
485 no_undefined = -no-undefined
488 if OS_WIN32_AND_DLL_COMPILATION
489 gio_win32_res = gio-win32-res.o
490 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
493 install-data-local: install-ms-lib
494 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
496 uninstall-local: uninstall-ms-lib
498 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
499 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
500 $(gio_win32_res_ldflag) \
501 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
502 -export-dynamic $(no_undefined)
505 # This is dumb. The ObjC source file should be properly named .m
506 libgio_2_0_la_CFLAGS += -xobjective-c
507 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
510 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
512 gio-win32-res.o: gio.rc
519 gbufferedinputstream.h \
520 gbufferedoutputstream.h \
524 gcharsetconverter.h \
526 gconverterinputstream.h \
527 gconverteroutputstream.h \
529 gdataoutputstream.h \
540 gfilenamecompleter.h \
541 gfileoutputstream.h \
543 gfilterinputstream.h \
544 gfilteroutputstream.h \
548 ginetsocketaddress.h \
560 gmemoryinputstream.h \
561 gmemoryoutputstream.h \
563 gnativevolumemonitor.h \
569 gpollableinputstream.h \
570 gpollableoutputstream.h \
574 gproxyaddressenumerator.h \
579 gsimpleasyncresult.h \
580 gsimplepermission.h \
583 gsocketaddressenumerator.h \
585 gsocketconnectable.h \
586 gsocketconnection.h \
587 gsocketcontrolmessage.h \
591 gsimpleproxyresolver.h \
594 gtcpwrapperconnection.h \
595 gthreadedsocketservice.h\
599 gtlsclientconnection.h \
605 gtlsserverconnection.h \
610 gzlibdecompressor.h \
611 $(application_headers) \
612 $(settings_headers) \
616 gioincludedir=$(includedir)/glib-2.0/gio/
617 gioinclude_HEADERS = \
621 nodist_gioinclude_HEADERS = \
625 # these sources (also mentioned above) are generated.
627 gconstructor_as_data.h \
630 gdbus-daemon-generated.c \
631 gdbus-daemon-generated.h \
637 gioenumtypes.h.template \
638 gioenumtypes.c.template \
642 gconstructor_as_data.h \
643 gnetworking.h.win32 \
646 BUILT_EXTRA_DIST += \
649 # This is read by gobject-introspection/misc/ and gtk-doc
650 gio-public-headers.txt: Makefile
651 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
653 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
660 all-local: gio-public-headers.txt
662 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
663 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
664 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
666 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
667 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
668 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
670 gio-2.0.lib: libgio-2.0.la gio.def
671 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
673 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
675 glib_compile_resources_LDADD = \
676 $(top_builddir)/glib/libglib-2.0.la \
677 $(top_builddir)/gobject/libgobject-2.0.la \
680 glib_compile_resources_SOURCES = \
682 gvdb/gvdb-builder.h \
683 gvdb/gvdb-builder.c \
684 glib-compile-resources.c
686 gio_querymodules_SOURCES = gio-querymodules.c
687 gio_querymodules_LDADD = \
688 $(top_builddir)/glib/libglib-2.0.la \
689 $(top_builddir)/gobject/libgobject-2.0.la \
690 $(top_builddir)/gmodule/libgmodule-2.0.la \
694 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
695 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
697 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
698 glib_compile_schemas_SOURCES = \
699 gconstructor_as_data.h \
701 gvdb/gvdb-builder.h \
702 gvdb/gvdb-builder.c \
703 glib-compile-schemas.c
706 $(top_builddir)/glib/libglib-2.0.la \
707 $(top_builddir)/gobject/libgobject-2.0.la \
709 gsettings_SOURCES = gsettings-tool.c
711 schemadir = $(datadir)/glib-2.0/schemas
712 dist_schema_DATA = gschema.dtd
714 # ------------------------------------------------------------------------
717 bin_PROGRAMS += gdbus
718 gdbus_SOURCES = gdbus-tool.c
719 gdbus_LDADD = libgio-2.0.la \
720 $(top_builddir)/glib/libglib-2.0.la \
721 $(top_builddir)/gobject/libgobject-2.0.la
723 completiondir = $(datadir)/bash-completion/completions
726 completion/gsettings \
728 EXTRA_DIST += $(completion_DATA)
730 # ------------------------------------------------------------------------
733 bin_PROGRAMS += gresource
734 gresource_SOURCES = gresource-tool.c
735 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
736 gresource_LDADD = libgio-2.0.la \
737 $(top_builddir)/glib/libglib-2.0.la \
738 $(top_builddir)/gobject/libgobject-2.0.la \
741 # ------------------------------------------------------------------------
743 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
744 files='$(BUILT_EXTRA_DIST)'; \
745 for f in $$files; do \
746 if test -f $$f; then d=.; else d=$(srcdir); fi; \
747 cp $$d/$$f $(distdir) || exit 1; done
749 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
750 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
752 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
753 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
756 done | sort -u >libgio.sourcefiles
757 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
758 rm libgio.sourcefiles
760 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
761 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
763 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
764 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
767 done | sort -u >libgio.vs10.sourcefiles
768 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
769 rm libgio.vs10.sourcefiles
771 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
772 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
774 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
775 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
778 done | sort -u >libgio.vs10.sourcefiles.filters
779 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
780 rm libgio.vs10.sourcefiles.filters
782 if HAVE_GLIB_RUNTIME_LIBDIR
784 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
785 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
786 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
787 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
788 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so