1 include $(top_srcdir)/Makefile.decl
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 \
88 gdbusutils.h gdbusutils.c \
89 gdbusaddress.h gdbusaddress.c \
90 gdbusauthobserver.h gdbusauthobserver.c \
91 gdbusauth.h gdbusauth.c \
92 gdbusauthmechanism.h gdbusauthmechanism.c \
93 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
94 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
95 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
96 gdbuserror.h gdbuserror.c \
97 gdbusconnection.h gdbusconnection.c \
98 gdbusmessage.h gdbusmessage.c \
99 gdbusnameowning.h gdbusnameowning.c \
100 gdbusnamewatching.h gdbusnamewatching.c \
101 gdbusproxy.h gdbusproxy.c \
102 gdbusprivate.h gdbusprivate.c \
103 gdbusintrospection.h gdbusintrospection.c \
104 gdbusmethodinvocation.h gdbusmethodinvocation.c \
105 gdbusserver.h gdbusserver.c \
116 gdelayedsettingsbackend.h \
117 gdelayedsettingsbackend.c \
118 gkeyfilesettingsbackend.c \
119 gmemorysettingsbackend.h \
120 gmemorysettingsbackend.c \
121 gnullsettingsbackend.h \
122 gnullsettingsbackend.c \
123 gsettingsbackendinternal.h \
127 gsettings-mapping.h \
128 gsettings-mapping.c \
132 settings_sources += \
133 gregistrysettingsbackend.h \
134 gregistrysettingsbackend.c
137 application_headers = \
139 gsimpleactiongroup.h \
142 gapplicationcommandline.h \
145 application_sources = \
147 gsimpleactiongroup.c \
150 gapplicationcommandline.c \
151 gapplicationimpl-dbus.c \
155 glocaldirectorymonitor.c \
156 glocaldirectorymonitor.h \
159 glocalfileenumerator.c \
160 glocalfileenumerator.h \
163 glocalfileinputstream.c \
164 glocalfileinputstream.h \
165 glocalfilemonitor.c \
166 glocalfilemonitor.h \
167 glocalfileoutputstream.c \
168 glocalfileoutputstream.h \
169 glocalfileiostream.c \
170 glocalfileiostream.h \
187 platform_libadd += inotify/libinotify.la
188 platform_deps += inotify/libinotify.la
192 AM_CPPFLAGS += -DHAVE_FEN
194 platform_libadd += fen/libfen.la
195 platform_deps += fen/libfen.la
200 platform_libadd += win32/libgiowin32.la
201 platform_deps += win32/libgiowin32.la
212 appinfo_sources += gdesktopappinfo.c
213 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
214 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
216 gfiledescriptorbased.c \
218 gunixcredentialsmessage.c \
226 gunixsocketaddress.c \
229 gunixvolumemonitor.c \
230 gunixvolumemonitor.h \
232 gunixoutputstream.c \
236 giounixincludedir=$(includedir)/gio-unix-2.0/gio
237 giounixinclude_HEADERS = \
239 gfiledescriptorbased.h \
241 gunixcredentialsmessage.h \
246 gunixoutputstream.h \
247 gunixsocketaddress.h \
251 win32_actual_sources = \
256 gwin32volumemonitor.c \
257 gwin32volumemonitor.h \
258 gwin32inputstream.c \
259 gwin32outputstream.c \
260 gwin32outputstream.h \
263 win32_more_sources_for_vcproj = \
265 win32/gwin32directorymonitor.c \
266 win32/gwinhttpfile.c \
267 win32/gwinhttpfileinputstream.c \
268 win32/gwinhttpfileoutputstream.c \
272 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
273 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
274 win32_sources = $(win32_actual_sources)
276 giowin32includedir=$(includedir)/gio-win32-2.0/gio
277 giowin32include_HEADERS = \
278 gwin32inputstream.h \
279 gwin32outputstream.h \
286 libgio_2_0_la_SOURCES = \
292 gbufferedinputstream.c \
293 gbufferedoutputstream.c \
296 gcontenttypeprivate.h \
297 gcharsetconverter.c \
299 gconverterinputstream.c \
300 gconverteroutputstream.c \
303 gdataoutputstream.c \
307 gdummyproxyresolver.c \
308 gdummyproxyresolver.h \
315 gfileattribute-priv.h \
322 gfilenamecompleter.c \
323 gfileoutputstream.c \
325 gfilterinputstream.c \
326 gfilteroutputstream.c \
329 ginetsocketaddress.c \
340 gmemoryinputstream.c \
341 gmemoryoutputstream.c \
343 gnativevolumemonitor.c \
344 gnativevolumemonitor.h \
346 gnetworkingprivate.h \
355 gsimpleasyncresult.c \
356 gsimplepermission.c \
359 gsocketaddressenumerator.c \
361 gsocketconnectable.c \
362 gsocketconnection.c \
363 gsocketcontrolmessage.c \
364 gsocketinputstream.c \
365 gsocketinputstream.h \
367 gsocketoutputstream.c \
368 gsocketoutputstream.h \
371 gproxyaddressenumerator.c \
377 gthreadedsocketservice.c\
379 gthreadedresolver.c \
380 gthreadedresolver.h \
381 gunionvolumemonitor.c \
382 gunionvolumemonitor.h \
387 gzlibdecompressor.c \
394 $(application_sources) \
395 $(settings_sources) \
401 EXTRA_DIST += gnullapplication.c gdbusapplication.c strinfo.c
403 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
405 libgio_2_0_la_LIBADD = \
406 $(top_builddir)/glib/libglib-2.0.la \
407 $(top_builddir)/gobject/libgobject-2.0.la \
408 $(top_builddir)/gmodule/libgmodule-2.0.la \
417 no_undefined = -no-undefined
420 if OS_WIN32_AND_DLL_COMPILATION
421 export_symbols = -export-symbols gio.def
424 gio_win32_res = gio-win32-res.o
425 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
428 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
431 -rm $(DESTDIR)$(libdir)/gio-2.0.def
436 export_symbols = -export-symbols-regex '^g_.*'
439 install-data-local: install-ms-lib install-def-file
440 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
442 uninstall-local: uninstall-ms-lib uninstall-def-file
444 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
445 $(gio_win32_res_ldflag) \
446 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
447 -export-dynamic $(no_undefined) $(export_symbols)
449 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
451 gio-win32-res.o: gio.rc
458 gbufferedinputstream.h \
459 gbufferedoutputstream.h \
462 gcharsetconverter.h \
464 gconverterinputstream.h \
465 gconverteroutputstream.h \
467 gdataoutputstream.h \
478 gfilenamecompleter.h \
479 gfileoutputstream.h \
481 gfilterinputstream.h \
482 gfilteroutputstream.h \
485 ginetsocketaddress.h \
497 gmemoryinputstream.h \
498 gmemoryoutputstream.h \
500 gnativevolumemonitor.h \
507 gproxyaddressenumerator.h \
511 gsimpleasyncresult.h \
512 gsimplepermission.h \
515 gsocketaddressenumerator.h \
517 gsocketconnectable.h \
518 gsocketconnection.h \
519 gsocketcontrolmessage.h \
524 gthreadedsocketservice.h\
530 gzlibdecompressor.h \
531 $(application_headers) \
532 $(settings_headers) \
536 gioincludedir=$(includedir)/glib-2.0/gio/
537 gioinclude_HEADERS = \
541 # these sources (also mentioned above) are generated.
552 gioenumtypes.h.template \
553 gioenumtypes.c.template \
567 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
568 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
569 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
570 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
572 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
573 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
574 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
575 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
577 gio-2.0.lib: libgio-2.0.la gio.def
578 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
580 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
582 gio_querymodules_SOURCES = gio-querymodules.c
583 gio_querymodules_LDADD = \
584 $(top_builddir)/glib/libglib-2.0.la \
585 $(top_builddir)/gobject/libgobject-2.0.la \
586 $(top_builddir)/gmodule/libgmodule-2.0.la \
590 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
591 glib_compile_schemas_SOURCES = \
593 gvdb/gvdb-builder.h \
594 gvdb/gvdb-builder.c \
595 glib-compile-schemas.c
598 $(top_builddir)/glib/libglib-2.0.la \
599 $(top_builddir)/gobject/libgobject-2.0.la \
601 gsettings_SOURCES = gsettings-tool.c
603 schemadir = $(datadir)/glib-2.0/schemas
604 dist_schema_DATA = gschema.dtd
606 # ------------------------------------------------------------------------
609 bin_PROGRAMS += gdbus
610 gdbus_SOURCES = gdbus-tool.c
611 gdbus_LDADD = libgio-2.0.la \
612 $(top_builddir)/glib/libglib-2.0.la \
613 $(top_builddir)/gobject/libgobject-2.0.la
615 completiondir = $(sysconfdir)/bash_completion.d
616 completion_SCRIPTS = \
617 gdbus-bash-completion.sh \
618 gsettings-bash-completion.sh
619 EXTRA_DIST += $(completion_SCRIPTS)
621 # ------------------------------------------------------------------------
623 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
624 files='$(BUILT_EXTRA_DIST)'; \
625 for f in $$files; do \
626 if test -f $$f; then d=.; else d=$(srcdir); fi; \
627 cp $$d/$$f $(distdir) || exit 1; done
629 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
630 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
632 gunix*.c|gdesktopappinfo.c) ;; \
633 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
636 done | sort -u >libgio.sourcefiles
637 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
638 rm libgio.sourcefiles
640 if HAVE_GLIB_RUNTIME_LIBDIR
642 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
643 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
644 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
645 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
646 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so