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 \
156 application_sources = \
158 gapplicationcommandline.c \
159 gapplicationimpl-dbus.c \
164 gsimpleactiongroup.c \
165 gremoteactiongroup.c \
166 gactiongroupexporter.c \
167 gdbusactiongroup-private.h \
179 glocaldirectorymonitor.c \
180 glocaldirectorymonitor.h \
183 glocalfileenumerator.c \
184 glocalfileenumerator.h \
187 glocalfileinputstream.c \
188 glocalfileinputstream.h \
189 glocalfilemonitor.c \
190 glocalfilemonitor.h \
191 glocalfileoutputstream.c \
192 glocalfileoutputstream.h \
193 glocalfileiostream.c \
194 glocalfileiostream.h \
211 platform_libadd += inotify/libinotify.la
212 platform_deps += inotify/libinotify.la
217 platform_libadd += kqueue/libkqueue.la
218 platform_deps += kqueue/libkqueue.la
222 AM_CPPFLAGS += -DHAVE_FEN
224 platform_libadd += fen/libfen.la
225 platform_deps += fen/libfen.la
230 platform_libadd += win32/libgiowin32.la
231 platform_deps += win32/libgiowin32.la
241 appinfo_sources += gdesktopappinfo.c
242 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
243 platform_deps += xdgmime/libxdgmime.la
245 gfiledescriptorbased.c \
247 gunixcredentialsmessage.c \
253 gunixsocketaddress.c \
256 gunixvolumemonitor.c \
257 gunixvolumemonitor.h \
259 gunixoutputstream.c \
261 gcontenttypeprivate.h \
265 giounixincludedir=$(includedir)/gio-unix-2.0/gio
266 giounixinclude_HEADERS = \
268 gfiledescriptorbased.h \
270 gunixcredentialsmessage.h \
275 gunixoutputstream.h \
276 gunixsocketaddress.h \
281 gnetworkmonitornetlink.c \
282 gnetworkmonitornetlink.h \
287 gdbus_daemon_sources = \
290 gdbus-daemon-generated.c \
291 gdbus-daemon-generated.h \
294 win32_actual_sources = \
295 $(gdbus_daemon_sources) \
296 gcontenttype-win32.c \
299 gwin32volumemonitor.c \
300 gwin32volumemonitor.h \
301 gwin32inputstream.c \
302 gwin32outputstream.c \
303 gwin32outputstream.h \
306 win32_more_sources_for_vcproj = \
308 gregistrysettingsbackend.c \
309 win32/gwin32directorymonitor.c \
310 win32/gwinhttpfile.c \
311 win32/gwinhttpfileinputstream.c \
312 win32/gwinhttpfileoutputstream.c \
316 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
317 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
318 win32_sources = $(win32_actual_sources)
320 giowin32includedir=$(includedir)/gio-win32-2.0/gio
321 giowin32include_HEADERS = \
322 gwin32inputstream.h \
323 gwin32outputstream.h \
328 libgio_2_0_la_SOURCES = \
334 gbufferedinputstream.c \
335 gbufferedoutputstream.c \
338 gcharsetconverter.c \
340 gconverterinputstream.c \
341 gconverteroutputstream.c \
344 gdataoutputstream.c \
348 gdummyproxyresolver.c \
349 gdummyproxyresolver.h \
358 gfileattribute-priv.h \
365 gfilenamecompleter.c \
366 gfileoutputstream.c \
368 gfilterinputstream.c \
369 gfilteroutputstream.c \
373 ginetsocketaddress.c \
384 gmemoryinputstream.c \
385 gmemoryoutputstream.c \
387 gnativevolumemonitor.c \
388 gnativevolumemonitor.h \
391 gnetworkingprivate.h \
393 gnetworkmonitorbase.c \
394 gnetworkmonitorbase.h \
398 gpollableinputstream.c \
399 gpollableoutputstream.c \
405 gproxyaddressenumerator.c \
412 gsimpleasyncresult.c \
413 gsimplepermission.c \
416 gsocketaddressenumerator.c \
418 gsocketconnectable.c \
419 gsocketconnection.c \
420 gsocketcontrolmessage.c \
421 gsocketinputstream.c \
422 gsocketinputstream.h \
424 gsocketoutputstream.c \
425 gsocketoutputstream.h \
428 gsimpleproxyresolver.c \
431 gtcpwrapperconnection.c \
432 gthreadedsocketservice.c\
434 gthreadedresolver.c \
435 gthreadedresolver.h \
438 gtlsclientconnection.c \
444 gtlsserverconnection.c \
445 gunionvolumemonitor.c \
446 gunionvolumemonitor.h \
451 gzlibdecompressor.c \
458 $(application_sources) \
459 $(settings_sources) \
464 EXTRA_DIST += strinfo.c
466 libgio_2_0_la_LIBADD = \
467 $(top_builddir)/glib/libglib-2.0.la \
468 $(top_builddir)/gobject/libgobject-2.0.la \
469 $(top_builddir)/gmodule/libgmodule-2.0.la \
478 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
481 no_undefined = -no-undefined
484 if OS_WIN32_AND_DLL_COMPILATION
485 gio_win32_res = gio-win32-res.o
486 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
489 install-data-local: install-ms-lib
490 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
492 uninstall-local: uninstall-ms-lib
494 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
495 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
496 $(gio_win32_res_ldflag) \
497 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
498 -export-dynamic $(no_undefined)
501 # This is dumb. The ObjC source file should be properly named .m
502 libgio_2_0_la_CFLAGS += -xobjective-c
503 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
506 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
508 gio-win32-res.o: gio.rc
515 gbufferedinputstream.h \
516 gbufferedoutputstream.h \
520 gcharsetconverter.h \
522 gconverterinputstream.h \
523 gconverteroutputstream.h \
525 gdataoutputstream.h \
536 gfilenamecompleter.h \
537 gfileoutputstream.h \
539 gfilterinputstream.h \
540 gfilteroutputstream.h \
544 ginetsocketaddress.h \
556 gmemoryinputstream.h \
557 gmemoryoutputstream.h \
559 gnativevolumemonitor.h \
566 gpollableinputstream.h \
567 gpollableoutputstream.h \
571 gproxyaddressenumerator.h \
576 gsimpleasyncresult.h \
577 gsimplepermission.h \
580 gsocketaddressenumerator.h \
582 gsocketconnectable.h \
583 gsocketconnection.h \
584 gsocketcontrolmessage.h \
588 gsimpleproxyresolver.h \
591 gtcpwrapperconnection.h \
592 gthreadedsocketservice.h\
596 gtlsclientconnection.h \
602 gtlsserverconnection.h \
607 gzlibdecompressor.h \
608 $(application_headers) \
609 $(settings_headers) \
613 gioincludedir=$(includedir)/glib-2.0/gio/
614 gioinclude_HEADERS = \
618 # these sources (also mentioned above) are generated.
620 gconstructor_as_data.h \
623 gdbus-daemon-generated.c \
624 gdbus-daemon-generated.h \
630 gioenumtypes.h.template \
631 gioenumtypes.c.template \
635 gconstructor_as_data.h \
636 gnetworking.h.win32 \
639 BUILT_EXTRA_DIST += \
642 # This is read by gobject-introspection/misc/ and gtk-doc
643 gio-public-headers.txt: Makefile
644 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
646 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
653 all-local: gio-public-headers.txt
655 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
656 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
657 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
659 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
660 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
661 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
663 gio-2.0.lib: libgio-2.0.la gio.def
664 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
666 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
668 glib_compile_resources_LDADD = \
669 $(top_builddir)/glib/libglib-2.0.la \
670 $(top_builddir)/gobject/libgobject-2.0.la \
673 glib_compile_resources_SOURCES = \
675 gvdb/gvdb-builder.h \
676 gvdb/gvdb-builder.c \
677 glib-compile-resources.c
679 gio_querymodules_SOURCES = gio-querymodules.c
680 gio_querymodules_LDADD = \
681 $(top_builddir)/glib/libglib-2.0.la \
682 $(top_builddir)/gobject/libgobject-2.0.la \
683 $(top_builddir)/gmodule/libgmodule-2.0.la \
687 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
688 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
690 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
691 glib_compile_schemas_SOURCES = \
692 gconstructor_as_data.h \
694 gvdb/gvdb-builder.h \
695 gvdb/gvdb-builder.c \
696 glib-compile-schemas.c
699 $(top_builddir)/glib/libglib-2.0.la \
700 $(top_builddir)/gobject/libgobject-2.0.la \
702 gsettings_SOURCES = gsettings-tool.c
704 schemadir = $(datadir)/glib-2.0/schemas
705 dist_schema_DATA = gschema.dtd
707 # ------------------------------------------------------------------------
710 bin_PROGRAMS += gdbus
711 gdbus_SOURCES = gdbus-tool.c
712 gdbus_LDADD = libgio-2.0.la \
713 $(top_builddir)/glib/libglib-2.0.la \
714 $(top_builddir)/gobject/libgobject-2.0.la
716 completiondir = $(datadir)/bash-completion/completions
719 completion/gsettings \
721 EXTRA_DIST += $(completion_DATA)
723 # ------------------------------------------------------------------------
726 bin_PROGRAMS += gresource
727 gresource_SOURCES = gresource-tool.c
728 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
729 gresource_LDADD = libgio-2.0.la \
730 $(top_builddir)/glib/libglib-2.0.la \
731 $(top_builddir)/gobject/libgobject-2.0.la \
734 # ------------------------------------------------------------------------
736 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
737 files='$(BUILT_EXTRA_DIST)'; \
738 for f in $$files; do \
739 if test -f $$f; then d=.; else d=$(srcdir); fi; \
740 cp $$d/$$f $(distdir) || exit 1; done
742 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
743 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
745 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
746 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
749 done | sort -u >libgio.sourcefiles
750 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
751 rm libgio.sourcefiles
753 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
754 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
756 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
757 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
760 done | sort -u >libgio.vs10.sourcefiles
761 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
762 rm libgio.vs10.sourcefiles
764 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
765 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
767 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
768 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
771 done | sort -u >libgio.vs10.sourcefiles.filters
772 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
773 rm libgio.vs10.sourcefiles.filters
775 if HAVE_GLIB_RUNTIME_LIBDIR
777 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
778 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
779 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
780 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
781 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so