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 && \
85 gunixcredentialsmessage.h \
93 gdbusproxywatching.h \
95 gdbusintrospection.h \
96 gdbusmethodinvocation.h \
101 gdbusutils.h gdbusutils.c \
102 gcredentials.h gcredentials.c \
103 gunixcredentialsmessage.h gunixcredentialsmessage.c \
104 gdbusaddress.h gdbusaddress.c \
105 gdbusauthobserver.h gdbusauthobserver.c \
106 gdbusauth.h gdbusauth.c \
107 gdbusauthmechanism.h gdbusauthmechanism.c \
108 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
109 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
110 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
111 gdbuserror.h gdbuserror.c \
112 gdbusconnection.h gdbusconnection.c \
113 gdbusmessage.h gdbusmessage.c \
114 gdbusnameowning.h gdbusnameowning.c \
115 gdbusnamewatching.h gdbusnamewatching.c \
116 gdbusproxywatching.h gdbusproxywatching.c \
117 gdbusproxy.h gdbusproxy.c \
118 gdbusprivate.h gdbusprivate.c \
119 gdbusintrospection.h gdbusintrospection.c \
120 gdbusmethodinvocation.h gdbusmethodinvocation.c \
121 gdbusserver.h gdbusserver.c \
132 gdelayedsettingsbackend.h \
133 gdelayedsettingsbackend.c \
134 gkeyfilesettingsbackend.h \
135 gkeyfilesettingsbackend.c \
136 gmemorysettingsbackend.h \
137 gmemorysettingsbackend.c \
138 gnullsettingsbackend.h \
139 gnullsettingsbackend.c \
140 gsettingsbackendinternal.h \
144 gsettings-mapping.h \
145 gsettings-mapping.c \
149 glocaldirectorymonitor.c \
150 glocaldirectorymonitor.h \
153 glocalfileenumerator.c \
154 glocalfileenumerator.h \
157 glocalfileinputstream.c \
158 glocalfileinputstream.h \
159 glocalfilemonitor.c \
160 glocalfilemonitor.h \
161 glocalfileoutputstream.c \
162 glocalfileoutputstream.h \
163 glocalfileiostream.c \
164 glocalfileiostream.h \
175 platform_libadd += inotify/libinotify.la
176 platform_deps += inotify/libinotify.la
180 AM_CPPFLAGS += -DHAVE_FEN
182 platform_libadd += fen/libfen.la
183 platform_deps += fen/libfen.la
188 platform_libadd += win32/libgiowin32.la
189 platform_deps += win32/libgiowin32.la
200 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
201 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
202 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
213 gunixsocketaddress.c \
216 gunixvolumemonitor.c \
217 gunixvolumemonitor.h \
219 gunixoutputstream.c \
223 giounixincludedir=$(includedir)/gio-unix-2.0/gio
224 giounixinclude_HEADERS = \
226 gfiledescriptorbased.h \
232 gunixoutputstream.h \
233 gunixsocketaddress.h \
238 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
239 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
245 gwin32volumemonitor.c \
246 gwin32volumemonitor.h \
247 gwin32inputstream.c \
248 gwin32outputstream.c \
249 gwin32outputstream.h \
252 win32_more_sources_for_vcproj = \
254 win32/gwin32directorymonitor.c \
255 win32/gwinhttpfile.c \
256 win32/gwinhttpfileinputstream.c \
257 win32/gwinhttpfileoutputstream.c \
260 giowin32includedir=$(includedir)/gio-win32-2.0/gio
261 giowin32include_HEADERS = \
262 gwin32inputstream.h \
263 gwin32outputstream.h \
270 libgio_2_0_la_SOURCES = \
276 gbufferedinputstream.c \
277 gbufferedoutputstream.c \
280 gcontenttypeprivate.h \
281 gcharsetconverter.c \
283 gconverterinputstream.c \
284 gconverteroutputstream.c \
286 gdataoutputstream.c \
296 gfileattribute-priv.h \
297 gfiledescriptorbased.h \
298 gfiledescriptorbased.c \
305 gfilenamecompleter.c \
306 gfileoutputstream.c \
308 gfilterinputstream.c \
309 gfilteroutputstream.c \
312 ginetsocketaddress.c \
323 gmemoryinputstream.c \
324 gmemoryoutputstream.c \
326 gnativevolumemonitor.c \
327 gnativevolumemonitor.h \
329 gnetworkingprivate.h \
336 gsimpleasyncresult.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 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
379 libgio_2_0_la_LIBADD = \
380 $(top_builddir)/glib/libglib-2.0.la \
381 $(top_builddir)/gobject/libgobject-2.0.la \
382 $(top_builddir)/gmodule/libgmodule-2.0.la \
391 no_undefined = -no-undefined
394 if OS_WIN32_AND_DLL_COMPILATION
395 export_symbols = -export-symbols gio.def
398 gio_win32_res = gio-win32-res.o
399 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
402 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
405 -rm $(DESTDIR)$(libdir)/gio-2.0.def
410 export_symbols = -export-symbols-regex '^g_.*'
413 install-data-local: install-ms-lib install-def-file
414 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
416 uninstall-local: uninstall-ms-lib uninstall-def-file
418 libgio_2_0_la_LDFLAGS = \
419 $(gio_win32_res_ldflag) \
420 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
421 -export-dynamic $(no_undefined) $(export_symbols)
423 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
425 gio-win32-res.o: gio.rc
432 gbufferedinputstream.h \
433 gbufferedoutputstream.h \
436 gcharsetconverter.h \
438 gconverterinputstream.h \
439 gconverteroutputstream.h \
441 gdataoutputstream.h \
452 gfilenamecompleter.h \
453 gfileoutputstream.h \
455 gfilterinputstream.h \
456 gfilteroutputstream.h \
459 ginetsocketaddress.h \
471 gmemoryinputstream.h \
472 gmemoryoutputstream.h \
474 gnativevolumemonitor.h \
480 gsimpleasyncresult.h \
483 gsocketaddressenumerator.h \
485 gsocketconnectable.h \
486 gsocketconnection.h \
487 gsocketcontrolmessage.h \
492 gthreadedsocketservice.h\
498 gzlibdecompressor.h \
499 $(settings_headers) \
503 gioincludedir=$(includedir)/glib-2.0/gio/
504 gioinclude_HEADERS = \
508 # these sources (also mentioned above) are generated.
521 gioenumtypes.h.template \
522 gioenumtypes.c.template \
538 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
539 ( top_builddir=`cd $(top_builddir) && pwd`; \
540 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
541 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
543 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
544 ( top_builddir=`cd $(top_builddir) && pwd`; \
545 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
546 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
548 gio-2.0.lib: libgio-2.0.la gio.def
549 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
551 dist_bin_SCRIPTS = gsettings-schema-convert
552 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
554 gio_querymodules_SOURCES = gio-querymodules.c
555 gio_querymodules_LDADD = \
556 $(top_builddir)/glib/libglib-2.0.la \
557 $(top_builddir)/gobject/libgobject-2.0.la \
558 $(top_builddir)/gmodule/libgmodule-2.0.la \
562 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
563 glib_compile_schemas_SOURCES = \
565 gvdb/gvdb-builder.h \
566 gvdb/gvdb-builder.c \
570 $(top_builddir)/glib/libglib-2.0.la \
572 gsettings_SOURCES = gsettings-tool.c
574 schemadir = $(datadir)/glib-2.0/schemas
575 dist_schema_DATA = gschema.dtd
577 # ------------------------------------------------------------------------
580 bin_PROGRAMS += gdbus
581 gdbus_SOURCES = gdbus-tool.c
582 gdbus_LDADD = libgio-2.0.la
584 completiondir = $(sysconfdir)/bash_completion.d
585 completion_SCRIPTS = gdbus-bash-completion.sh
586 EXTRA_DIST += $(completion_SCRIPTS)
588 # ------------------------------------------------------------------------
590 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
591 files='$(BUILT_EXTRA_DIST)'; \
592 for f in $$files; do \
593 if test -f $$f; then d=.; else d=$(srcdir); fi; \
594 cp $$d/$$f $(distdir) || exit 1; done
596 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
597 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
599 gunix*.c|gdesktopappinfo.c) ;; \
600 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
603 done | sort -u >libgio.sourcefiles
604 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
605 rm libgio.sourcefiles
607 if HAVE_GLIB_RUNTIME_LIBDIR
609 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
610 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
611 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
612 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
613 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so