Merge the keyfile settings backend.
[platform/upstream/glib.git] / gio / Makefile.am
index e699496..1f3ff10 100644 (file)
@@ -2,12 +2,27 @@ include $(top_srcdir)/Makefile.decl
 
 NULL =
 
-SUBDIRS= 
+SUBDIRS=
 
 if OS_UNIX
-SUBDIRS += xdgmime
+SUBDIRS += libasyncns xdgmime
 endif
 
+if OS_WIN32_AND_DLL_COMPILATION
+if MS_LIB_AVAILABLE
+noinst_DATA = gio-2.0.lib
+
+install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
+uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
+endif
+endif
+
+install-ms-lib:
+       $(install_ms_lib_cmd)
+
+uninstall-ms-lib:
+       $(uninstall_ms_lib_cmd)
+
 gio.def: gio.symbols
        (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 && \
          mv gio.def.tmp gio.def
@@ -26,6 +41,10 @@ TESTS = abicheck.sh pltcheck.sh
 endif
 endif
 
+if HAVE_THREADS
+THREAD_FLAGS=-DG_THREADS_MANDATORY
+endif
+
 AM_CPPFLAGS = \
        -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
        -I$(top_builddir)                               \
@@ -33,6 +52,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/glib                            \
        -I$(top_srcdir)/gmodule                         \
        $(GLIB_DEBUG_FLAGS)                             \
+       $(THREAD_FLAGS)                                 \
        -DG_DISABLE_DEPRECATED                          \
        -DGIO_COMPILATION                               \
        -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
@@ -51,14 +71,36 @@ else
 endif
 
 gio-marshal.h: gio-marshal.list
-       $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header > $@.tmp && \
+       $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
          mv $@.tmp $@
 
 gio-marshal.c: gio-marshal.h gio-marshal.list
        (echo "#include \"gio-marshal.h\""; \
-       $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body) > $@.tmp && \
+       $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
          mv $@.tmp $@
 
+settings_headers = \
+       gsettingsbackend.h              \
+       gsettings.h
+
+settings_sources = \
+       gvdb/gvdb-format.h              \
+       gvdb/gvdb-reader.h              \
+       gvdb/gvdb-reader.c              \
+       gdelayedsettingsbackend.h       \
+       gdelayedsettingsbackend.c       \
+       gkeyfilesettingsbackend.h       \
+       gkeyfilesettingsbackend.c       \
+       gnullsettingsbackend.h          \
+       gnullsettingsbackend.c          \
+       gsettingsbackendinternal.h      \
+       gsettingsbackend.c              \
+       gsettingsschema.h               \
+       gsettingsschema.c               \
+       gsettings-mapping.h             \
+       gsettings-mapping.c             \
+       gsettings.c
+
 local_sources = \
        glocaldirectorymonitor.c        \
        glocaldirectorymonitor.h        \
@@ -74,18 +116,36 @@ local_sources = \
        glocalfilemonitor.h             \
        glocalfileoutputstream.c        \
        glocalfileoutputstream.h        \
+       glocalfileiostream.c            \
+       glocalfileiostream.h            \
        glocalvfs.c                     \
        glocalvfs.h                     \
        $(NULL)
 
 platform_libadd =
+platform_deps =
 appinfo_sources =
 
 if HAVE_INOTIFY
 SUBDIRS += inotify
 platform_libadd += inotify/libinotify.la
+platform_deps += inotify/libinotify.la
 endif
 
+if HAVE_FEN
+AM_CPPFLAGS += -DHAVE_FEN
+SUBDIRS += fen
+platform_libadd += fen/libfen.la
+platform_deps += fen/libfen.la
+endif
+
+if OS_WIN32
+SUBDIRS += win32
+platform_libadd += win32/libgiowin32.la
+platform_deps += win32/libgiowin32.la
+endif
+
+
 SUBDIRS += .
 
 if HAVE_FAM
@@ -94,12 +154,19 @@ endif
 
 if OS_UNIX
 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
-platform_libadd += xdgmime/libxdgmime.la
+platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
+platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
 unix_sources = \
+       gunixconnection.c       \
+       gunixfdlist.c           \
+       gunixfdmessage.c        \
        gunixmount.c            \
        gunixmount.h            \
        gunixmounts.c           \
        gunixmounts.h           \
+       gunixresolver.c         \
+       gunixresolver.h         \
+       gunixsocketaddress.c    \
        gunixvolume.c           \
        gunixvolume.h           \
        gunixvolumemonitor.c    \
@@ -112,51 +179,84 @@ unix_sources = \
 giounixincludedir=$(includedir)/gio-unix-2.0/gio
 giounixinclude_HEADERS = \
        gdesktopappinfo.h       \
+       gfiledescriptorbased.h  \
+       gunixconnection.h       \
        gunixmounts.h           \
+       gunixfdlist.h           \
+       gunixfdmessage.h        \
        gunixinputstream.h      \
        gunixoutputstream.h     \
+       gunixsocketaddress.h    \
        $(NULL)
 endif
 
 if OS_WIN32
 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
-platform_libadd += -lshlwapi
+platform_libadd += -lshlwapi -lws2_32 -ldnsapi
+win32_sources = \
+       gwin32mount.c \
+       gwin32mount.h \
+       gwin32resolver.c \
+       gwin32resolver.h \
+       gwin32volumemonitor.c \
+       gwin32volumemonitor.h \
+       $(NULL)
+
 endif
 
+SUBDIRS += tests
+
 libgio_2_0_la_SOURCES =                \
        gappinfo.c              \
        gasynchelper.c          \
        gasynchelper.h          \
+       gasyncinitable.c        \
        gasyncresult.c          \
        gbufferedinputstream.c  \
        gbufferedoutputstream.c \
        gcancellable.c          \
        gcontenttype.c          \
        gcontenttypeprivate.h   \
+       gcharsetconverter.c     \
+       gconverter.c            \
+       gconverterinputstream.c \
+       gconverteroutputstream.c        \
        gdatainputstream.c      \
        gdataoutputstream.c     \
-       gdirectorymonitor.c     \
        gdrive.c                \
        gdummyfile.h            \
        gdummyfile.c            \
+       gemblem.h               \
+       gemblem.c               \
+       gemblemedicon.h         \
+       gemblemedicon.c         \
        gfile.c                 \
        gfileattribute.c        \
        gfileattribute-priv.h   \
+       gfiledescriptorbased.h  \
+       gfiledescriptorbased.c  \
        gfileenumerator.c       \
        gfileicon.c             \
        gfileinfo.c             \
+       gfileinfo-priv.h        \
        gfileinputstream.c      \
        gfilemonitor.c          \
        gfilenamecompleter.c    \
        gfileoutputstream.c     \
+       gfileiostream.c         \
        gfilterinputstream.c    \
        gfilteroutputstream.c   \
        gicon.c                 \
+       ginetaddress.c          \
+       ginetsocketaddress.c    \
+       ginitable.c             \
        ginputstream.c          \
+       gioenums.h              \
        gioerror.c              \
        giomodule.c             \
        giomodule-priv.h        \
        gioscheduler.c          \
+       giostream.c             \
        gloadableicon.c         \
        gmount.c                \
        gmemoryinputstream.c    \
@@ -164,22 +264,50 @@ libgio_2_0_la_SOURCES =           \
        gmountoperation.c       \
        gnativevolumemonitor.c  \
        gnativevolumemonitor.h  \
+       gnetworkaddress.c       \
+       gnetworkingprivate.h    \
+       gnetworkservice.c       \
        goutputstream.c         \
        gpollfilemonitor.c      \
        gpollfilemonitor.h      \
+       gresolver.c             \
        gseekable.c             \
        gsimpleasyncresult.c    \
+       gsocket.c               \
+       gsocketaddress.c        \
+       gsocketaddressenumerator.c \
+       gsocketclient.c         \
+       gsocketconnectable.c    \
+       gsocketconnection.c     \
+       gsocketcontrolmessage.c \
+       gsocketinputstream.c    \
+       gsocketinputstream.h    \
+       gsocketlistener.c       \
+       gsocketoutputstream.c   \
+       gsocketoutputstream.h   \
+       gsocketservice.c        \
+       gsrvtarget.c            \
+       gtcpconnection.c        \
+       gthreadedsocketservice.c\
        gthemedicon.c           \
+       gthreadedresolver.c     \
+       gthreadedresolver.h     \
        gunionvolumemonitor.c   \
        gunionvolumemonitor.h   \
        gvfs.c                  \
        gvolume.c               \
        gvolumemonitor.c        \
+       gzlibcompressor.c       \
+       gzlibdecompressor.c     \
        gmountprivate.h         \
        gioenumtypes.h          \
        gioenumtypes.c          \
+       gioalias.h              \
+       gioaliasdef.c           \
        $(appinfo_sources)      \
        $(unix_sources)         \
+       $(win32_sources)        \
+       $(settings_sources)     \
        $(local_sources)        \
        $(marshal_sources)      \
        $(NULL)
@@ -191,28 +319,67 @@ libgio_2_0_la_LIBADD = \
        $(top_builddir)/gobject/libgobject-2.0.la       \
        $(top_builddir)/gmodule/libgmodule-2.0.la       \
        $(platform_libadd)                              \
+       $(ZLIB_LIBS)                                    \
        $(SELINUX_LIBS)                                 \
        $(GLIB_LIBS)                                    \
        $(XATTR_LIBS)                                   \
        $(NULL)
 
-if OS_WIN32
+if PLATFORM_WIN32
 no_undefined = -no-undefined
 endif
 
-libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) -export-symbols-regex '^g_.*'
+if OS_WIN32_AND_DLL_COMPILATION
+export_symbols = -export-symbols gio.def
+gio_def = gio.def
+
+gio_win32_res = gio-win32-res.o
+gio_win32_res_ldflag = -Wl,$(gio_win32_res)
+
+install-def-file:
+       $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
+
+uninstall-def-file:
+       -rm $(DESTDIR)$(libdir)/gio-2.0.def
+else
+install-def-file:
+uninstall-def-file:
+
+export_symbols = -export-symbols-regex '^g_.*'
+endif
+
+install-data-local: install-ms-lib install-def-file
+       $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
+
+uninstall-local: uninstall-ms-lib uninstall-def-file
+
+libgio_2_0_la_LDFLAGS = \
+       $(gio_win32_res_ldflag) \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+       -export-dynamic $(no_undefined) $(export_symbols)
+
+libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
+
+gio-win32-res.o: gio.rc
+       $(WINDRES) gio.rc $@
 
 gio_headers =                  \
        gappinfo.h              \
+       gasyncinitable.h        \
        gasyncresult.h          \
        gbufferedinputstream.h  \
        gbufferedoutputstream.h \
        gcancellable.h          \
        gcontenttype.h          \
+       gcharsetconverter.h     \
+       gconverter.h            \
+       gconverterinputstream.h \
+       gconverteroutputstream.h        \
        gdatainputstream.h      \
        gdataoutputstream.h     \
-       gdirectorymonitor.h     \
        gdrive.h                \
+       gemblem.h               \
+       gemblemedicon.h         \
        gfile.h                 \
        gfileattribute.h        \
        gfileenumerator.h       \
@@ -222,27 +389,52 @@ gio_headers =                     \
        gfilemonitor.h          \
        gfilenamecompleter.h    \
        gfileoutputstream.h     \
+       gfileiostream.h         \
        gfilterinputstream.h    \
        gfilteroutputstream.h   \
        gicon.h                 \
+       ginetaddress.h          \
+       ginetsocketaddress.h    \
        ginputstream.h          \
+       ginitable.h             \
        gio.h                   \
+       giotypes.h              \
+       gioenums.h              \
        gioerror.h              \
        giomodule.h             \
        gioscheduler.h          \
+       giostream.h             \
        gloadableicon.h         \
        gmount.h                \
        gmemoryinputstream.h    \
        gmemoryoutputstream.h   \
        gmountoperation.h       \
        gnativevolumemonitor.h  \
+       gnetworkaddress.h       \
+       gnetworkservice.h       \
        goutputstream.h         \
+       gresolver.h             \
        gseekable.h             \
        gsimpleasyncresult.h    \
+       gsocket.h               \
+       gsocketaddress.h        \
+       gsocketaddressenumerator.h \
+       gsocketclient.h         \
+       gsocketconnectable.h    \
+       gsocketconnection.h     \
+       gsocketcontrolmessage.h \
+       gsocketlistener.h       \
+       gsocketservice.h        \
+       gsrvtarget.h            \
+       gtcpconnection.h        \
+       gthreadedsocketservice.h\
        gthemedicon.h           \
        gvfs.h                  \
        gvolume.h               \
        gvolumemonitor.h        \
+       gzlibcompressor.h       \
+       gzlibdecompressor.h     \
+       $(settings_headers)     \
        $(NULL)
 
 gioincludedir=$(includedir)/glib-2.0/gio/
@@ -265,8 +457,16 @@ EXTRA_DIST +=                      \
        gio.symbols             \
        gioenumtypes.h.template \
        gioenumtypes.c.template \
+       makefile.msc            \
+       makegioalias.pl         \
+       abicheck.sh             \
+       pltcheck.sh             \
+       gio.rc.in               \
        $(NULL)
 
+BUILT_EXTRA_DIST =             \
+       gio.rc
+
 CLEANFILES =                   \
        $(marshal_sources)      \
        $(NULL)
@@ -280,3 +480,46 @@ gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
        ( top_builddir=`cd $(top_builddir) && pwd`; \
          cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
            gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
+
+gio-2.0.lib: libgio-2.0.la gio.def
+       lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
+
+bin_PROGRAMS = gio-querymodules gschema-compile
+gio_querymodules_SOURCES = gio-querymodules.c
+gio_querymodules_LDADD  = \
+       $(top_builddir)/glib/libglib-2.0.la             \
+       $(top_builddir)/gobject/libgobject-2.0.la       \
+       $(top_builddir)/gmodule/libgmodule-2.0.la       \
+       libgio-2.0.la                                   \
+       $(NULL)
+
+gschema_compile_LDADD = $(top_builddir)/glib/libglib-2.0.la
+gschema_compile_SOURCES = \
+       gvdb/gvdb-format.h              \
+       gvdb/gvdb-builder.h             \
+       gvdb/gvdb-builder.c             \
+       gschema-compile.c
+
+dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
+       files='$(BUILT_EXTRA_DIST)'; \
+       for f in $$files; do \
+         if test -f $$f; then d=.; else d=$(srcdir); fi; \
+         cp $$d/$$f $(distdir) || exit 1; done
+
+../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
+       for F in $(libgio_2_0_la_SOURCES); do \
+               case $$F in \
+               *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
+                    ;; \
+               esac; \
+       done >libgio.sourcefiles
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
+
+if HAVE_GLIB_RUNTIME_LIBDIR
+install-data-hook:
+       mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
+       mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
+       mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
+       rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
+       ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
+endif