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 \
152 gapplicationimpl-dbus.c \
156 glocaldirectorymonitor.c \
157 glocaldirectorymonitor.h \
160 glocalfileenumerator.c \
161 glocalfileenumerator.h \
164 glocalfileinputstream.c \
165 glocalfileinputstream.h \
166 glocalfilemonitor.c \
167 glocalfilemonitor.h \
168 glocalfileoutputstream.c \
169 glocalfileoutputstream.h \
170 glocalfileiostream.c \
171 glocalfileiostream.h \
188 platform_libadd += inotify/libinotify.la
189 platform_deps += inotify/libinotify.la
193 AM_CPPFLAGS += -DHAVE_FEN
195 platform_libadd += fen/libfen.la
196 platform_deps += fen/libfen.la
201 platform_libadd += win32/libgiowin32.la
202 platform_deps += win32/libgiowin32.la
213 appinfo_sources += gdesktopappinfo.c
214 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
215 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
217 gfiledescriptorbased.c \
219 gunixcredentialsmessage.c \
227 gunixsocketaddress.c \
230 gunixvolumemonitor.c \
231 gunixvolumemonitor.h \
233 gunixoutputstream.c \
237 giounixincludedir=$(includedir)/gio-unix-2.0/gio
238 giounixinclude_HEADERS = \
240 gfiledescriptorbased.h \
242 gunixcredentialsmessage.h \
247 gunixoutputstream.h \
248 gunixsocketaddress.h \
252 win32_actual_sources = \
257 gwin32volumemonitor.c \
258 gwin32volumemonitor.h \
259 gwin32inputstream.c \
260 gwin32outputstream.c \
261 gwin32outputstream.h \
264 win32_more_sources_for_vcproj = \
266 win32/gwin32directorymonitor.c \
267 win32/gwinhttpfile.c \
268 win32/gwinhttpfileinputstream.c \
269 win32/gwinhttpfileoutputstream.c \
273 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
274 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
275 win32_sources = $(win32_actual_sources)
277 giowin32includedir=$(includedir)/gio-win32-2.0/gio
278 giowin32include_HEADERS = \
279 gwin32inputstream.h \
280 gwin32outputstream.h \
287 libgio_2_0_la_SOURCES = \
293 gbufferedinputstream.c \
294 gbufferedoutputstream.c \
297 gcontenttypeprivate.h \
298 gcharsetconverter.c \
300 gconverterinputstream.c \
301 gconverteroutputstream.c \
304 gdataoutputstream.c \
308 gdummyproxyresolver.c \
309 gdummyproxyresolver.h \
316 gfileattribute-priv.h \
323 gfilenamecompleter.c \
324 gfileoutputstream.c \
326 gfilterinputstream.c \
327 gfilteroutputstream.c \
330 ginetsocketaddress.c \
341 gmemoryinputstream.c \
342 gmemoryoutputstream.c \
344 gnativevolumemonitor.c \
345 gnativevolumemonitor.h \
347 gnetworkingprivate.h \
352 gpollableinputstream.c \
353 gpollableoutputstream.c \
359 gsimpleasyncresult.c \
360 gsimplepermission.c \
363 gsocketaddressenumerator.c \
365 gsocketconnectable.c \
366 gsocketconnection.c \
367 gsocketcontrolmessage.c \
368 gsocketinputstream.c \
369 gsocketinputstream.h \
371 gsocketoutputstream.c \
372 gsocketoutputstream.h \
375 gproxyaddressenumerator.c \
379 gtcpwrapperconnection.c \
380 gthreadedsocketservice.c\
382 gthreadedresolver.c \
383 gthreadedresolver.h \
384 gunionvolumemonitor.c \
385 gunionvolumemonitor.h \
390 gzlibdecompressor.c \
397 $(application_sources) \
398 $(settings_sources) \
404 EXTRA_DIST += strinfo.c
406 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
408 libgio_2_0_la_LIBADD = \
409 $(top_builddir)/glib/libglib-2.0.la \
410 $(top_builddir)/gobject/libgobject-2.0.la \
411 $(top_builddir)/gmodule/libgmodule-2.0.la \
420 no_undefined = -no-undefined
423 if OS_WIN32_AND_DLL_COMPILATION
424 export_symbols = -export-symbols gio.def
427 gio_win32_res = gio-win32-res.o
428 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
431 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
434 -rm $(DESTDIR)$(libdir)/gio-2.0.def
439 export_symbols = -export-symbols-regex '^g_.*'
442 install-data-local: install-ms-lib install-def-file
443 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
445 uninstall-local: uninstall-ms-lib uninstall-def-file
447 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
448 $(gio_win32_res_ldflag) \
449 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
450 -export-dynamic $(no_undefined) $(export_symbols)
452 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
454 gio-win32-res.o: gio.rc
461 gbufferedinputstream.h \
462 gbufferedoutputstream.h \
465 gcharsetconverter.h \
467 gconverterinputstream.h \
468 gconverteroutputstream.h \
470 gdataoutputstream.h \
481 gfilenamecompleter.h \
482 gfileoutputstream.h \
484 gfilterinputstream.h \
485 gfilteroutputstream.h \
488 ginetsocketaddress.h \
500 gmemoryinputstream.h \
501 gmemoryoutputstream.h \
503 gnativevolumemonitor.h \
509 gpollableinputstream.h \
510 gpollableoutputstream.h \
513 gproxyaddressenumerator.h \
517 gsimpleasyncresult.h \
518 gsimplepermission.h \
521 gsocketaddressenumerator.h \
523 gsocketconnectable.h \
524 gsocketconnection.h \
525 gsocketcontrolmessage.h \
530 gtcpwrapperconnection.h \
531 gthreadedsocketservice.h\
537 gzlibdecompressor.h \
538 $(application_headers) \
539 $(settings_headers) \
543 gioincludedir=$(includedir)/glib-2.0/gio/
544 gioinclude_HEADERS = \
548 # these sources (also mentioned above) are generated.
559 gioenumtypes.h.template \
560 gioenumtypes.c.template \
574 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
575 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
576 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
577 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
579 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
580 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
581 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
582 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
584 gio-2.0.lib: libgio-2.0.la gio.def
585 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
587 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
589 gio_querymodules_SOURCES = gio-querymodules.c
590 gio_querymodules_LDADD = \
591 $(top_builddir)/glib/libglib-2.0.la \
592 $(top_builddir)/gobject/libgobject-2.0.la \
593 $(top_builddir)/gmodule/libgmodule-2.0.la \
597 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
598 glib_compile_schemas_SOURCES = \
600 gvdb/gvdb-builder.h \
601 gvdb/gvdb-builder.c \
602 glib-compile-schemas.c
605 $(top_builddir)/glib/libglib-2.0.la \
606 $(top_builddir)/gobject/libgobject-2.0.la \
608 gsettings_SOURCES = gsettings-tool.c
610 schemadir = $(datadir)/glib-2.0/schemas
611 dist_schema_DATA = gschema.dtd
613 # ------------------------------------------------------------------------
616 bin_PROGRAMS += gdbus
617 gdbus_SOURCES = gdbus-tool.c
618 gdbus_LDADD = libgio-2.0.la \
619 $(top_builddir)/glib/libglib-2.0.la \
620 $(top_builddir)/gobject/libgobject-2.0.la
622 completiondir = $(sysconfdir)/bash_completion.d
623 completion_SCRIPTS = \
624 gdbus-bash-completion.sh \
625 gsettings-bash-completion.sh
626 EXTRA_DIST += $(completion_SCRIPTS)
628 # ------------------------------------------------------------------------
630 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
631 files='$(BUILT_EXTRA_DIST)'; \
632 for f in $$files; do \
633 if test -f $$f; then d=.; else d=$(srcdir); fi; \
634 cp $$d/$$f $(distdir) || exit 1; done
636 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
637 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
639 gunix*.c|gdesktopappinfo.c) ;; \
640 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
643 done | sort -u >libgio.sourcefiles
644 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
645 rm libgio.sourcefiles
647 if HAVE_GLIB_RUNTIME_LIBDIR
649 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
650 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
651 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
652 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
653 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so