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 glocaldirectorymonitor.c \
133 glocaldirectorymonitor.h \
136 glocalfileenumerator.c \
137 glocalfileenumerator.h \
140 glocalfileinputstream.c \
141 glocalfileinputstream.h \
142 glocalfilemonitor.c \
143 glocalfilemonitor.h \
144 glocalfileoutputstream.c \
145 glocalfileoutputstream.h \
146 glocalfileiostream.c \
147 glocalfileiostream.h \
158 platform_libadd += inotify/libinotify.la
159 platform_deps += inotify/libinotify.la
163 AM_CPPFLAGS += -DHAVE_FEN
165 platform_libadd += fen/libfen.la
166 platform_deps += fen/libfen.la
171 platform_libadd += win32/libgiowin32.la
172 platform_deps += win32/libgiowin32.la
183 appinfo_sources += gdesktopappinfo.c
184 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
185 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
187 gfiledescriptorbased.c \
189 gunixcredentialsmessage.c \
197 gunixsocketaddress.c \
200 gunixvolumemonitor.c \
201 gunixvolumemonitor.h \
203 gunixoutputstream.c \
207 giounixincludedir=$(includedir)/gio-unix-2.0/gio
208 giounixinclude_HEADERS = \
210 gfiledescriptorbased.h \
212 gunixcredentialsmessage.h \
217 gunixoutputstream.h \
218 gunixsocketaddress.h \
222 win32_actual_sources = \
227 gwin32volumemonitor.c \
228 gwin32volumemonitor.h \
229 gwin32inputstream.c \
230 gwin32outputstream.c \
231 gwin32outputstream.h \
234 win32_more_sources_for_vcproj = \
236 win32/gwin32directorymonitor.c \
237 win32/gwinhttpfile.c \
238 win32/gwinhttpfileinputstream.c \
239 win32/gwinhttpfileoutputstream.c \
243 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
244 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
245 win32_sources = $(win32_actual_sources)
247 giowin32includedir=$(includedir)/gio-win32-2.0/gio
248 giowin32include_HEADERS = \
249 gwin32inputstream.h \
250 gwin32outputstream.h \
257 libgio_2_0_la_SOURCES = \
265 gbufferedinputstream.c \
266 gbufferedoutputstream.c \
269 gcontenttypeprivate.h \
270 gcharsetconverter.c \
272 gconverterinputstream.c \
273 gconverteroutputstream.c \
276 gdataoutputstream.c \
286 gfileattribute-priv.h \
293 gfilenamecompleter.c \
294 gfileoutputstream.c \
296 gfilterinputstream.c \
297 gfilteroutputstream.c \
300 ginetsocketaddress.c \
311 gmemoryinputstream.c \
312 gmemoryoutputstream.c \
314 gnativevolumemonitor.c \
315 gnativevolumemonitor.h \
317 gnetworkingprivate.h \
325 gsimpleasyncresult.c \
326 gsimplepermission.c \
329 gsocketaddressenumerator.c \
331 gsocketconnectable.c \
332 gsocketconnection.c \
333 gsocketcontrolmessage.c \
334 gsocketinputstream.c \
335 gsocketinputstream.h \
337 gsocketoutputstream.c \
338 gsocketoutputstream.h \
342 gthreadedsocketservice.c\
344 gthreadedresolver.c \
345 gthreadedresolver.h \
346 gunionvolumemonitor.c \
347 gunionvolumemonitor.h \
352 gzlibdecompressor.c \
359 $(settings_sources) \
365 EXTRA_DIST += gnullapplication.c gdbusapplication.c strinfo.c
367 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
369 libgio_2_0_la_LIBADD = \
370 $(top_builddir)/glib/libglib-2.0.la \
371 $(top_builddir)/gobject/libgobject-2.0.la \
372 $(top_builddir)/gmodule/libgmodule-2.0.la \
381 no_undefined = -no-undefined
384 if OS_WIN32_AND_DLL_COMPILATION
385 export_symbols = -export-symbols gio.def
388 gio_win32_res = gio-win32-res.o
389 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
392 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
395 -rm $(DESTDIR)$(libdir)/gio-2.0.def
400 export_symbols = -export-symbols-regex '^g_.*'
403 install-data-local: install-ms-lib install-def-file
404 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
406 uninstall-local: uninstall-ms-lib uninstall-def-file
408 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
409 $(gio_win32_res_ldflag) \
410 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
411 -export-dynamic $(no_undefined) $(export_symbols)
413 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
415 gio-win32-res.o: gio.rc
423 gbufferedinputstream.h \
424 gbufferedoutputstream.h \
427 gcharsetconverter.h \
429 gconverterinputstream.h \
430 gconverteroutputstream.h \
432 gdataoutputstream.h \
443 gfilenamecompleter.h \
444 gfileoutputstream.h \
446 gfilterinputstream.h \
447 gfilteroutputstream.h \
450 ginetsocketaddress.h \
462 gmemoryinputstream.h \
463 gmemoryoutputstream.h \
465 gnativevolumemonitor.h \
472 gsimpleasyncresult.h \
473 gsimplepermission.h \
476 gsocketaddressenumerator.h \
478 gsocketconnectable.h \
479 gsocketconnection.h \
480 gsocketcontrolmessage.h \
485 gthreadedsocketservice.h\
491 gzlibdecompressor.h \
492 $(settings_headers) \
496 gioincludedir=$(includedir)/glib-2.0/gio/
497 gioinclude_HEADERS = \
501 # these sources (also mentioned above) are generated.
512 gioenumtypes.h.template \
513 gioenumtypes.c.template \
527 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
528 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
529 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
530 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
532 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
533 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
534 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
535 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
537 gio-2.0.lib: libgio-2.0.la gio.def
538 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
540 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
542 gio_querymodules_SOURCES = gio-querymodules.c
543 gio_querymodules_LDADD = \
544 $(top_builddir)/glib/libglib-2.0.la \
545 $(top_builddir)/gobject/libgobject-2.0.la \
546 $(top_builddir)/gmodule/libgmodule-2.0.la \
550 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
551 glib_compile_schemas_SOURCES = \
553 gvdb/gvdb-builder.h \
554 gvdb/gvdb-builder.c \
558 $(top_builddir)/glib/libglib-2.0.la \
559 $(top_builddir)/gobject/libgobject-2.0.la \
561 gsettings_SOURCES = gsettings-tool.c
563 schemadir = $(datadir)/glib-2.0/schemas
564 dist_schema_DATA = gschema.dtd
566 # ------------------------------------------------------------------------
569 bin_PROGRAMS += gdbus
570 gdbus_SOURCES = gdbus-tool.c
571 gdbus_LDADD = libgio-2.0.la \
572 $(top_builddir)/glib/libglib-2.0.la \
573 $(top_builddir)/gobject/libgobject-2.0.la
575 completiondir = $(sysconfdir)/bash_completion.d
576 completion_SCRIPTS = \
577 gdbus-bash-completion.sh \
578 gsettings-bash-completion.sh
579 EXTRA_DIST += $(completion_SCRIPTS)
581 # ------------------------------------------------------------------------
583 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
584 files='$(BUILT_EXTRA_DIST)'; \
585 for f in $$files; do \
586 if test -f $$f; then d=.; else d=$(srcdir); fi; \
587 cp $$d/$$f $(distdir) || exit 1; done
589 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
590 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
592 gunix*.c|gdesktopappinfo.c) ;; \
593 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
596 done | sort -u >libgio.sourcefiles
597 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
598 rm libgio.sourcefiles
600 if HAVE_GLIB_RUNTIME_LIBDIR
602 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
603 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
604 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
605 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
606 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so