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\" \
44 -I$(top_srcdir)/glib \
45 -I$(top_srcdir)/gmodule \
48 -DG_DISABLE_DEPRECATED \
50 -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
52 lib_LTLIBRARIES = libgio-2.0.la
60 glib_genmarshal=$(GLIB_GENMARSHAL)
62 glib_genmarshal=../gobject/glib-genmarshal
65 gio-marshal.h: gio-marshal.list
66 $(AM_V_GEN) $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
69 gio-marshal.c: gio-marshal.h gio-marshal.list
70 $(AM_V_GEN) (echo "#include \"gio-marshal.h\""; \
71 $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
85 gdbusintrospection.h \
86 gdbusmethodinvocation.h \
91 gdbusutils.h gdbusutils.c \
92 gdbusaddress.h gdbusaddress.c \
93 gdbusauthobserver.h gdbusauthobserver.c \
94 gdbusauth.h gdbusauth.c \
95 gdbusauthmechanism.h gdbusauthmechanism.c \
96 gdbusauthmechanismanon.h gdbusauthmechanismanon.c \
97 gdbusauthmechanismexternal.h gdbusauthmechanismexternal.c \
98 gdbusauthmechanismsha1.h gdbusauthmechanismsha1.c \
99 gdbuserror.h gdbuserror.c \
100 gdbusconnection.h gdbusconnection.c \
101 gdbusmessage.h gdbusmessage.c \
102 gdbusnameowning.h gdbusnameowning.c \
103 gdbusnamewatching.h gdbusnamewatching.c \
104 gdbusproxy.h gdbusproxy.c \
105 gdbusprivate.h gdbusprivate.c \
106 gdbusintrospection.h gdbusintrospection.c \
107 gdbusmethodinvocation.h gdbusmethodinvocation.c \
108 gdbusserver.h gdbusserver.c \
119 gdelayedsettingsbackend.h \
120 gdelayedsettingsbackend.c \
121 gkeyfilesettingsbackend.c \
122 gmemorysettingsbackend.h \
123 gmemorysettingsbackend.c \
124 gnullsettingsbackend.h \
125 gnullsettingsbackend.c \
126 gsettingsbackendinternal.h \
130 gsettings-mapping.h \
131 gsettings-mapping.c \
135 glocaldirectorymonitor.c \
136 glocaldirectorymonitor.h \
139 glocalfileenumerator.c \
140 glocalfileenumerator.h \
143 glocalfileinputstream.c \
144 glocalfileinputstream.h \
145 glocalfilemonitor.c \
146 glocalfilemonitor.h \
147 glocalfileoutputstream.c \
148 glocalfileoutputstream.h \
149 glocalfileiostream.c \
150 glocalfileiostream.h \
161 platform_libadd += inotify/libinotify.la
162 platform_deps += inotify/libinotify.la
166 AM_CPPFLAGS += -DHAVE_FEN
168 platform_libadd += fen/libfen.la
169 platform_deps += fen/libfen.la
174 platform_libadd += win32/libgiowin32.la
175 platform_deps += win32/libgiowin32.la
186 appinfo_sources += gdesktopappinfo.c
187 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
188 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
190 gfiledescriptorbased.c \
192 gunixcredentialsmessage.c \
200 gunixsocketaddress.c \
203 gunixvolumemonitor.c \
204 gunixvolumemonitor.h \
206 gunixoutputstream.c \
210 giounixincludedir=$(includedir)/gio-unix-2.0/gio
211 giounixinclude_HEADERS = \
213 gfiledescriptorbased.h \
215 gunixcredentialsmessage.h \
220 gunixoutputstream.h \
221 gunixsocketaddress.h \
225 win32_actual_sources = \
230 gwin32volumemonitor.c \
231 gwin32volumemonitor.h \
232 gwin32inputstream.c \
233 gwin32outputstream.c \
234 gwin32outputstream.h \
237 win32_more_sources_for_vcproj = \
239 win32/gwin32directorymonitor.c \
240 win32/gwinhttpfile.c \
241 win32/gwinhttpfileinputstream.c \
242 win32/gwinhttpfileoutputstream.c \
246 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
247 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
248 win32_sources = $(win32_actual_sources)
250 giowin32includedir=$(includedir)/gio-win32-2.0/gio
251 giowin32include_HEADERS = \
252 gwin32inputstream.h \
253 gwin32outputstream.h \
260 libgio_2_0_la_SOURCES = \
268 gbufferedinputstream.c \
269 gbufferedoutputstream.c \
272 gcontenttypeprivate.h \
273 gcharsetconverter.c \
275 gconverterinputstream.c \
276 gconverteroutputstream.c \
279 gdataoutputstream.c \
289 gfileattribute-priv.h \
296 gfilenamecompleter.c \
297 gfileoutputstream.c \
299 gfilterinputstream.c \
300 gfilteroutputstream.c \
303 ginetsocketaddress.c \
314 gmemoryinputstream.c \
315 gmemoryoutputstream.c \
317 gnativevolumemonitor.c \
318 gnativevolumemonitor.h \
320 gnetworkingprivate.h \
328 gsimpleasyncresult.c \
329 gsimplepermission.c \
332 gsocketaddressenumerator.c \
334 gsocketconnectable.c \
335 gsocketconnection.c \
336 gsocketcontrolmessage.c \
337 gsocketinputstream.c \
338 gsocketinputstream.h \
340 gsocketoutputstream.c \
341 gsocketoutputstream.h \
345 gthreadedsocketservice.c\
347 gthreadedresolver.c \
348 gthreadedresolver.h \
349 gunionvolumemonitor.c \
350 gunionvolumemonitor.h \
355 gzlibdecompressor.c \
362 $(settings_sources) \
368 EXTRA_DIST += gnullapplication.c gdbusapplication.c strinfo.c
370 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
372 libgio_2_0_la_LIBADD = \
373 $(top_builddir)/glib/libglib-2.0.la \
374 $(top_builddir)/gobject/libgobject-2.0.la \
375 $(top_builddir)/gmodule/libgmodule-2.0.la \
384 no_undefined = -no-undefined
387 if OS_WIN32_AND_DLL_COMPILATION
388 export_symbols = -export-symbols gio.def
391 gio_win32_res = gio-win32-res.o
392 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
395 $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
398 -rm $(DESTDIR)$(libdir)/gio-2.0.def
403 export_symbols = -export-symbols-regex '^g_.*'
406 install-data-local: install-ms-lib install-def-file
407 $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
409 uninstall-local: uninstall-ms-lib uninstall-def-file
411 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
412 $(gio_win32_res_ldflag) \
413 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
414 -export-dynamic $(no_undefined) $(export_symbols)
416 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
418 gio-win32-res.o: gio.rc
426 gbufferedinputstream.h \
427 gbufferedoutputstream.h \
430 gcharsetconverter.h \
432 gconverterinputstream.h \
433 gconverteroutputstream.h \
435 gdataoutputstream.h \
446 gfilenamecompleter.h \
447 gfileoutputstream.h \
449 gfilterinputstream.h \
450 gfilteroutputstream.h \
453 ginetsocketaddress.h \
465 gmemoryinputstream.h \
466 gmemoryoutputstream.h \
468 gnativevolumemonitor.h \
475 gsimpleasyncresult.h \
476 gsimplepermission.h \
479 gsocketaddressenumerator.h \
481 gsocketconnectable.h \
482 gsocketconnection.h \
483 gsocketcontrolmessage.h \
488 gthreadedsocketservice.h\
494 gzlibdecompressor.h \
495 $(settings_headers) \
499 gioincludedir=$(includedir)/glib-2.0/gio/
500 gioinclude_HEADERS = \
504 # these sources (also mentioned above) are generated.
515 gioenumtypes.h.template \
516 gioenumtypes.c.template \
530 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
531 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
532 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
533 gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
535 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
536 $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
537 cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
538 gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
540 gio-2.0.lib: libgio-2.0.la gio.def
541 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
543 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
545 gio_querymodules_SOURCES = gio-querymodules.c
546 gio_querymodules_LDADD = \
547 $(top_builddir)/glib/libglib-2.0.la \
548 $(top_builddir)/gobject/libgobject-2.0.la \
549 $(top_builddir)/gmodule/libgmodule-2.0.la \
553 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
554 glib_compile_schemas_SOURCES = \
556 gvdb/gvdb-builder.h \
557 gvdb/gvdb-builder.c \
561 $(top_builddir)/glib/libglib-2.0.la \
562 $(top_builddir)/gobject/libgobject-2.0.la \
564 gsettings_SOURCES = gsettings-tool.c
566 schemadir = $(datadir)/glib-2.0/schemas
567 dist_schema_DATA = gschema.dtd
569 # ------------------------------------------------------------------------
572 bin_PROGRAMS += gdbus
573 gdbus_SOURCES = gdbus-tool.c
574 gdbus_LDADD = libgio-2.0.la \
575 $(top_builddir)/glib/libglib-2.0.la \
576 $(top_builddir)/gobject/libgobject-2.0.la
578 completiondir = $(sysconfdir)/bash_completion.d
579 completion_SCRIPTS = \
580 gdbus-bash-completion.sh \
581 gsettings-bash-completion.sh
582 EXTRA_DIST += $(completion_SCRIPTS)
584 # ------------------------------------------------------------------------
586 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
587 files='$(BUILT_EXTRA_DIST)'; \
588 for f in $$files; do \
589 if test -f $$f; then d=.; else d=$(srcdir); fi; \
590 cp $$d/$$f $(distdir) || exit 1; done
592 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
593 for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
595 gunix*.c|gdesktopappinfo.c) ;; \
596 *.c) echo ' <File RelativePath="..\..\..\gio\'$$F'" />' \
599 done | sort -u >libgio.sourcefiles
600 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
601 rm libgio.sourcefiles
603 if HAVE_GLIB_RUNTIME_LIBDIR
605 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
606 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
607 mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
608 rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
609 ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so