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 $(RESOLVER_LIBADD)
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 = \
345 gbufferedinputstream.c \
346 gbufferedoutputstream.c \
349 gcharsetconverter.c \
351 gconverterinputstream.c \
352 gconverteroutputstream.c \
354 gcredentialsprivate.h \
356 gdataoutputstream.c \
360 gdummyproxyresolver.c \
361 gdummyproxyresolver.h \
370 gfileattribute-priv.h \
377 gfilenamecompleter.c \
378 gfileoutputstream.c \
380 gfilterinputstream.c \
381 gfilteroutputstream.c \
385 ginetsocketaddress.c \
398 gmemoryinputstream.c \
399 gmemoryoutputstream.c \
401 gnativevolumemonitor.c \
402 gnativevolumemonitor.h \
405 gnetworkingprivate.h \
407 gnetworkmonitorbase.c \
408 gnetworkmonitorbase.h \
412 gpollableinputstream.c \
413 gpollableoutputstream.c \
419 gproxyaddressenumerator.c \
426 gsimpleasyncresult.c \
427 gsimplepermission.c \
430 gsocketaddressenumerator.c \
432 gsocketconnectable.c \
433 gsocketconnection.c \
434 gsocketcontrolmessage.c \
435 gsocketinputstream.c \
436 gsocketinputstream.h \
438 gsocketoutputstream.c \
439 gsocketoutputstream.h \
440 gsubprocesslauncher.c \
442 gsubprocesslauncher-private.h \
445 gsimpleproxyresolver.c \
448 gtcpwrapperconnection.c \
449 gthreadedsocketservice.c\
451 gthreadedresolver.c \
452 gthreadedresolver.h \
455 gtlsclientconnection.c \
461 gtlsserverconnection.c \
462 gunionvolumemonitor.c \
463 gunionvolumemonitor.h \
468 gzlibdecompressor.c \
475 $(application_sources) \
476 $(settings_sources) \
481 EXTRA_DIST += strinfo.c
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 \
495 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
498 no_undefined = -no-undefined
501 if OS_WIN32_AND_DLL_COMPILATION
502 gio_win32_res = gio-win32-res.o
503 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
506 install-data-local: install-ms-lib
507 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
509 uninstall-local: uninstall-ms-lib
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)
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
523 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
525 gio-win32-res.o: gio.rc
532 gbufferedinputstream.h \
533 gbufferedoutputstream.h \
537 gcharsetconverter.h \
539 gconverterinputstream.h \
540 gconverteroutputstream.h \
542 gdataoutputstream.h \
553 gfilenamecompleter.h \
554 gfileoutputstream.h \
556 gfilterinputstream.h \
557 gfilteroutputstream.h \
561 ginetsocketaddress.h \
573 gmemoryinputstream.h \
574 gmemoryoutputstream.h \
576 gnativevolumemonitor.h \
582 gpollableinputstream.h \
583 gpollableoutputstream.h \
587 gproxyaddressenumerator.h \
592 gsimpleasyncresult.h \
593 gsimplepermission.h \
596 gsocketaddressenumerator.h \
598 gsocketconnectable.h \
599 gsocketconnection.h \
600 gsocketcontrolmessage.h \
604 gsimpleproxyresolver.h \
607 gsubprocesslauncher.h \
609 gtcpwrapperconnection.h \
610 gthreadedsocketservice.h\
614 gtlsclientconnection.h \
620 gtlsserverconnection.h \
625 gzlibdecompressor.h \
626 $(application_headers) \
627 $(settings_headers) \
631 gioincludedir=$(includedir)/glib-2.0/gio/
632 gioinclude_HEADERS = \
636 nodist_gioinclude_HEADERS = \
640 # these sources (also mentioned above) are generated.
642 gconstructor_as_data.h \
645 gdbus-daemon-generated.c \
646 gdbus-daemon-generated.h \
652 gioenumtypes.h.template \
653 gioenumtypes.c.template \
657 gconstructor_as_data.h \
658 gnetworking.h.win32 \
661 BUILT_EXTRA_DIST += \
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 $@
668 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
675 all-local: gio-public-headers.txt
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
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
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:$@
688 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
690 glib_compile_resources_LDADD = \
691 $(top_builddir)/glib/libglib-2.0.la \
692 $(top_builddir)/gobject/libgobject-2.0.la \
695 glib_compile_resources_SOURCES = \
697 gvdb/gvdb-builder.h \
698 gvdb/gvdb-builder.c \
699 glib-compile-resources.c
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 \
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 $@
712 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
713 glib_compile_schemas_SOURCES = \
714 gconstructor_as_data.h \
716 gvdb/gvdb-builder.h \
717 gvdb/gvdb-builder.c \
718 glib-compile-schemas.c
721 $(top_builddir)/glib/libglib-2.0.la \
722 $(top_builddir)/gobject/libgobject-2.0.la \
724 gsettings_SOURCES = gsettings-tool.c
726 schemadir = $(datadir)/glib-2.0/schemas
727 dist_schema_DATA = gschema.dtd
729 # ------------------------------------------------------------------------
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
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
748 completiondir = $(datadir)/bash-completion/completions
750 completion/gapplication \
752 completion/gsettings \
754 EXTRA_DIST += $(completion_DATA)
756 # ------------------------------------------------------------------------
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 \
767 # ------------------------------------------------------------------------
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
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 \
778 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
779 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
782 done | sort -u >libgio.sourcefiles
783 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
784 rm libgio.sourcefiles
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 \
789 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
790 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
793 done | sort -u >libgio.vs10.sourcefiles
794 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
795 rm libgio.vs10.sourcefiles
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 \
800 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
801 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
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
808 if HAVE_GLIB_RUNTIME_LIBDIR
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