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 \
157 application_sources = \
159 gapplicationcommandline.c \
160 gapplicationimpl-dbus.c \
165 gsimpleactiongroup.c \
166 gremoteactiongroup.c \
167 gactiongroupexporter.c \
168 gdbusactiongroup-private.h \
181 glocaldirectorymonitor.c \
182 glocaldirectorymonitor.h \
185 glocalfileenumerator.c \
186 glocalfileenumerator.h \
189 glocalfileinputstream.c \
190 glocalfileinputstream.h \
191 glocalfilemonitor.c \
192 glocalfilemonitor.h \
193 glocalfileoutputstream.c \
194 glocalfileoutputstream.h \
195 glocalfileiostream.c \
196 glocalfileiostream.h \
213 platform_libadd += inotify/libinotify.la
214 platform_deps += inotify/libinotify.la
219 platform_libadd += kqueue/libkqueue.la
220 platform_deps += kqueue/libkqueue.la
224 AM_CPPFLAGS += -DHAVE_FEN
226 platform_libadd += fen/libfen.la
227 platform_deps += fen/libfen.la
232 platform_libadd += win32/libgiowin32.la
233 platform_deps += win32/libgiowin32.la
243 appinfo_sources += gdesktopappinfo.c
244 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
245 platform_deps += xdgmime/libxdgmime.la
247 gfiledescriptorbased.c \
249 gunixcredentialsmessage.c \
255 gunixsocketaddress.c \
258 gunixvolumemonitor.c \
259 gunixvolumemonitor.h \
261 gunixoutputstream.c \
263 gcontenttypeprivate.h \
267 giounixincludedir=$(includedir)/gio-unix-2.0/gio
268 giounixinclude_HEADERS = \
270 gfiledescriptorbased.h \
272 gunixcredentialsmessage.h \
277 gunixoutputstream.h \
278 gunixsocketaddress.h \
283 gnetworkmonitornetlink.c \
284 gnetworkmonitornetlink.h \
289 gdbus_daemon_sources = \
292 gdbus-daemon-generated.c \
293 gdbus-daemon-generated.h \
296 win32_actual_sources = \
297 $(gdbus_daemon_sources) \
298 gcontenttype-win32.c \
301 gwin32volumemonitor.c \
302 gwin32volumemonitor.h \
303 gwin32inputstream.c \
304 gwin32outputstream.c \
305 gwin32outputstream.h \
308 win32_more_sources_for_vcproj = \
310 gregistrysettingsbackend.c \
311 win32/gwin32directorymonitor.c \
312 win32/gwinhttpfile.c \
313 win32/gwinhttpfileinputstream.c \
314 win32/gwinhttpfileoutputstream.c \
318 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
319 platform_libadd += -lshlwapi -lws2_32 -ldnsapi -liphlpapi
320 win32_sources = $(win32_actual_sources)
322 giowin32includedir=$(includedir)/gio-win32-2.0/gio
323 giowin32include_HEADERS = \
324 gwin32inputstream.h \
325 gwin32outputstream.h \
330 libgio_2_0_la_SOURCES = \
336 gbufferedinputstream.c \
337 gbufferedoutputstream.c \
340 gcharsetconverter.c \
342 gconverterinputstream.c \
343 gconverteroutputstream.c \
346 gdataoutputstream.c \
350 gdummyproxyresolver.c \
351 gdummyproxyresolver.h \
360 gfileattribute-priv.h \
367 gfilenamecompleter.c \
368 gfileoutputstream.c \
370 gfilterinputstream.c \
371 gfilteroutputstream.c \
375 ginetsocketaddress.c \
386 gmemoryinputstream.c \
387 gmemoryoutputstream.c \
389 gnativevolumemonitor.c \
390 gnativevolumemonitor.h \
393 gnetworkingprivate.h \
395 gnetworkmonitorbase.c \
396 gnetworkmonitorbase.h \
400 gpollableinputstream.c \
401 gpollableoutputstream.c \
407 gproxyaddressenumerator.c \
414 gsimpleasyncresult.c \
415 gsimplepermission.c \
418 gsocketaddressenumerator.c \
420 gsocketconnectable.c \
421 gsocketconnection.c \
422 gsocketcontrolmessage.c \
423 gsocketinputstream.c \
424 gsocketinputstream.h \
426 gsocketoutputstream.c \
427 gsocketoutputstream.h \
430 gsimpleproxyresolver.c \
433 gtcpwrapperconnection.c \
434 gthreadedsocketservice.c\
436 gthreadedresolver.c \
437 gthreadedresolver.h \
440 gtlsclientconnection.c \
446 gtlsserverconnection.c \
447 gunionvolumemonitor.c \
448 gunionvolumemonitor.h \
453 gzlibdecompressor.c \
460 $(application_sources) \
461 $(settings_sources) \
466 EXTRA_DIST += strinfo.c
468 libgio_2_0_la_LIBADD = \
469 $(top_builddir)/glib/libglib-2.0.la \
470 $(top_builddir)/gobject/libgobject-2.0.la \
471 $(top_builddir)/gmodule/libgmodule-2.0.la \
480 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
483 no_undefined = -no-undefined
486 if OS_WIN32_AND_DLL_COMPILATION
487 gio_win32_res = gio-win32-res.o
488 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
491 install-data-local: install-ms-lib
492 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
494 uninstall-local: uninstall-ms-lib
496 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
497 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
498 $(gio_win32_res_ldflag) \
499 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
500 -export-dynamic $(no_undefined)
503 # This is dumb. The ObjC source file should be properly named .m
504 libgio_2_0_la_CFLAGS += -xobjective-c
505 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
508 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
510 gio-win32-res.o: gio.rc
517 gbufferedinputstream.h \
518 gbufferedoutputstream.h \
522 gcharsetconverter.h \
524 gconverterinputstream.h \
525 gconverteroutputstream.h \
527 gdataoutputstream.h \
538 gfilenamecompleter.h \
539 gfileoutputstream.h \
541 gfilterinputstream.h \
542 gfilteroutputstream.h \
546 ginetsocketaddress.h \
558 gmemoryinputstream.h \
559 gmemoryoutputstream.h \
561 gnativevolumemonitor.h \
568 gpollableinputstream.h \
569 gpollableoutputstream.h \
573 gproxyaddressenumerator.h \
578 gsimpleasyncresult.h \
579 gsimplepermission.h \
582 gsocketaddressenumerator.h \
584 gsocketconnectable.h \
585 gsocketconnection.h \
586 gsocketcontrolmessage.h \
590 gsimpleproxyresolver.h \
593 gtcpwrapperconnection.h \
594 gthreadedsocketservice.h\
598 gtlsclientconnection.h \
604 gtlsserverconnection.h \
609 gzlibdecompressor.h \
610 $(application_headers) \
611 $(settings_headers) \
615 gioincludedir=$(includedir)/glib-2.0/gio/
616 gioinclude_HEADERS = \
620 # these sources (also mentioned above) are generated.
622 gconstructor_as_data.h \
625 gdbus-daemon-generated.c \
626 gdbus-daemon-generated.h \
632 gioenumtypes.h.template \
633 gioenumtypes.c.template \
637 gconstructor_as_data.h \
638 gnetworking.h.win32 \
641 BUILT_EXTRA_DIST += \
644 # This is read by gobject-introspection/misc/ and gtk-doc
645 gio-public-headers.txt: Makefile
646 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
648 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
655 all-local: gio-public-headers.txt
657 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
658 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
659 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
661 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
662 $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
663 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
665 gio-2.0.lib: libgio-2.0.la gio.def
666 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
668 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
670 glib_compile_resources_LDADD = \
671 $(top_builddir)/glib/libglib-2.0.la \
672 $(top_builddir)/gobject/libgobject-2.0.la \
675 glib_compile_resources_SOURCES = \
677 gvdb/gvdb-builder.h \
678 gvdb/gvdb-builder.c \
679 glib-compile-resources.c
681 gio_querymodules_SOURCES = gio-querymodules.c
682 gio_querymodules_LDADD = \
683 $(top_builddir)/glib/libglib-2.0.la \
684 $(top_builddir)/gobject/libgobject-2.0.la \
685 $(top_builddir)/gmodule/libgmodule-2.0.la \
689 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
690 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
692 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
693 glib_compile_schemas_SOURCES = \
694 gconstructor_as_data.h \
696 gvdb/gvdb-builder.h \
697 gvdb/gvdb-builder.c \
698 glib-compile-schemas.c
701 $(top_builddir)/glib/libglib-2.0.la \
702 $(top_builddir)/gobject/libgobject-2.0.la \
704 gsettings_SOURCES = gsettings-tool.c
706 schemadir = $(datadir)/glib-2.0/schemas
707 dist_schema_DATA = gschema.dtd
709 # ------------------------------------------------------------------------
712 bin_PROGRAMS += gdbus
713 gdbus_SOURCES = gdbus-tool.c
714 gdbus_LDADD = libgio-2.0.la \
715 $(top_builddir)/glib/libglib-2.0.la \
716 $(top_builddir)/gobject/libgobject-2.0.la
718 completiondir = $(datadir)/bash-completion/completions
721 completion/gsettings \
723 EXTRA_DIST += $(completion_DATA)
725 # ------------------------------------------------------------------------
728 bin_PROGRAMS += gresource
729 gresource_SOURCES = gresource-tool.c
730 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
731 gresource_LDADD = libgio-2.0.la \
732 $(top_builddir)/glib/libglib-2.0.la \
733 $(top_builddir)/gobject/libgobject-2.0.la \
736 # ------------------------------------------------------------------------
738 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
739 files='$(BUILT_EXTRA_DIST)'; \
740 for f in $$files; do \
741 if test -f $$f; then d=.; else d=$(srcdir); fi; \
742 cp $$d/$$f $(distdir) || exit 1; done
744 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
745 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
747 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
748 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
751 done | sort -u >libgio.sourcefiles
752 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
753 rm libgio.sourcefiles
755 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
756 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
758 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
759 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
762 done | sort -u >libgio.vs10.sourcefiles
763 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
764 rm libgio.vs10.sourcefiles
766 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
767 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
769 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c|gcontenttype.c) ;; \
770 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
773 done | sort -u >libgio.vs10.sourcefiles.filters
774 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
775 rm libgio.vs10.sourcefiles.filters
777 if HAVE_GLIB_RUNTIME_LIBDIR
779 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
780 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
781 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
782 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
783 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so