1 include $(top_srcdir)/Makefile.decl
5 SUBDIRS = gdbus-2.0/codegen
11 if OS_WIN32_AND_DLL_COMPILATION
13 noinst_DATA = gio-2.0.lib
15 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
16 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
24 $(uninstall_ms_lib_cmd)
27 if HAVE_GNUC_VISIBILITY
33 -DG_LOG_DOMAIN=\"GLib-GIO\" \
37 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
39 lib_LTLIBRARIES = libgio-2.0.la
52 gdbusintrospection.h \
53 gdbusmethodinvocation.h \
56 gdbusinterfaceskeleton.h \
58 gdbusobjectskeleton.h \
60 gdbusobjectmanager.h \
61 gdbusobjectmanagerclient.h \
62 gdbusobjectmanagerserver.h \
67 gdbusutils.h gdbusutils.c \
68 gdbusaddress.h gdbusaddress.c \
69 gdbusauthobserver.h gdbusauthobserver.c \
70 gdbusauth.h gdbusauth.c \
71 gdbusauthmechanism.h gdbusauthmechanism.c \
72 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
73 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
74 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
75 gdbuserror.h gdbuserror.c \
76 gdbusconnection.h gdbusconnection.c \
77 gdbusmessage.h gdbusmessage.c \
78 gdbusnameowning.h gdbusnameowning.c \
79 gdbusnamewatching.h gdbusnamewatching.c \
80 gdbusproxy.h gdbusproxy.c \
81 gdbusprivate.h gdbusprivate.c \
82 gdbusintrospection.h gdbusintrospection.c \
83 gdbusmethodinvocation.h gdbusmethodinvocation.c \
84 gdbusserver.h gdbusserver.c \
85 gdbusinterface.h gdbusinterface.c \
86 gdbusinterfaceskeleton.h gdbusinterfaceskeleton.c \
87 gdbusobject.h gdbusobject.c \
88 gdbusobjectskeleton.h gdbusobjectskeleton.c \
89 gdbusobjectproxy.h gdbusobjectproxy.c \
90 gdbusobjectmanager.h gdbusobjectmanager.c \
91 gdbusobjectmanagerclient.h gdbusobjectmanagerclient.c \
92 gdbusobjectmanagerserver.h gdbusobjectmanagerserver.c \
93 gtestdbus.h gtestdbus.c \
96 # These are not built into the library yet
97 EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h dbus-daemon.xml
99 gdbus-daemon-generated.h gdbus-daemon-generated.c: $(srcdir)/dbus-daemon.xml $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in
100 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
101 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
102 $(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in \
103 --interface-prefix org. \
104 --generate-c-code gdbus-daemon-generated \
106 $(srcdir)/dbus-daemon.xml \
118 gdelayedsettingsbackend.h \
119 gdelayedsettingsbackend.c \
120 gkeyfilesettingsbackend.c \
121 gmemorysettingsbackend.c \
122 gnullsettingsbackend.c \
123 gsettingsbackendinternal.h \
126 gsettingsschema-internal.h \
128 gsettings-mapping.h \
129 gsettings-mapping.c \
133 settings_sources += \
134 gregistrysettingsbackend.h \
135 gregistrysettingsbackend.c
139 settings_sources += \
140 gnextstepsettingsbackend.c
143 application_headers = \
145 gapplicationcommandline.h \
149 gsimpleactiongroup.h \
150 gremoteactiongroup.h \
151 gactiongroupexporter.h \
162 application_sources = \
164 gapplicationcommandline.c \
165 gapplicationimpl-dbus.c \
170 gsimpleactiongroup.c \
171 gremoteactiongroup.c \
172 gactiongroupexporter.c \
173 gdbusactiongroup-private.h \
185 glocaldirectorymonitor.c \
186 glocaldirectorymonitor.h \
189 glocalfileenumerator.c \
190 glocalfileenumerator.h \
193 glocalfileinputstream.c \
194 glocalfileinputstream.h \
195 glocalfilemonitor.c \
196 glocalfilemonitor.h \
197 glocalfileoutputstream.c \
198 glocalfileoutputstream.h \
199 glocalfileiostream.c \
200 glocalfileiostream.h \
217 platform_libadd += inotify/libinotify.la
218 platform_deps += inotify/libinotify.la
223 platform_libadd += kqueue/libkqueue.la
224 platform_deps += kqueue/libkqueue.la
228 AM_CPPFLAGS += -DHAVE_FEN
230 platform_libadd += fen/libfen.la
231 platform_deps += fen/libfen.la
236 platform_libadd += win32/libgiowin32.la
237 platform_deps += win32/libgiowin32.la
247 appinfo_sources += gdesktopappinfo.c
248 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
249 platform_deps += xdgmime/libxdgmime.la
251 gfiledescriptorbased.c \
253 gunixcredentialsmessage.c \
259 gunixsocketaddress.c \
262 gunixvolumemonitor.c \
263 gunixvolumemonitor.h \
265 gunixoutputstream.c \
267 gcontenttypeprivate.h \
271 giounixincludedir=$(includedir)/gio-unix-2.0/gio
272 giounixinclude_HEADERS = \
274 gfiledescriptorbased.h \
276 gunixcredentialsmessage.h \
281 gunixoutputstream.h \
282 gunixsocketaddress.h \
287 gnetworkmonitornetlink.c \
288 gnetworkmonitornetlink.h \
293 gdbus_daemon_sources = \
296 gdbus-daemon-generated.c \
297 gdbus-daemon-generated.h \
300 win32_actual_sources = \
301 $(gdbus_daemon_sources) \
302 gcontenttype-win32.c \
305 gwin32volumemonitor.c \
306 gwin32volumemonitor.h \
307 gwin32inputstream.c \
308 gwin32outputstream.c \
309 gwin32outputstream.h \
312 win32_more_sources_for_vcproj = \
314 gregistrysettingsbackend.c \
315 win32/gwin32directorymonitor.c \
316 win32/gwinhttpfile.c \
317 win32/gwinhttpfileinputstream.c \
318 win32/gwinhttpfileoutputstream.c \
322 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
323 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
324 win32_sources = $(win32_actual_sources)
326 giowin32includedir=$(includedir)/gio-win32-2.0/gio
327 giowin32include_HEADERS = \
328 gwin32inputstream.h \
329 gwin32outputstream.h \
334 if BUILD_MODULAR_TESTS
338 libgio_2_0_la_SOURCES = \
344 gbufferedinputstream.c \
345 gbufferedoutputstream.c \
347 gcharsetconverter.c \
349 gconverterinputstream.c \
350 gconverteroutputstream.c \
353 gdataoutputstream.c \
357 gdummyproxyresolver.c \
358 gdummyproxyresolver.h \
367 gfileattribute-priv.h \
374 gfilenamecompleter.c \
375 gfileoutputstream.c \
377 gfilterinputstream.c \
378 gfilteroutputstream.c \
382 ginetsocketaddress.c \
393 gmemoryinputstream.c \
394 gmemoryoutputstream.c \
396 gnativevolumemonitor.c \
397 gnativevolumemonitor.h \
400 gnetworkingprivate.h \
402 gnetworkmonitorbase.c \
403 gnetworkmonitorbase.h \
407 gpollableinputstream.c \
408 gpollableoutputstream.c \
418 gsimpleasyncresult.c \
419 gsimplepermission.c \
422 gsocketaddressenumerator.c \
424 gsocketconnectable.c \
425 gsocketconnection.c \
426 gsocketcontrolmessage.c \
427 gsocketinputstream.c \
428 gsocketinputstream.h \
430 gsocketoutputstream.c \
431 gsocketoutputstream.h \
434 gproxyaddressenumerator.c \
439 gtcpwrapperconnection.c \
440 gthreadedsocketservice.c\
442 gthreadedresolver.c \
443 gthreadedresolver.h \
446 gtlsclientconnection.c \
452 gtlsserverconnection.c \
453 gunionvolumemonitor.c \
454 gunionvolumemonitor.h \
459 gzlibdecompressor.c \
466 $(application_sources) \
467 $(settings_sources) \
472 EXTRA_DIST += strinfo.c
474 libgio_2_0_la_LIBADD = \
475 $(top_builddir)/glib/libglib-2.0.la \
476 $(top_builddir)/gobject/libgobject-2.0.la \
477 $(top_builddir)/gmodule/libgmodule-2.0.la \
486 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
489 no_undefined = -no-undefined
492 if OS_WIN32_AND_DLL_COMPILATION
493 gio_win32_res = gio-win32-res.o
494 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
497 install-data-local: install-ms-lib
498 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
500 uninstall-local: uninstall-ms-lib
502 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
503 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
504 $(gio_win32_res_ldflag) \
505 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
506 -export-dynamic $(no_undefined)
509 # This is dumb. The ObjC source file should be properly named .m
510 libgio_2_0_la_CFLAGS += -xobjective-c
511 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
514 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
516 gio-win32-res.o: gio.rc
523 gbufferedinputstream.h \
524 gbufferedoutputstream.h \
527 gcharsetconverter.h \
529 gconverterinputstream.h \
530 gconverteroutputstream.h \
532 gdataoutputstream.h \
543 gfilenamecompleter.h \
544 gfileoutputstream.h \
546 gfilterinputstream.h \
547 gfilteroutputstream.h \
551 ginetsocketaddress.h \
563 gmemoryinputstream.h \
564 gmemoryoutputstream.h \
566 gnativevolumemonitor.h \
573 gpollableinputstream.h \
574 gpollableoutputstream.h \
578 gproxyaddressenumerator.h \
583 gsimpleasyncresult.h \
584 gsimplepermission.h \
587 gsocketaddressenumerator.h \
589 gsocketconnectable.h \
590 gsocketconnection.h \
591 gsocketcontrolmessage.h \
597 gtcpwrapperconnection.h \
598 gthreadedsocketservice.h\
602 gtlsclientconnection.h \
608 gtlsserverconnection.h \
613 gzlibdecompressor.h \
614 $(application_headers) \
615 $(settings_headers) \
619 gioincludedir=$(includedir)/glib-2.0/gio/
620 gioinclude_HEADERS = \
624 # these sources (also mentioned above) are generated.
626 gconstructor_as_data.h \
629 gdbus-daemon-generated.c \
630 gdbus-daemon-generated.h \
637 gioenumtypes.h.template \
638 gioenumtypes.c.template \
643 gconstructor_as_data.h \
644 gnetworking.h.win32 \
650 # This is read by gobject-introspection/misc/ and gtk-doc
651 gio-public-headers.txt: Makefile
652 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
654 CLEANFILES = gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
661 all-local: gio-public-headers.txt
663 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
664 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
665 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
666 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
668 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
669 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
670 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
671 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
673 gio-2.0.lib: libgio-2.0.la gio.def
674 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
676 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
678 glib_compile_resources_LDADD = \
679 $(top_builddir)/glib/libglib-2.0.la \
680 $(top_builddir)/gobject/libgobject-2.0.la \
683 glib_compile_resources_SOURCES = \
685 gvdb/gvdb-builder.h \
686 gvdb/gvdb-builder.c \
687 glib-compile-resources.c
689 gio_querymodules_SOURCES = gio-querymodules.c
690 gio_querymodules_LDADD = \
691 $(top_builddir)/glib/libglib-2.0.la \
692 $(top_builddir)/gobject/libgobject-2.0.la \
693 $(top_builddir)/gmodule/libgmodule-2.0.la \
697 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
698 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
700 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
701 glib_compile_schemas_SOURCES = \
702 gconstructor_as_data.h \
704 gvdb/gvdb-builder.h \
705 gvdb/gvdb-builder.c \
706 glib-compile-schemas.c
709 $(top_builddir)/glib/libglib-2.0.la \
710 $(top_builddir)/gobject/libgobject-2.0.la \
712 gsettings_SOURCES = gsettings-tool.c
714 schemadir = $(datadir)/glib-2.0/schemas
715 dist_schema_DATA = gschema.dtd
717 # ------------------------------------------------------------------------
720 bin_PROGRAMS += gdbus
721 gdbus_SOURCES = gdbus-tool.c
722 gdbus_LDADD = libgio-2.0.la \
723 $(top_builddir)/glib/libglib-2.0.la \
724 $(top_builddir)/gobject/libgobject-2.0.la
726 completiondir = $(datadir)/bash-completion/completions
729 completion/gsettings \
731 EXTRA_DIST += $(completion_DATA)
733 # ------------------------------------------------------------------------
736 bin_PROGRAMS += gresource
737 gresource_SOURCES = gresource-tool.c
738 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
739 gresource_LDADD = libgio-2.0.la \
740 $(top_builddir)/glib/libglib-2.0.la \
741 $(top_builddir)/gobject/libgobject-2.0.la \
744 # ------------------------------------------------------------------------
746 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
747 files='$(BUILT_EXTRA_DIST)'; \
748 for f in $$files; do \
749 if test -f $$f; then d=.; else d=$(srcdir); fi; \
750 cp $$d/$$f $(distdir) || exit 1; done
752 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
753 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
755 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
756 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
759 done | sort -u >libgio.sourcefiles
760 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
761 rm libgio.sourcefiles
763 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
764 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
766 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
767 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
770 done | sort -u >libgio.vs10.sourcefiles
771 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
772 rm libgio.vs10.sourcefiles
774 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
775 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
777 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
778 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
781 done | sort -u >libgio.vs10.sourcefiles.filters
782 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
783 rm libgio.vs10.sourcefiles.filters
785 if HAVE_GLIB_RUNTIME_LIBDIR
787 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
788 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
789 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
790 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
791 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so