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 $(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 && \
28 mv $(builddir)/gio.def.tmp $(builddir)/gio.def
31 if HAVE_GNUC_VISIBILITY
37 -DG_LOG_DOMAIN=\"GLib-GIO\" \
41 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
43 lib_LTLIBRARIES = libgio-2.0.la
56 gdbusintrospection.h \
57 gdbusmethodinvocation.h \
60 gdbusinterfaceskeleton.h \
62 gdbusobjectskeleton.h \
64 gdbusobjectmanager.h \
65 gdbusobjectmanagerclient.h \
66 gdbusobjectmanagerserver.h \
71 gdbusutils.h gdbusutils.c \
72 gdbusaddress.h gdbusaddress.c \
73 gdbusauthobserver.h gdbusauthobserver.c \
74 gdbusauth.h gdbusauth.c \
75 gdbusauthmechanism.h gdbusauthmechanism.c \
76 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
77 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
78 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
79 gdbuserror.h gdbuserror.c \
80 gdbusconnection.h gdbusconnection.c \
81 gdbusmessage.h gdbusmessage.c \
82 gdbusnameowning.h gdbusnameowning.c \
83 gdbusnamewatching.h gdbusnamewatching.c \
84 gdbusproxy.h gdbusproxy.c \
85 gdbusprivate.h gdbusprivate.c \
86 gdbusintrospection.h gdbusintrospection.c \
87 gdbusmethodinvocation.h gdbusmethodinvocation.c \
88 gdbusserver.h gdbusserver.c \
89 gdbusinterface.h gdbusinterface.c \
90 gdbusinterfaceskeleton.h gdbusinterfaceskeleton.c \
91 gdbusobject.h gdbusobject.c \
92 gdbusobjectskeleton.h gdbusobjectskeleton.c \
93 gdbusobjectproxy.h gdbusobjectproxy.c \
94 gdbusobjectmanager.h gdbusobjectmanager.c \
95 gdbusobjectmanagerclient.h gdbusobjectmanagerclient.c \
96 gdbusobjectmanagerserver.h gdbusobjectmanagerserver.c \
97 gtestdbus.h gtestdbus.c \
100 # These are not built into the library yet
101 EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h dbus-daemon.xml
103 gdbus-daemon-generated.h gdbus-daemon-generated.c: $(srcdir)/dbus-daemon.xml $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in
104 $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
105 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
106 $(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in \
107 --interface-prefix org. \
108 --generate-c-code gdbus-daemon-generated \
110 $(srcdir)/dbus-daemon.xml \
122 gdelayedsettingsbackend.h \
123 gdelayedsettingsbackend.c \
124 gkeyfilesettingsbackend.c \
125 gmemorysettingsbackend.c \
126 gnullsettingsbackend.c \
127 gsettingsbackendinternal.h \
130 gsettingsschema-internal.h \
132 gsettings-mapping.h \
133 gsettings-mapping.c \
137 settings_sources += \
138 gregistrysettingsbackend.h \
139 gregistrysettingsbackend.c
143 settings_sources += \
144 gnextstepsettingsbackend.c
147 application_headers = \
149 gapplicationcommandline.h \
153 gsimpleactiongroup.h \
154 gremoteactiongroup.h \
155 gactiongroupexporter.h \
166 application_sources = \
168 gapplicationcommandline.c \
169 gapplicationimpl-dbus.c \
174 gsimpleactiongroup.c \
175 gremoteactiongroup.c \
176 gactiongroupexporter.c \
188 glocaldirectorymonitor.c \
189 glocaldirectorymonitor.h \
192 glocalfileenumerator.c \
193 glocalfileenumerator.h \
196 glocalfileinputstream.c \
197 glocalfileinputstream.h \
198 glocalfilemonitor.c \
199 glocalfilemonitor.h \
200 glocalfileoutputstream.c \
201 glocalfileoutputstream.h \
202 glocalfileiostream.c \
203 glocalfileiostream.h \
220 platform_libadd += inotify/libinotify.la
221 platform_deps += inotify/libinotify.la
225 AM_CPPFLAGS += -DHAVE_FEN
227 platform_libadd += fen/libfen.la
228 platform_deps += fen/libfen.la
233 platform_libadd += win32/libgiowin32.la
234 platform_deps += win32/libgiowin32.la
244 appinfo_sources += gdesktopappinfo.c
245 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
246 platform_deps += xdgmime/libxdgmime.la
248 gfiledescriptorbased.c \
250 gunixcredentialsmessage.c \
256 gunixsocketaddress.c \
259 gunixvolumemonitor.c \
260 gunixvolumemonitor.h \
262 gunixoutputstream.c \
266 giounixincludedir=$(includedir)/gio-unix-2.0/gio
267 giounixinclude_HEADERS = \
269 gfiledescriptorbased.h \
271 gunixcredentialsmessage.h \
276 gunixoutputstream.h \
277 gunixsocketaddress.h \
282 gnetworkmonitornetlink.c \
283 gnetworkmonitornetlink.h \
288 gdbus_daemon_sources = \
291 gdbus-daemon-generated.c \
292 gdbus-daemon-generated.h \
295 win32_actual_sources = \
296 $(gdbus_daemon_sources) \
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 if BUILD_MODULAR_TESTS
332 libgio_2_0_la_SOURCES = \
338 gbufferedinputstream.c \
339 gbufferedoutputstream.c \
342 gcontenttypeprivate.h \
343 gcharsetconverter.c \
345 gconverterinputstream.c \
346 gconverteroutputstream.c \
349 gdataoutputstream.c \
353 gdummyproxyresolver.c \
354 gdummyproxyresolver.h \
363 gfileattribute-priv.h \
370 gfilenamecompleter.c \
371 gfileoutputstream.c \
373 gfilterinputstream.c \
374 gfilteroutputstream.c \
378 ginetsocketaddress.c \
389 gmemoryinputstream.c \
390 gmemoryoutputstream.c \
392 gnativevolumemonitor.c \
393 gnativevolumemonitor.h \
395 gnetworkingprivate.h \
397 gnetworkmonitorbase.c \
398 gnetworkmonitorbase.h \
402 gpollableinputstream.c \
403 gpollableoutputstream.c \
413 gsimpleasyncresult.c \
414 gsimplepermission.c \
417 gsocketaddressenumerator.c \
419 gsocketconnectable.c \
420 gsocketconnection.c \
421 gsocketcontrolmessage.c \
422 gsocketinputstream.c \
423 gsocketinputstream.h \
425 gsocketoutputstream.c \
426 gsocketoutputstream.h \
429 gproxyaddressenumerator.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 export_symbols = -export-symbols $(builddir)/gio.def
490 gio_win32_res = gio-win32-res.o
491 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
494 $(INSTALL) $(builddir)/gio.def $(DESTDIR)$(libdir)/gio-2.0.def
497 -rm $(DESTDIR)$(libdir)/gio-2.0.def
502 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
505 install-data-local: install-ms-lib install-def-file
506 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
508 uninstall-local: uninstall-ms-lib uninstall-def-file
510 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
511 $(gio_win32_res_ldflag) \
512 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
513 -export-dynamic $(no_undefined) $(export_symbols)
516 # This is dumb. The ObjC source file should be properly named .m
517 libgio_2_0_la_CFLAGS = -xobjective-c
518 libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation
521 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
523 gio-win32-res.o: gio.rc
530 gbufferedinputstream.h \
531 gbufferedoutputstream.h \
534 gcharsetconverter.h \
536 gconverterinputstream.h \
537 gconverteroutputstream.h \
539 gdataoutputstream.h \
550 gfilenamecompleter.h \
551 gfileoutputstream.h \
553 gfilterinputstream.h \
554 gfilteroutputstream.h \
558 ginetsocketaddress.h \
570 gmemoryinputstream.h \
571 gmemoryoutputstream.h \
573 gnativevolumemonitor.h \
579 gpollableinputstream.h \
580 gpollableoutputstream.h \
584 gproxyaddressenumerator.h \
589 gsimpleasyncresult.h \
590 gsimplepermission.h \
593 gsocketaddressenumerator.h \
595 gsocketconnectable.h \
596 gsocketconnection.h \
597 gsocketcontrolmessage.h \
602 gtcpwrapperconnection.h \
603 gthreadedsocketservice.h\
607 gtlsclientconnection.h \
613 gtlsserverconnection.h \
618 gzlibdecompressor.h \
619 $(application_headers) \
620 $(settings_headers) \
624 gioincludedir=$(includedir)/glib-2.0/gio/
625 gioinclude_HEADERS = \
629 # these sources (also mentioned above) are generated.
631 gconstructor_as_data.h \
634 gdbus-daemon-generated.c \
635 gdbus-daemon-generated.h \
641 gioenumtypes.h.template \
642 gioenumtypes.c.template \
647 gconstructor_as_data.h \
653 # This is read by gobject-introspection/misc/ and gtk-doc
654 gio-public-headers.txt: Makefile
655 $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
657 CLEANFILES = gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
659 all-local: gio-public-headers.txt
661 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
662 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
663 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
664 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
666 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
667 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
668 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
669 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
671 gio-2.0.lib: libgio-2.0.la gio.def
672 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
674 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
676 glib_compile_resources_LDADD = \
677 $(top_builddir)/glib/libglib-2.0.la \
678 $(top_builddir)/gobject/libgobject-2.0.la \
681 glib_compile_resources_SOURCES = \
683 gvdb/gvdb-builder.h \
684 gvdb/gvdb-builder.c \
685 glib-compile-resources.c
687 gio_querymodules_SOURCES = gio-querymodules.c
688 gio_querymodules_LDADD = \
689 $(top_builddir)/glib/libglib-2.0.la \
690 $(top_builddir)/gobject/libgobject-2.0.la \
691 $(top_builddir)/gmodule/libgmodule-2.0.la \
695 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
696 $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
698 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
699 glib_compile_schemas_SOURCES = \
700 gconstructor_as_data.h \
702 gvdb/gvdb-builder.h \
703 gvdb/gvdb-builder.c \
704 glib-compile-schemas.c
707 $(top_builddir)/glib/libglib-2.0.la \
708 $(top_builddir)/gobject/libgobject-2.0.la \
710 gsettings_SOURCES = gsettings-tool.c
712 schemadir = $(datadir)/glib-2.0/schemas
713 dist_schema_DATA = gschema.dtd
715 # ------------------------------------------------------------------------
718 bin_PROGRAMS += gdbus
719 gdbus_SOURCES = gdbus-tool.c
720 gdbus_LDADD = libgio-2.0.la \
721 $(top_builddir)/glib/libglib-2.0.la \
722 $(top_builddir)/gobject/libgobject-2.0.la
724 completiondir = $(datadir)/bash-completion/completions
727 completion/gsettings \
729 EXTRA_DIST += $(completion_DATA)
731 # ------------------------------------------------------------------------
734 bin_PROGRAMS += gresource
735 gresource_SOURCES = gresource-tool.c
736 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
737 gresource_LDADD = libgio-2.0.la \
738 $(top_builddir)/glib/libglib-2.0.la \
739 $(top_builddir)/gobject/libgobject-2.0.la \
742 # ------------------------------------------------------------------------
744 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
745 files='$(BUILT_EXTRA_DIST)'; \
746 for f in $$files; do \
747 if test -f $$f; then d=.; else d=$(srcdir); fi; \
748 cp $$d/$$f $(distdir) || exit 1; done
750 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
751 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
753 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
754 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
757 done | sort -u >libgio.sourcefiles
758 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
759 rm libgio.sourcefiles
761 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
762 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
764 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
765 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
768 done | sort -u >libgio.vs10.sourcefiles
769 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
770 rm libgio.vs10.sourcefiles
772 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
773 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
775 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
776 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
779 done | sort -u >libgio.vs10.sourcefiles.filters
780 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
781 rm libgio.vs10.sourcefiles.filters
783 if HAVE_GLIB_RUNTIME_LIBDIR
785 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
786 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
787 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
788 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
789 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so