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 \
158 application_sources = \
160 gapplicationcommandline.c \
161 gapplicationimpl-dbus.c \
166 gsimpleactiongroup.c \
167 gremoteactiongroup.c \
168 gactiongroupexporter.c \
169 gdbusactiongroup-private.h \
179 gnotification-private.h \
180 gnotificationbackend.h \
182 gnotificationbackend.c \
186 glocaldirectorymonitor.c \
187 glocaldirectorymonitor.h \
190 glocalfileenumerator.c \
191 glocalfileenumerator.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 \
220 platform_libadd += inotify/libinotify.la
221 platform_deps += inotify/libinotify.la
226 platform_libadd += kqueue/libkqueue.la
227 platform_deps += kqueue/libkqueue.la
231 AM_CPPFLAGS += -DHAVE_FEN
233 platform_libadd += fen/libfen.la
234 platform_deps += fen/libfen.la
239 platform_libadd += win32/libgiowin32.la
240 platform_deps += win32/libgiowin32.la
250 appinfo_sources += gdesktopappinfo.c
251 platform_libadd += xdgmime/libxdgmime.la
252 platform_deps += xdgmime/libxdgmime.la
254 gfiledescriptorbased.c \
256 gunixcredentialsmessage.c \
262 gunixsocketaddress.c \
265 gunixvolumemonitor.c \
266 gunixvolumemonitor.h \
268 gunixoutputstream.c \
270 gcontenttypeprivate.h \
271 gfdonotificationbackend.c \
272 ggtknotificationbackend.c \
276 giounixincludedir=$(includedir)/gio-unix-2.0/gio
277 giounixinclude_HEADERS = \
279 gfiledescriptorbased.h \
281 gunixcredentialsmessage.h \
286 gunixoutputstream.h \
287 gunixsocketaddress.h \
292 gnetworkmonitornetlink.c \
293 gnetworkmonitornetlink.h \
298 gdbus_daemon_sources = \
301 gdbus-daemon-generated.c \
302 gdbus-daemon-generated.h \
305 win32_actual_sources = \
306 $(gdbus_daemon_sources) \
307 gcontenttype-win32.c \
310 gwin32volumemonitor.c \
311 gwin32volumemonitor.h \
312 gwin32inputstream.c \
313 gwin32outputstream.c \
314 gwin32outputstream.h \
317 win32_more_sources_for_vcproj = \
319 gregistrysettingsbackend.c \
320 win32/gwin32directorymonitor.c \
321 win32/gwinhttpfile.c \
322 win32/gwinhttpfileinputstream.c \
323 win32/gwinhttpfileoutputstream.c \
327 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
328 platform_libadd += -lshlwapi -lws2_32 -ldnsapi -liphlpapi
329 win32_sources = $(win32_actual_sources)
331 giowin32includedir=$(includedir)/gio-win32-2.0/gio
332 giowin32include_HEADERS = \
333 gwin32inputstream.h \
334 gwin32outputstream.h \
339 libgio_2_0_la_SOURCES = \
346 gbufferedinputstream.c \
347 gbufferedoutputstream.c \
350 gcharsetconverter.c \
352 gconverterinputstream.c \
353 gconverteroutputstream.c \
355 gcredentialsprivate.h \
357 gdataoutputstream.c \
361 gdummyproxyresolver.c \
362 gdummyproxyresolver.h \
371 gfileattribute-priv.h \
378 gfilenamecompleter.c \
379 gfileoutputstream.c \
381 gfilterinputstream.c \
382 gfilteroutputstream.c \
386 ginetsocketaddress.c \
401 gmemoryinputstream.c \
402 gmemoryoutputstream.c \
404 gnativevolumemonitor.c \
405 gnativevolumemonitor.h \
408 gnetworkingprivate.h \
410 gnetworkmonitorbase.c \
411 gnetworkmonitorbase.h \
415 gpollableinputstream.c \
416 gpollableoutputstream.c \
422 gproxyaddressenumerator.c \
429 gsimpleasyncresult.c \
430 gsimplepermission.c \
433 gsocketaddressenumerator.c \
435 gsocketconnectable.c \
436 gsocketconnection.c \
437 gsocketcontrolmessage.c \
438 gsocketinputstream.c \
439 gsocketinputstream.h \
441 gsocketoutputstream.c \
442 gsocketoutputstream.h \
443 gsubprocesslauncher.c \
445 gsubprocesslauncher-private.h \
448 gsimpleproxyresolver.c \
451 gtcpwrapperconnection.c \
452 gthreadedsocketservice.c\
454 gthreadedresolver.c \
455 gthreadedresolver.h \
458 gtlsclientconnection.c \
464 gtlsserverconnection.c \
465 gunionvolumemonitor.c \
466 gunionvolumemonitor.h \
471 gzlibdecompressor.c \
478 $(application_sources) \
479 $(settings_sources) \
484 EXTRA_DIST += strinfo.c
486 libgio_2_0_la_LIBADD = \
487 $(top_builddir)/gobject/libgobject-2.0.la \
488 $(top_builddir)/gmodule/libgmodule-2.0.la \
489 $(top_builddir)/glib/libglib-2.0.la \
498 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
501 no_undefined = -no-undefined
504 if OS_WIN32_AND_DLL_COMPILATION
505 gio_win32_res = gio-win32-res.o
506 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
509 install-data-local: install-ms-lib
510 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
512 uninstall-local: uninstall-ms-lib
514 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
515 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
516 $(gio_win32_res_ldflag) \
517 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
518 -export-dynamic $(no_undefined)
521 # This is dumb. The ObjC source file should be properly named .m
522 libgio_2_0_la_CFLAGS += -xobjective-c
523 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
526 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
528 gio-win32-res.o: gio.rc
535 gbufferedinputstream.h \
536 gbufferedoutputstream.h \
540 gcharsetconverter.h \
542 gconverterinputstream.h \
543 gconverteroutputstream.h \
545 gdataoutputstream.h \
556 gfilenamecompleter.h \
557 gfileoutputstream.h \
559 gfilterinputstream.h \
560 gfilteroutputstream.h \
564 ginetsocketaddress.h \
578 gmemoryinputstream.h \
579 gmemoryoutputstream.h \
581 gnativevolumemonitor.h \
587 gpollableinputstream.h \
588 gpollableoutputstream.h \
592 gproxyaddressenumerator.h \
597 gsimpleasyncresult.h \
598 gsimplepermission.h \
601 gsocketaddressenumerator.h \
603 gsocketconnectable.h \
604 gsocketconnection.h \
605 gsocketcontrolmessage.h \
609 gsimpleproxyresolver.h \
612 gsubprocesslauncher.h \
614 gtcpwrapperconnection.h \
615 gthreadedsocketservice.h\
619 gtlsclientconnection.h \
625 gtlsserverconnection.h \
630 gzlibdecompressor.h \
631 $(application_headers) \
632 $(settings_headers) \
636 gioincludedir=$(includedir)/glib-2.0/gio/
637 gioinclude_HEADERS = \
641 nodist_gioinclude_HEADERS = \
645 # these sources (also mentioned above) are generated.
647 gconstructor_as_data.h \
650 gdbus-daemon-generated.c \
651 gdbus-daemon-generated.h \
657 gioenumtypes.h.template \
658 gioenumtypes.c.template \
662 gconstructor_as_data.h \
663 gnetworking.h.win32 \
666 BUILT_EXTRA_DIST += \
669 # This is read by gobject-introspection/misc/ and gtk-doc
670 gio-public-headers.txt: Makefile
671 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
673 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
680 all-local: gio-public-headers.txt
682 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
683 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
684 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
686 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
687 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
688 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
690 gio.def: libgio-2.0.la
691 $(AM_V_GEN) dumpbin.exe -exports .libs/libgio-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gio.def.tmp && mv gio.def.tmp gio.def
693 gio-2.0.lib: libgio-2.0.la gio.def
694 $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
696 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
698 glib_compile_resources_LDADD = libgio-2.0.la \
699 $(top_builddir)/gobject/libgobject-2.0.la \
700 $(top_builddir)/glib/libglib-2.0.la \
703 glib_compile_resources_SOURCES = \
705 gvdb/gvdb-builder.h \
706 gvdb/gvdb-builder.c \
707 glib-compile-resources.c
709 gio_querymodules_SOURCES = gio-querymodules.c
710 gio_querymodules_LDADD = libgio-2.0.la \
711 $(top_builddir)/gobject/libgobject-2.0.la \
712 $(top_builddir)/gmodule/libgmodule-2.0.la \
713 $(top_builddir)/glib/libglib-2.0.la \
716 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
717 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
719 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
720 glib_compile_schemas_SOURCES = \
721 gconstructor_as_data.h \
723 gvdb/gvdb-builder.h \
724 gvdb/gvdb-builder.c \
725 glib-compile-schemas.c
727 gsettings_LDADD = libgio-2.0.la \
728 $(top_builddir)/gobject/libgobject-2.0.la \
729 $(top_builddir)/glib/libglib-2.0.la \
731 gsettings_SOURCES = gsettings-tool.c
733 schemadir = $(datadir)/glib-2.0/schemas
734 dist_schema_DATA = gschema.dtd
736 # ------------------------------------------------------------------------
739 bin_PROGRAMS += gdbus
740 gdbus_SOURCES = gdbus-tool.c
741 gdbus_LDADD = libgio-2.0.la \
742 $(top_builddir)/gobject/libgobject-2.0.la \
743 $(top_builddir)/glib/libglib-2.0.la \
747 # ------------------------------------------------------------------------
748 # gapplication(1) tool
749 bin_PROGRAMS += gapplication
750 gapplication_SOURCES = gapplication-tool.c
751 gapplication_LDADD = libgio-2.0.la \
752 $(top_builddir)/gobject/libgobject-2.0.la \
753 $(top_builddir)/glib/libglib-2.0.la \
757 completiondir = $(datadir)/bash-completion/completions
759 completion/gapplication \
761 completion/gsettings \
763 EXTRA_DIST += $(completion_DATA)
765 # ------------------------------------------------------------------------
768 bin_PROGRAMS += gresource
769 gresource_SOURCES = gresource-tool.c
770 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
771 gresource_LDADD = libgio-2.0.la \
772 $(top_builddir)/gobject/libgobject-2.0.la \
773 $(top_builddir)/glib/libglib-2.0.la \
776 # ------------------------------------------------------------------------
778 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
779 files='$(BUILT_EXTRA_DIST)'; \
780 for f in $$files; do \
781 if test -f $$f; then d=.; else d=$(srcdir); fi; \
782 cp $$d/$$f $(distdir) || exit 1; done
784 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
785 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
787 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
788 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
791 done | sort -u >libgio.sourcefiles
792 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
793 rm libgio.sourcefiles
795 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
796 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
798 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
799 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
802 done | sort -u >libgio.vs10.sourcefiles
803 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
804 rm libgio.vs10.sourcefiles
806 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
807 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
809 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
810 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
813 done | sort -u >libgio.vs10.sourcefiles.filters
814 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
815 rm libgio.vs10.sourcefiles.filters
817 if HAVE_GLIB_RUNTIME_LIBDIR
819 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
820 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
821 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
822 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
823 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so