1 include $(top_srcdir)/Makefile.decl
6 SUBDIRS = gdbus-2.0/codegen
12 if OS_WIN32_AND_DLL_COMPILATION
14 noinst_DATA = gio-2.0.lib
16 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
17 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
25 $(uninstall_ms_lib_cmd)
28 $(AM_V_GEN) (echo EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > $(builddir)/gio.def.tmp && \
29 mv $(builddir)/gio.def.tmp $(builddir)/gio.def
32 if HAVE_GNUC_VISIBILITY
38 -DG_LOG_DOMAIN=\"GLib-GIO\" \
42 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
44 lib_LTLIBRARIES = libgio-2.0.la
57 gdbusintrospection.h \
58 gdbusmethodinvocation.h \
61 gdbusinterfaceskeleton.h \
63 gdbusobjectskeleton.h \
65 gdbusobjectmanager.h \
66 gdbusobjectmanagerclient.h \
67 gdbusobjectmanagerserver.h \
72 gdbusutils.h gdbusutils.c \
73 gdbusaddress.h gdbusaddress.c \
74 gdbusauthobserver.h gdbusauthobserver.c \
75 gdbusauth.h gdbusauth.c \
76 gdbusauthmechanism.h gdbusauthmechanism.c \
77 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
78 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
79 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
80 gdbuserror.h gdbuserror.c \
81 gdbusconnection.h gdbusconnection.c \
82 gdbusmessage.h gdbusmessage.c \
83 gdbusnameowning.h gdbusnameowning.c \
84 gdbusnamewatching.h gdbusnamewatching.c \
85 gdbusproxy.h gdbusproxy.c \
86 gdbusprivate.h gdbusprivate.c \
87 gdbusintrospection.h gdbusintrospection.c \
88 gdbusmethodinvocation.h gdbusmethodinvocation.c \
89 gdbusserver.h gdbusserver.c \
90 gdbusinterface.h gdbusinterface.c \
91 gdbusinterfaceskeleton.h gdbusinterfaceskeleton.c \
92 gdbusobject.h gdbusobject.c \
93 gdbusobjectskeleton.h gdbusobjectskeleton.c \
94 gdbusobjectproxy.h gdbusobjectproxy.c \
95 gdbusobjectmanager.h gdbusobjectmanager.c \
96 gdbusobjectmanagerclient.h gdbusobjectmanagerclient.c \
97 gdbusobjectmanagerserver.h gdbusobjectmanagerserver.c \
98 gtestdbus.h gtestdbus.c \
101 # These are not built into the library yet
102 EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h
104 gdbus-daemon-generated.h gdbus-daemon-generated.c : dbus-daemon.xml $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in
105 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
106 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
107 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen.in \
108 --interface-prefix org. \
109 --generate-c-code gdbus-daemon-generated \
111 $(srcdir)/dbus-daemon.xml \
123 gdelayedsettingsbackend.h \
124 gdelayedsettingsbackend.c \
125 gkeyfilesettingsbackend.c \
126 gmemorysettingsbackend.c \
127 gnullsettingsbackend.c \
128 gsettingsbackendinternal.h \
131 gsettingsschema-internal.h \
133 gsettings-mapping.h \
134 gsettings-mapping.c \
138 settings_sources += \
139 gregistrysettingsbackend.h \
140 gregistrysettingsbackend.c
144 settings_sources += \
145 gnextstepsettingsbackend.c
148 application_headers = \
150 gapplicationcommandline.h \
154 gsimpleactiongroup.h \
155 gremoteactiongroup.h \
156 gactiongroupexporter.h \
167 application_sources = \
169 gapplicationcommandline.c \
170 gapplicationimpl-dbus.c \
175 gsimpleactiongroup.c \
176 gremoteactiongroup.c \
177 gactiongroupexporter.c \
189 glocaldirectorymonitor.c \
190 glocaldirectorymonitor.h \
193 glocalfileenumerator.c \
194 glocalfileenumerator.h \
197 glocalfileinputstream.c \
198 glocalfileinputstream.h \
199 glocalfilemonitor.c \
200 glocalfilemonitor.h \
201 glocalfileoutputstream.c \
202 glocalfileoutputstream.h \
203 glocalfileiostream.c \
204 glocalfileiostream.h \
221 platform_libadd += inotify/libinotify.la
222 platform_deps += inotify/libinotify.la
226 AM_CPPFLAGS += -DHAVE_FEN
228 platform_libadd += fen/libfen.la
229 platform_deps += fen/libfen.la
234 platform_libadd += win32/libgiowin32.la
235 platform_deps += win32/libgiowin32.la
245 appinfo_sources += gdesktopappinfo.c
246 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
247 platform_deps += xdgmime/libxdgmime.la
249 gfiledescriptorbased.c \
251 gunixcredentialsmessage.c \
257 gunixsocketaddress.c \
260 gunixvolumemonitor.c \
261 gunixvolumemonitor.h \
263 gunixoutputstream.c \
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) \
300 gwin32volumemonitor.c \
301 gwin32volumemonitor.h \
302 gwin32inputstream.c \
303 gwin32outputstream.c \
304 gwin32outputstream.h \
307 win32_more_sources_for_vcproj = \
309 gregistrysettingsbackend.c \
310 win32/gwin32directorymonitor.c \
311 win32/gwinhttpfile.c \
312 win32/gwinhttpfileinputstream.c \
313 win32/gwinhttpfileoutputstream.c \
317 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
318 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
319 win32_sources = $(win32_actual_sources)
321 giowin32includedir=$(includedir)/gio-win32-2.0/gio
322 giowin32include_HEADERS = \
323 gwin32inputstream.h \
324 gwin32outputstream.h \
329 if BUILD_MODULAR_TESTS
332 DIST_SUBDIRS += tests
335 libgio_2_0_la_SOURCES = \
341 gbufferedinputstream.c \
342 gbufferedoutputstream.c \
345 gcontenttypeprivate.h \
346 gcharsetconverter.c \
348 gconverterinputstream.c \
349 gconverteroutputstream.c \
352 gdataoutputstream.c \
356 gdummyproxyresolver.c \
357 gdummyproxyresolver.h \
366 gfileattribute-priv.h \
373 gfilenamecompleter.c \
374 gfileoutputstream.c \
376 gfilterinputstream.c \
377 gfilteroutputstream.c \
381 ginetsocketaddress.c \
392 gmemoryinputstream.c \
393 gmemoryoutputstream.c \
395 gnativevolumemonitor.c \
396 gnativevolumemonitor.h \
398 gnetworkingprivate.h \
400 gnetworkmonitorbase.c \
401 gnetworkmonitorbase.h \
405 gpollableinputstream.c \
406 gpollableoutputstream.c \
416 gsimpleasyncresult.c \
417 gsimplepermission.c \
420 gsocketaddressenumerator.c \
422 gsocketconnectable.c \
423 gsocketconnection.c \
424 gsocketcontrolmessage.c \
425 gsocketinputstream.c \
426 gsocketinputstream.h \
428 gsocketoutputstream.c \
429 gsocketoutputstream.h \
432 gproxyaddressenumerator.c \
436 gtcpwrapperconnection.c \
437 gthreadedsocketservice.c\
439 gthreadedresolver.c \
440 gthreadedresolver.h \
443 gtlsclientconnection.c \
449 gtlsserverconnection.c \
450 gunionvolumemonitor.c \
451 gunionvolumemonitor.h \
456 gzlibdecompressor.c \
463 $(application_sources) \
464 $(settings_sources) \
469 EXTRA_DIST += strinfo.c
471 libgio_2_0_la_LIBADD = \
472 $(top_builddir)/glib/libglib-2.0.la \
473 $(top_builddir)/gobject/libgobject-2.0.la \
474 $(top_builddir)/gmodule/libgmodule-2.0.la \
483 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
486 no_undefined = -no-undefined
489 if OS_WIN32_AND_DLL_COMPILATION
490 export_symbols = -export-symbols $(builddir)/gio.def
493 gio_win32_res = gio-win32-res.o
494 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
497 $(INSTALL) $(builddir)/gio.def $(DESTDIR)$(libdir)/gio-2.0.def
500 -rm $(DESTDIR)$(libdir)/gio-2.0.def
505 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
508 install-data-local: install-ms-lib install-def-file
509 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
511 uninstall-local: uninstall-ms-lib uninstall-def-file
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) $(export_symbols)
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 += -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 \
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 \
605 gtcpwrapperconnection.h \
606 gthreadedsocketservice.h\
610 gtlsclientconnection.h \
616 gtlsserverconnection.h \
621 gzlibdecompressor.h \
622 $(application_headers) \
623 $(settings_headers) \
627 gioincludedir=$(includedir)/glib-2.0/gio/
628 gioinclude_HEADERS = \
632 # these sources (also mentioned above) are generated.
634 gconstructor_as_data.h \
637 gdbus-daemon-generated.c \
638 gdbus-daemon-generated.h \
644 gioenumtypes.h.template \
645 gioenumtypes.c.template \
650 gconstructor_as_data.h \
656 # This is read by gobject-introspection/misc/ and gtk-doc
657 gio-public-headers.txt: Makefile
658 echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
660 CLEANFILES = gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
662 all-local: gio-public-headers.txt
664 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
665 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
666 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
667 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
669 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
670 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
671 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
672 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
674 gio-2.0.lib: libgio-2.0.la gio.def
675 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
677 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
679 glib_compile_resources_LDADD = \
680 $(top_builddir)/glib/libglib-2.0.la \
681 $(top_builddir)/gobject/libgobject-2.0.la \
684 glib_compile_resources_SOURCES = \
686 gvdb/gvdb-builder.h \
687 gvdb/gvdb-builder.c \
688 glib-compile-resources.c
690 gio_querymodules_SOURCES = gio-querymodules.c
691 gio_querymodules_LDADD = \
692 $(top_builddir)/glib/libglib-2.0.la \
693 $(top_builddir)/gobject/libgobject-2.0.la \
694 $(top_builddir)/gmodule/libgmodule-2.0.la \
698 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
699 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
701 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
702 glib_compile_schemas_SOURCES = \
703 gconstructor_as_data.h \
705 gvdb/gvdb-builder.h \
706 gvdb/gvdb-builder.c \
707 glib-compile-schemas.c
710 $(top_builddir)/glib/libglib-2.0.la \
711 $(top_builddir)/gobject/libgobject-2.0.la \
713 gsettings_SOURCES = gsettings-tool.c
715 schemadir = $(datadir)/glib-2.0/schemas
716 dist_schema_DATA = gschema.dtd
718 # ------------------------------------------------------------------------
721 bin_PROGRAMS += gdbus
722 gdbus_SOURCES = gdbus-tool.c
723 gdbus_LDADD = libgio-2.0.la \
724 $(top_builddir)/glib/libglib-2.0.la \
725 $(top_builddir)/gobject/libgobject-2.0.la
727 completiondir = $(sysconfdir)/bash_completion.d
729 gdbus-bash-completion.sh \
730 gsettings-bash-completion.sh \
731 gresource-bash-completion.sh
732 EXTRA_DIST += $(completion_DATA)
734 # ------------------------------------------------------------------------
737 bin_PROGRAMS += gresource
738 gresource_SOURCES = gresource-tool.c
739 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
740 gresource_LDADD = libgio-2.0.la \
741 $(top_builddir)/glib/libglib-2.0.la \
742 $(top_builddir)/gobject/libgobject-2.0.la \
745 # ------------------------------------------------------------------------
747 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
748 files='$(BUILT_EXTRA_DIST)'; \
749 for f in $$files; do \
750 if test -f $$f; then d=.; else d=$(srcdir); fi; \
751 cp $$d/$$f $(distdir) || exit 1; done
753 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
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) ;; \
757 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
760 done | sort -u >libgio.sourcefiles
761 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
762 rm libgio.sourcefiles
764 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
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) ;; \
768 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
771 done | sort -u >libgio.vs10.sourcefiles
772 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
773 rm libgio.vs10.sourcefiles
775 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
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) ;; \
779 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
782 done | sort -u >libgio.vs10.sourcefiles.filters
783 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
784 rm libgio.vs10.sourcefiles.filters
786 if HAVE_GLIB_RUNTIME_LIBDIR
788 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
789 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
790 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
791 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
792 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so