1 include $(top_srcdir)/Makefile.decl
5 SUBDIRS = gdbus-codegen
8 SUBDIRS += libasyncns xdgmime
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 -e 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) > gio.def.tmp && \
28 mv gio.def.tmp gio.def
31 if HAVE_GNUC_VISIBILITY
37 THREAD_FLAGS=-DG_THREADS_MANDATORY
41 -DG_LOG_DOMAIN=\"GLib-GIO\" \
45 -DG_DISABLE_DEPRECATED \
47 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
49 lib_LTLIBRARIES = libgio-2.0.la
57 glib_genmarshal=$(GLIB_GENMARSHAL)
59 glib_genmarshal=../gobject/glib-genmarshal
62 gio-marshal.h: gio-marshal.list
63 $(AM_V_GEN) $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
66 gio-marshal.c: gio-marshal.h gio-marshal.list
67 $(AM_V_GEN) (echo "#include \"gio-marshal.h\""; \
68 $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
82 gdbusintrospection.h \
83 gdbusmethodinvocation.h \
86 gdbusinterfaceskeleton.h \
88 gdbusobjectskeleton.h \
90 gdbusobjectmanager.h \
91 gdbusobjectmanagerclient.h \
92 gdbusobjectmanagerserver.h \
96 gdbusutils.h gdbusutils.c \
97 gdbusaddress.h gdbusaddress.c \
98 gdbusauthobserver.h gdbusauthobserver.c \
99 gdbusauth.h gdbusauth.c \
100 gdbusauthmechanism.h gdbusauthmechanism.c \
101 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
102 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
103 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
104 gdbuserror.h gdbuserror.c \
105 gdbusconnection.h gdbusconnection.c \
106 gdbusmessage.h gdbusmessage.c \
107 gdbusnameowning.h gdbusnameowning.c \
108 gdbusnamewatching.h gdbusnamewatching.c \
109 gdbusproxy.h gdbusproxy.c \
110 gdbusprivate.h gdbusprivate.c \
111 gdbusintrospection.h gdbusintrospection.c \
112 gdbusmethodinvocation.h gdbusmethodinvocation.c \
113 gdbusserver.h gdbusserver.c \
114 gdbusinterface.h gdbusinterface.c \
115 gdbusinterfaceskeleton.h gdbusinterfaceskeleton.c \
116 gdbusobject.h gdbusobject.c \
117 gdbusobjectskeleton.h gdbusobjectskeleton.c \
118 gdbusobjectproxy.h gdbusobjectproxy.c \
119 gdbusobjectmanager.h gdbusobjectmanager.c \
120 gdbusobjectmanagerclient.h gdbusobjectmanagerclient.c \
121 gdbusobjectmanagerserver.h gdbusobjectmanagerserver.c \
132 gdelayedsettingsbackend.h \
133 gdelayedsettingsbackend.c \
134 gkeyfilesettingsbackend.c \
135 gmemorysettingsbackend.c \
136 gnullsettingsbackend.c \
137 gsettingsbackendinternal.h \
141 gsettings-mapping.h \
142 gsettings-mapping.c \
146 settings_sources += \
147 gregistrysettingsbackend.h \
148 gregistrysettingsbackend.c
151 application_headers = \
153 gsimpleactiongroup.h \
156 gapplicationcommandline.h \
159 application_sources = \
161 gsimpleactiongroup.c \
164 gapplicationcommandline.c \
166 gapplicationimpl-dbus.c \
170 glocaldirectorymonitor.c \
171 glocaldirectorymonitor.h \
174 glocalfileenumerator.c \
175 glocalfileenumerator.h \
178 glocalfileinputstream.c \
179 glocalfileinputstream.h \
180 glocalfilemonitor.c \
181 glocalfilemonitor.h \
182 glocalfileoutputstream.c \
183 glocalfileoutputstream.h \
184 glocalfileiostream.c \
185 glocalfileiostream.h \
202 platform_libadd += inotify/libinotify.la
203 platform_deps += inotify/libinotify.la
207 AM_CPPFLAGS += -DHAVE_FEN
209 platform_libadd += fen/libfen.la
210 platform_deps += fen/libfen.la
215 platform_libadd += win32/libgiowin32.la
216 platform_deps += win32/libgiowin32.la
226 appinfo_sources += gdesktopappinfo.c
227 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
228 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
230 gfiledescriptorbased.c \
232 gunixcredentialsmessage.c \
240 gunixsocketaddress.c \
243 gunixvolumemonitor.c \
244 gunixvolumemonitor.h \
246 gunixoutputstream.c \
250 giounixincludedir=$(includedir)/gio-unix-2.0/gio
251 giounixinclude_HEADERS = \
253 gfiledescriptorbased.h \
255 gunixcredentialsmessage.h \
260 gunixoutputstream.h \
261 gunixsocketaddress.h \
265 win32_actual_sources = \
270 gwin32volumemonitor.c \
271 gwin32volumemonitor.h \
272 gwin32inputstream.c \
273 gwin32outputstream.c \
274 gwin32outputstream.h \
277 win32_more_sources_for_vcproj = \
279 win32/gwin32directorymonitor.c \
280 win32/gwinhttpfile.c \
281 win32/gwinhttpfileinputstream.c \
282 win32/gwinhttpfileoutputstream.c \
286 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
287 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
288 win32_sources = $(win32_actual_sources)
290 giowin32includedir=$(includedir)/gio-win32-2.0/gio
291 giowin32include_HEADERS = \
292 gwin32inputstream.h \
293 gwin32outputstream.h \
300 libgio_2_0_la_SOURCES = \
306 gbufferedinputstream.c \
307 gbufferedoutputstream.c \
310 gcontenttypeprivate.h \
311 gcharsetconverter.c \
313 gconverterinputstream.c \
314 gconverteroutputstream.c \
317 gdataoutputstream.c \
321 gdummyproxyresolver.c \
322 gdummyproxyresolver.h \
331 gfileattribute-priv.h \
338 gfilenamecompleter.c \
339 gfileoutputstream.c \
341 gfilterinputstream.c \
342 gfilteroutputstream.c \
345 ginetsocketaddress.c \
356 gmemoryinputstream.c \
357 gmemoryoutputstream.c \
359 gnativevolumemonitor.c \
360 gnativevolumemonitor.h \
362 gnetworkingprivate.h \
366 gpollableinputstream.c \
367 gpollableoutputstream.c \
373 gsimpleasyncresult.c \
374 gsimplepermission.c \
377 gsocketaddressenumerator.c \
379 gsocketconnectable.c \
380 gsocketconnection.c \
381 gsocketcontrolmessage.c \
382 gsocketinputstream.c \
383 gsocketinputstream.h \
385 gsocketoutputstream.c \
386 gsocketoutputstream.h \
389 gproxyaddressenumerator.c \
393 gtcpwrapperconnection.c \
394 gthreadedsocketservice.c\
396 gthreadedresolver.c \
397 gthreadedresolver.h \
401 gtlsclientconnection.c \
403 gtlsserverconnection.c \
404 gunionvolumemonitor.c \
405 gunionvolumemonitor.h \
410 gzlibdecompressor.c \
417 $(application_sources) \
418 $(settings_sources) \
424 EXTRA_DIST += strinfo.c
426 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
428 libgio_2_0_la_LIBADD = \
429 $(top_builddir)/glib/libglib-2.0.la \
430 $(top_builddir)/gobject/libgobject-2.0.la \
431 $(top_builddir)/gmodule/libgmodule-2.0.la \
440 no_undefined = -no-undefined
443 if OS_WIN32_AND_DLL_COMPILATION
444 export_symbols = -export-symbols gio.def
447 gio_win32_res = gio-win32-res.o
448 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
451 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
454 -rm $(DESTDIR)$(libdir)/gio-2.0.def
459 export_symbols = -export-symbols-regex '^g_.*'
462 install-data-local: install-ms-lib install-def-file
463 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
465 uninstall-local: uninstall-ms-lib uninstall-def-file
467 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
468 $(gio_win32_res_ldflag) \
469 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
470 -export-dynamic $(no_undefined) $(export_symbols)
472 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
474 gio-win32-res.o: gio.rc
481 gbufferedinputstream.h \
482 gbufferedoutputstream.h \
485 gcharsetconverter.h \
487 gconverterinputstream.h \
488 gconverteroutputstream.h \
490 gdataoutputstream.h \
501 gfilenamecompleter.h \
502 gfileoutputstream.h \
504 gfilterinputstream.h \
505 gfilteroutputstream.h \
508 ginetsocketaddress.h \
520 gmemoryinputstream.h \
521 gmemoryoutputstream.h \
523 gnativevolumemonitor.h \
528 gpollableinputstream.h \
529 gpollableoutputstream.h \
532 gproxyaddressenumerator.h \
536 gsimpleasyncresult.h \
537 gsimplepermission.h \
540 gsocketaddressenumerator.h \
542 gsocketconnectable.h \
543 gsocketconnection.h \
544 gsocketcontrolmessage.h \
549 gtcpwrapperconnection.h \
550 gthreadedsocketservice.h\
555 gtlsclientconnection.h \
557 gtlsserverconnection.h \
562 gzlibdecompressor.h \
563 $(application_headers) \
564 $(settings_headers) \
568 gioincludedir=$(includedir)/glib-2.0/gio/
569 gioinclude_HEADERS = \
573 # these sources (also mentioned above) are generated.
584 gioenumtypes.h.template \
585 gioenumtypes.c.template \
599 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
600 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
601 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
602 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
604 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
605 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
606 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
607 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
609 gio-2.0.lib: libgio-2.0.la gio.def
610 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
612 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
614 gio_querymodules_SOURCES = gio-querymodules.c
615 gio_querymodules_LDADD = \
616 $(top_builddir)/glib/libglib-2.0.la \
617 $(top_builddir)/gobject/libgobject-2.0.la \
618 $(top_builddir)/gmodule/libgmodule-2.0.la \
622 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
623 glib_compile_schemas_SOURCES = \
625 gvdb/gvdb-builder.h \
626 gvdb/gvdb-builder.c \
627 glib-compile-schemas.c
630 $(top_builddir)/glib/libglib-2.0.la \
631 $(top_builddir)/gobject/libgobject-2.0.la \
633 gsettings_SOURCES = gsettings-tool.c
635 schemadir = $(datadir)/glib-2.0/schemas
636 dist_schema_DATA = gschema.dtd
638 # ------------------------------------------------------------------------
641 bin_PROGRAMS += gdbus
642 gdbus_SOURCES = gdbus-tool.c
643 gdbus_LDADD = libgio-2.0.la \
644 $(top_builddir)/glib/libglib-2.0.la \
645 $(top_builddir)/gobject/libgobject-2.0.la
647 completiondir = $(sysconfdir)/bash_completion.d
648 completion_SCRIPTS = \
649 gdbus-bash-completion.sh \
650 gsettings-bash-completion.sh
651 EXTRA_DIST += $(completion_SCRIPTS)
653 # ------------------------------------------------------------------------
654 # generate code here for the sake of gtk-doc
656 gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c : gdbus-example-objectmanager.xml
657 $(AM_V_GEN) $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py \
658 --interface-prefix org.gtk.GDBus.Example.ObjectManager. \
659 --c-namespace Example \
660 --c-generate-object-manager \
661 --generate-c-code gdbus-example-objectmanager-generated \
662 --generate-docbook gdbus-example-objectmanager-generated \
663 gdbus-example-objectmanager.xml \
666 BUILT_SOURCES += gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c
668 noinst_LTLIBRARIES = libgdbus-example-objectmanager.la
669 libgdbus_example_objectmanager_la_SOURCES = gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c
670 libgdbus_example_objectmanager_la_LIBADD = \
671 $(top_builddir)/glib/libglib-2.0.la \
672 $(top_builddir)/gobject/libgobject-2.0.la \
673 $(top_builddir)/gmodule/libgmodule-2.0.la \
677 EXTRA_DIST += gdbus-example-objectmanager.xml
679 CLEANFILES += gdbus-example-objectmanager-generated-*.xml
681 # ------------------------------------------------------------------------
683 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
684 files='$(BUILT_EXTRA_DIST)'; \
685 for f in $$files; do \
686 if test -f $$f; then d=.; else d=$(srcdir); fi; \
687 cp $$d/$$f $(distdir) || exit 1; done
689 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
690 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
692 gunix*.c|gdesktopappinfo.c) ;; \
693 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
696 done | sort -u >libgio.sourcefiles
697 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
698 rm libgio.sourcefiles
700 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
701 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
703 gunix*.c|gdesktopappinfo.c) ;; \
704 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
707 done | sort -u >libgio.vs10.sourcefiles
708 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
709 rm libgio.vs10.sourcefiles
711 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
712 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
714 gunix*.c|gdesktopappinfo.c) ;; \
715 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
718 done | sort -u >libgio.vs10.sourcefiles.filters
719 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
720 rm libgio.vs10.sourcefiles.filters
722 if HAVE_GLIB_RUNTIME_LIBDIR
724 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
725 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
726 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
727 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
728 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so