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 \
399 gmemoryinputstream.c \
400 gmemoryoutputstream.c \
402 gnativevolumemonitor.c \
403 gnativevolumemonitor.h \
406 gnetworkingprivate.h \
408 gnetworkmonitorbase.c \
409 gnetworkmonitorbase.h \
413 gpollableinputstream.c \
414 gpollableoutputstream.c \
420 gproxyaddressenumerator.c \
427 gsimpleasyncresult.c \
428 gsimplepermission.c \
431 gsocketaddressenumerator.c \
433 gsocketconnectable.c \
434 gsocketconnection.c \
435 gsocketcontrolmessage.c \
436 gsocketinputstream.c \
437 gsocketinputstream.h \
439 gsocketoutputstream.c \
440 gsocketoutputstream.h \
441 gsubprocesslauncher.c \
443 gsubprocesslauncher-private.h \
446 gsimpleproxyresolver.c \
449 gtcpwrapperconnection.c \
450 gthreadedsocketservice.c\
452 gthreadedresolver.c \
453 gthreadedresolver.h \
456 gtlsclientconnection.c \
462 gtlsserverconnection.c \
463 gunionvolumemonitor.c \
464 gunionvolumemonitor.h \
469 gzlibdecompressor.c \
476 $(application_sources) \
477 $(settings_sources) \
482 EXTRA_DIST += strinfo.c
484 libgio_2_0_la_LIBADD = \
485 $(top_builddir)/gobject/libgobject-2.0.la \
486 $(top_builddir)/gmodule/libgmodule-2.0.la \
487 $(top_builddir)/glib/libglib-2.0.la \
496 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
499 no_undefined = -no-undefined
502 if OS_WIN32_AND_DLL_COMPILATION
503 gio_win32_res = gio-win32-res.o
504 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
507 install-data-local: install-ms-lib
508 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
510 uninstall-local: uninstall-ms-lib
512 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
513 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
514 $(gio_win32_res_ldflag) \
515 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
516 -export-dynamic $(no_undefined)
519 # This is dumb. The ObjC source file should be properly named .m
520 libgio_2_0_la_CFLAGS += -xobjective-c
521 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
524 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
526 gio-win32-res.o: gio.rc
533 gbufferedinputstream.h \
534 gbufferedoutputstream.h \
538 gcharsetconverter.h \
540 gconverterinputstream.h \
541 gconverteroutputstream.h \
543 gdataoutputstream.h \
554 gfilenamecompleter.h \
555 gfileoutputstream.h \
557 gfilterinputstream.h \
558 gfilteroutputstream.h \
562 ginetsocketaddress.h \
574 gmemoryinputstream.h \
575 gmemoryoutputstream.h \
577 gnativevolumemonitor.h \
583 gpollableinputstream.h \
584 gpollableoutputstream.h \
588 gproxyaddressenumerator.h \
593 gsimpleasyncresult.h \
594 gsimplepermission.h \
597 gsocketaddressenumerator.h \
599 gsocketconnectable.h \
600 gsocketconnection.h \
601 gsocketcontrolmessage.h \
605 gsimpleproxyresolver.h \
608 gsubprocesslauncher.h \
610 gtcpwrapperconnection.h \
611 gthreadedsocketservice.h\
615 gtlsclientconnection.h \
621 gtlsserverconnection.h \
626 gzlibdecompressor.h \
627 $(application_headers) \
628 $(settings_headers) \
632 gioincludedir=$(includedir)/glib-2.0/gio/
633 gioinclude_HEADERS = \
637 nodist_gioinclude_HEADERS = \
641 # these sources (also mentioned above) are generated.
643 gconstructor_as_data.h \
646 gdbus-daemon-generated.c \
647 gdbus-daemon-generated.h \
653 gioenumtypes.h.template \
654 gioenumtypes.c.template \
658 gconstructor_as_data.h \
659 gnetworking.h.win32 \
662 BUILT_EXTRA_DIST += \
665 # This is read by gobject-introspection/misc/ and gtk-doc
666 gio-public-headers.txt: Makefile
667 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
669 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
676 all-local: gio-public-headers.txt
678 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
679 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
680 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
682 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
683 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
684 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
686 gio-2.0.lib: libgio-2.0.la gio.def
687 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
689 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
691 glib_compile_resources_LDADD = libgio-2.0.la \
692 $(top_builddir)/gobject/libgobject-2.0.la \
693 $(top_builddir)/glib/libglib-2.0.la \
696 glib_compile_resources_SOURCES = \
698 gvdb/gvdb-builder.h \
699 gvdb/gvdb-builder.c \
700 glib-compile-resources.c
702 gio_querymodules_SOURCES = gio-querymodules.c
703 gio_querymodules_LDADD = libgio-2.0.la \
704 $(top_builddir)/gobject/libgobject-2.0.la \
705 $(top_builddir)/gmodule/libgmodule-2.0.la \
706 $(top_builddir)/glib/libglib-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
720 gsettings_LDADD = libgio-2.0.la \
721 $(top_builddir)/gobject/libgobject-2.0.la \
722 $(top_builddir)/glib/libglib-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)/gobject/libgobject-2.0.la \
736 $(top_builddir)/glib/libglib-2.0.la \
740 # ------------------------------------------------------------------------
741 # gapplication(1) tool
742 bin_PROGRAMS += gapplication
743 gapplication_SOURCES = gapplication-tool.c
744 gapplication_LDADD = libgio-2.0.la \
745 $(top_builddir)/gobject/libgobject-2.0.la \
746 $(top_builddir)/glib/libglib-2.0.la \
750 completiondir = $(datadir)/bash-completion/completions
752 completion/gapplication \
754 completion/gsettings \
756 EXTRA_DIST += $(completion_DATA)
758 # ------------------------------------------------------------------------
761 bin_PROGRAMS += gresource
762 gresource_SOURCES = gresource-tool.c
763 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
764 gresource_LDADD = libgio-2.0.la \
765 $(top_builddir)/gobject/libgobject-2.0.la \
766 $(top_builddir)/glib/libglib-2.0.la \
769 # ------------------------------------------------------------------------
771 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
772 files='$(BUILT_EXTRA_DIST)'; \
773 for f in $$files; do \
774 if test -f $$f; then d=.; else d=$(srcdir); fi; \
775 cp $$d/$$f $(distdir) || exit 1; done
777 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
778 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
780 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
781 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
784 done | sort -u >libgio.sourcefiles
785 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
786 rm libgio.sourcefiles
788 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
789 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
791 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
792 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
795 done | sort -u >libgio.vs10.sourcefiles
796 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
797 rm libgio.vs10.sourcefiles
799 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
800 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
802 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
803 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
806 done | sort -u >libgio.vs10.sourcefiles.filters
807 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
808 rm libgio.vs10.sourcefiles.filters
810 if HAVE_GLIB_RUNTIME_LIBDIR
812 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
813 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
814 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
815 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
816 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so