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 (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
30 gioalias.h: gio.symbols
31 $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h.tmp && \
32 mv gioalias.h.tmp gioalias.h
34 gioaliasdef.c: gio.symbols
35 $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c.tmp && \
36 mv gioaliasdef.c.tmp gioaliasdef.c
39 if HAVE_GNUC_VISIBILITY
40 TESTS = abicheck.sh pltcheck.sh
45 THREAD_FLAGS=-DG_THREADS_MANDATORY
49 -DG_LOG_DOMAIN=\"GLib-GIO\" \
52 -I$(top_srcdir)/glib \
53 -I$(top_srcdir)/gmodule \
56 -DG_DISABLE_DEPRECATED \
58 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
60 lib_LTLIBRARIES = libgio-2.0.la
68 glib_genmarshal=$(GLIB_GENMARSHAL)
70 glib_genmarshal=../gobject/glib-genmarshal
73 gio-marshal.h: gio-marshal.list
74 $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
77 gio-marshal.c: gio-marshal.h gio-marshal.list
78 (echo "#include \"gio-marshal.h\""; \
79 $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
93 gdbusintrospection.h \
94 gdbusmethodinvocation.h \
99 gdbusutils.h gdbusutils.c \
100 gdbusaddress.h gdbusaddress.c \
101 gdbusauthobserver.h gdbusauthobserver.c \
102 gdbusauth.h gdbusauth.c \
103 gdbusauthmechanism.h gdbusauthmechanism.c \
104 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
105 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
106 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
107 gdbuserror.h gdbuserror.c \
108 gdbusconnection.h gdbusconnection.c \
109 gdbusmessage.h gdbusmessage.c \
110 gdbusnameowning.h gdbusnameowning.c \
111 gdbusnamewatching.h gdbusnamewatching.c \
112 gdbusproxy.h gdbusproxy.c \
113 gdbusprivate.h gdbusprivate.c \
114 gdbusintrospection.h gdbusintrospection.c \
115 gdbusmethodinvocation.h gdbusmethodinvocation.c \
116 gdbusserver.h gdbusserver.c \
127 gdelayedsettingsbackend.h \
128 gdelayedsettingsbackend.c \
129 gkeyfilesettingsbackend.h \
130 gkeyfilesettingsbackend.c \
131 gmemorysettingsbackend.h \
132 gmemorysettingsbackend.c \
133 gnullsettingsbackend.h \
134 gnullsettingsbackend.c \
135 gsettingsbackendinternal.h \
139 gsettings-mapping.h \
140 gsettings-mapping.c \
144 glocaldirectorymonitor.c \
145 glocaldirectorymonitor.h \
148 glocalfileenumerator.c \
149 glocalfileenumerator.h \
152 glocalfileinputstream.c \
153 glocalfileinputstream.h \
154 glocalfilemonitor.c \
155 glocalfilemonitor.h \
156 glocalfileoutputstream.c \
157 glocalfileoutputstream.h \
158 glocalfileiostream.c \
159 glocalfileiostream.h \
170 platform_libadd += inotify/libinotify.la
171 platform_deps += inotify/libinotify.la
175 AM_CPPFLAGS += -DHAVE_FEN
177 platform_libadd += fen/libfen.la
178 platform_deps += fen/libfen.la
183 platform_libadd += win32/libgiowin32.la
184 platform_deps += win32/libgiowin32.la
195 appinfo_sources += gdesktopappinfo.c
196 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
197 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
199 gfiledescriptorbased.c \
201 gunixcredentialsmessage.c \
209 gunixsocketaddress.c \
212 gunixvolumemonitor.c \
213 gunixvolumemonitor.h \
215 gunixoutputstream.c \
219 giounixincludedir=$(includedir)/gio-unix-2.0/gio
220 giounixinclude_HEADERS = \
222 gfiledescriptorbased.h \
224 gunixcredentialsmessage.h \
229 gunixoutputstream.h \
230 gunixsocketaddress.h \
235 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
236 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
242 gwin32volumemonitor.c \
243 gwin32volumemonitor.h \
244 gwin32inputstream.c \
245 gwin32outputstream.c \
246 gwin32outputstream.h \
249 win32_more_sources_for_vcproj = \
251 win32/gwin32directorymonitor.c \
252 win32/gwinhttpfile.c \
253 win32/gwinhttpfileinputstream.c \
254 win32/gwinhttpfileoutputstream.c \
257 giowin32includedir=$(includedir)/gio-win32-2.0/gio
258 giowin32include_HEADERS = \
259 gwin32inputstream.h \
260 gwin32outputstream.h \
267 libgio_2_0_la_SOURCES = \
275 gbufferedinputstream.c \
276 gbufferedoutputstream.c \
279 gcontenttypeprivate.h \
280 gcharsetconverter.c \
282 gconverterinputstream.c \
283 gconverteroutputstream.c \
286 gdataoutputstream.c \
296 gfileattribute-priv.h \
303 gfilenamecompleter.c \
304 gfileoutputstream.c \
306 gfilterinputstream.c \
307 gfilteroutputstream.c \
310 ginetsocketaddress.c \
321 gmemoryinputstream.c \
322 gmemoryoutputstream.c \
324 gnativevolumemonitor.c \
325 gnativevolumemonitor.h \
327 gnetworkingprivate.h \
335 gsimpleasyncresult.c \
336 gsimplepermission.c \
339 gsocketaddressenumerator.c \
341 gsocketconnectable.c \
342 gsocketconnection.c \
343 gsocketcontrolmessage.c \
344 gsocketinputstream.c \
345 gsocketinputstream.h \
347 gsocketoutputstream.c \
348 gsocketoutputstream.h \
352 gthreadedsocketservice.c\
354 gthreadedresolver.c \
355 gthreadedresolver.h \
356 gunionvolumemonitor.c \
357 gunionvolumemonitor.h \
362 gzlibdecompressor.c \
371 $(settings_sources) \
377 EXTRA_DIST += gnullapplication.c gdbusapplication.c
379 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
381 libgio_2_0_la_LIBADD = \
382 $(top_builddir)/glib/libglib-2.0.la \
383 $(top_builddir)/gobject/libgobject-2.0.la \
384 $(top_builddir)/gmodule/libgmodule-2.0.la \
393 no_undefined = -no-undefined
396 if OS_WIN32_AND_DLL_COMPILATION
397 export_symbols = -export-symbols gio.def
400 gio_win32_res = gio-win32-res.o
401 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
404 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
407 -rm $(DESTDIR)$(libdir)/gio-2.0.def
412 export_symbols = -export-symbols-regex '^g_.*'
415 install-data-local: install-ms-lib install-def-file
416 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
418 uninstall-local: uninstall-ms-lib uninstall-def-file
420 libgio_2_0_la_LDFLAGS = \
421 $(gio_win32_res_ldflag) \
422 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
423 -export-dynamic $(no_undefined) $(export_symbols)
425 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
427 gio-win32-res.o: gio.rc
435 gbufferedinputstream.h \
436 gbufferedoutputstream.h \
439 gcharsetconverter.h \
441 gconverterinputstream.h \
442 gconverteroutputstream.h \
444 gdataoutputstream.h \
455 gfilenamecompleter.h \
456 gfileoutputstream.h \
458 gfilterinputstream.h \
459 gfilteroutputstream.h \
462 ginetsocketaddress.h \
474 gmemoryinputstream.h \
475 gmemoryoutputstream.h \
477 gnativevolumemonitor.h \
484 gsimpleasyncresult.h \
485 gsimplepermission.h \
488 gsocketaddressenumerator.h \
490 gsocketconnectable.h \
491 gsocketconnection.h \
492 gsocketcontrolmessage.h \
497 gthreadedsocketservice.h\
503 gzlibdecompressor.h \
504 $(settings_headers) \
508 gioincludedir=$(includedir)/glib-2.0/gio/
509 gioinclude_HEADERS = \
513 # these sources (also mentioned above) are generated.
526 gioenumtypes.h.template \
527 gioenumtypes.c.template \
543 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
544 ( top_builddir=`cd $(top_builddir) && pwd`; \
545 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
546 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
548 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
549 ( top_builddir=`cd $(top_builddir) && pwd`; \
550 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
551 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
553 gio-2.0.lib: libgio-2.0.la gio.def
554 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
556 dist_bin_SCRIPTS = gsettings-schema-convert
557 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
559 gio_querymodules_SOURCES = gio-querymodules.c
560 gio_querymodules_LDADD = \
561 $(top_builddir)/glib/libglib-2.0.la \
562 $(top_builddir)/gobject/libgobject-2.0.la \
563 $(top_builddir)/gmodule/libgmodule-2.0.la \
567 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
568 glib_compile_schemas_SOURCES = \
570 gvdb/gvdb-builder.h \
571 gvdb/gvdb-builder.c \
575 $(top_builddir)/glib/libglib-2.0.la \
576 $(top_builddir)/gobject/libgobject-2.0.la \
578 gsettings_SOURCES = gsettings-tool.c
580 schemadir = $(datadir)/glib-2.0/schemas
581 dist_schema_DATA = gschema.dtd
583 # ------------------------------------------------------------------------
586 bin_PROGRAMS += gdbus
587 gdbus_SOURCES = gdbus-tool.c
588 gdbus_LDADD = libgio-2.0.la \
589 $(top_builddir)/glib/libglib-2.0.la \
590 $(top_builddir)/gobject/libgobject-2.0.la
592 completiondir = $(sysconfdir)/bash_completion.d
593 completion_SCRIPTS = gdbus-bash-completion.sh
594 EXTRA_DIST += $(completion_SCRIPTS)
596 # ------------------------------------------------------------------------
598 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
599 files='$(BUILT_EXTRA_DIST)'; \
600 for f in $$files; do \
601 if test -f $$f; then d=.; else d=$(srcdir); fi; \
602 cp $$d/$$f $(distdir) || exit 1; done
604 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
605 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
607 gunix*.c|gdesktopappinfo.c) ;; \
608 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
611 done | sort -u >libgio.sourcefiles
612 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
613 rm libgio.sourcefiles
615 if HAVE_GLIB_RUNTIME_LIBDIR
617 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
618 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
619 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
620 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
621 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so