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 = $(LIBTOOL_EXPORT_OPTIONS)
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 # This is read by gobject-introspection/misc/ and gtk-doc
600 gio-public-headers.txt: Makefile
601 echo $(gioinclude_HEADERS) > $@.tmp && mv $@.tmp $@
603 CLEANFILES += gio-public-headers.txt
605 all-local: gio-public-headers.txt
607 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
608 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
609 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
610 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
612 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
613 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
614 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
615 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
617 gio-2.0.lib: libgio-2.0.la gio.def
618 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
620 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
622 gio_querymodules_SOURCES = gio-querymodules.c
623 gio_querymodules_LDADD = \
624 $(top_builddir)/glib/libglib-2.0.la \
625 $(top_builddir)/gobject/libgobject-2.0.la \
626 $(top_builddir)/gmodule/libgmodule-2.0.la \
630 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
631 glib_compile_schemas_SOURCES = \
633 gvdb/gvdb-builder.h \
634 gvdb/gvdb-builder.c \
635 glib-compile-schemas.c
638 $(top_builddir)/glib/libglib-2.0.la \
639 $(top_builddir)/gobject/libgobject-2.0.la \
641 gsettings_SOURCES = gsettings-tool.c
643 schemadir = $(datadir)/glib-2.0/schemas
644 dist_schema_DATA = gschema.dtd
646 # ------------------------------------------------------------------------
649 bin_PROGRAMS += gdbus
650 gdbus_SOURCES = gdbus-tool.c
651 gdbus_LDADD = libgio-2.0.la \
652 $(top_builddir)/glib/libglib-2.0.la \
653 $(top_builddir)/gobject/libgobject-2.0.la
655 completiondir = $(sysconfdir)/bash_completion.d
656 completion_SCRIPTS = \
657 gdbus-bash-completion.sh \
658 gsettings-bash-completion.sh
659 EXTRA_DIST += $(completion_SCRIPTS)
661 # ------------------------------------------------------------------------
663 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
664 files='$(BUILT_EXTRA_DIST)'; \
665 for f in $$files; do \
666 if test -f $$f; then d=.; else d=$(srcdir); fi; \
667 cp $$d/$$f $(distdir) || exit 1; done
669 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
670 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
672 gunix*.c|gdesktopappinfo.c) ;; \
673 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
676 done | sort -u >libgio.sourcefiles
677 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
678 rm libgio.sourcefiles
680 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
681 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
683 gunix*.c|gdesktopappinfo.c) ;; \
684 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'" />' \
687 done | sort -u >libgio.vs10.sourcefiles
688 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
689 rm libgio.vs10.sourcefiles
691 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
692 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
694 gunix*.c|gdesktopappinfo.c) ;; \
695 *.c) echo ' <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
698 done | sort -u >libgio.vs10.sourcefiles.filters
699 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
700 rm libgio.vs10.sourcefiles.filters
702 if HAVE_GLIB_RUNTIME_LIBDIR
704 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
705 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
706 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
707 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
708 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so