Fix out of tree build for MinGW/MSYS
[platform/upstream/glib.git] / gio / Makefile.am
index bc90cc5..69db690 100644 (file)
@@ -2,10 +2,10 @@ include $(top_srcdir)/Makefile.decl
 
 NULL =
 
-SUBDIRS = gdbus-codegen
+SUBDIRS = gdbus-2.0/codegen
 
 if OS_UNIX
-SUBDIRS += libasyncns xdgmime
+SUBDIRS += xdgmime
 endif
 
 if OS_WIN32_AND_DLL_COMPILATION
@@ -24,8 +24,8 @@ uninstall-ms-lib:
        $(uninstall_ms_lib_cmd)
 
 gio.def: gio.symbols
-       $(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 && \
-         mv gio.def.tmp gio.def
+       $(AM_V_GEN) (echo 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) > $(builddir)/gio.def.tmp && \
+         mv $(builddir)/gio.def.tmp $(builddir)/gio.def
 
 if OS_LINUX
 if HAVE_GNUC_VISIBILITY
@@ -33,41 +33,15 @@ TESTS = abicheck.sh
 endif
 endif
 
-if HAVE_THREADS
-THREAD_FLAGS=-DG_THREADS_MANDATORY
-endif
-
 AM_CPPFLAGS = \
        -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
        $(gmodule_INCLUDES)                             \
        $(GLIB_DEBUG_FLAGS)                             \
-       $(THREAD_FLAGS)                                 \
-       -DG_DISABLE_DEPRECATED                          \
        -DGIO_COMPILATION                               \
        -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
 
 lib_LTLIBRARIES = libgio-2.0.la
 
-marshal_sources = \
-        gio-marshal.h  \
-        gio-marshal.c  \
-       $(NULL)
-
-if CROSS_COMPILING
-  glib_genmarshal=$(GLIB_GENMARSHAL)
-else
-  glib_genmarshal=../gobject/glib-genmarshal
-endif
-
-gio-marshal.h: gio-marshal.list
-       $(AM_V_GEN) $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
-         mv $@.tmp $@
-
-gio-marshal.c: gio-marshal.h gio-marshal.list
-       $(AM_V_GEN) (echo "#include \"gio-marshal.h\""; \
-       $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
-         mv $@.tmp $@
-
 gdbus_headers =                        \
        gdbusauthobserver.h             \
        gcredentials.h                  \
@@ -123,6 +97,7 @@ gdbus_sources =                                                      \
 
 settings_headers = \
        gsettingsbackend.h              \
+       gsettingsschema.h               \
        gsettings.h
 
 settings_sources = \
@@ -137,6 +112,7 @@ settings_sources = \
        gsettingsbackendinternal.h      \
        gsettingsbackend.c              \
        gsettingsschema.h               \
+       gsettingsschema-internal.h      \
        gsettingsschema.c               \
        gsettings-mapping.h             \
        gsettings-mapping.c             \
@@ -148,23 +124,52 @@ settings_sources += \
        gregistrysettingsbackend.c
 endif
 
+if OS_CARBON
+AM_CPPFLAGS += -DG_OS_CARBON
+
+settings_sources += \
+       gnextstepsettingsbackend.c
+endif
+
 application_headers = \
+       gapplication.h                  \
+       gapplicationcommandline.h       \
+                                       \
        gactiongroup.h                  \
+       gactionmap.h                    \
        gsimpleactiongroup.h            \
+       gremoteactiongroup.h            \
+       gactiongroupexporter.h          \
+       gdbusactiongroup.h              \
        gaction.h                       \
        gsimpleaction.h                 \
-       gapplicationcommandline.h       \
-       gapplication.h
+                                       \
+       gmenumodel.h                    \
+       gmenu.h                         \
+       gmenuexporter.h                 \
+       gdbusmenumodel.h                \
+       $(NULL)
 
 application_sources = \
+       gapplication.c                          \
+       gapplicationcommandline.c               \
+       gapplicationimpl-dbus.c                 \
+       gapplicationimpl.h                      \
+                                               \
        gactiongroup.c                          \
+       gactionmap.c                            \
        gsimpleactiongroup.c                    \
+       gremoteactiongroup.c                    \
+       gactiongroupexporter.c                  \
+       gdbusactiongroup.c                      \
        gaction.c                               \
        gsimpleaction.c                         \
-       gapplicationcommandline.c               \
-       gapplicationimpl.h                      \
-       gapplicationimpl-dbus.c                 \
-       gapplication.c
+                                               \
+       gmenumodel.c                            \
+       gmenu.c                                 \
+       gmenuexporter.c                         \
+       gdbusmenumodel.c                        \
+       $(NULL)
 
 local_sources = \
        glocaldirectorymonitor.c        \
@@ -224,8 +229,8 @@ endif
 
 if OS_UNIX
 appinfo_sources += gdesktopappinfo.c
-platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
-platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
+platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
+platform_deps += xdgmime/libxdgmime.la
 unix_sources = \
        gfiledescriptorbased.c  \
        gunixconnection.c       \
@@ -235,8 +240,6 @@ unix_sources = \
        gunixmount.c            \
        gunixmount.h            \
        gunixmounts.c           \
-       gunixresolver.c         \
-       gunixresolver.h         \
        gunixsocketaddress.c    \
        gunixvolume.c           \
        gunixvolume.h           \
@@ -260,13 +263,18 @@ giounixinclude_HEADERS = \
        gunixoutputstream.h     \
        gunixsocketaddress.h    \
        $(NULL)
+
+if HAVE_NETLINK
+unix_sources +=                         \
+       gnetworkmonitornetlink.c \
+       gnetworkmonitornetlink.h \
+       $(NULL)
+endif
 endif
 
 win32_actual_sources = \
        gwin32mount.c \
        gwin32mount.h \
-       gwin32resolver.c \
-       gwin32resolver.h \
        gwin32volumemonitor.c \
        gwin32volumemonitor.h \
        gwin32inputstream.c \
@@ -276,6 +284,7 @@ win32_actual_sources = \
 
 win32_more_sources_for_vcproj = \
        gwin32appinfo.c \
+       gregistrysettingsbackend.c \
        win32/gwin32directorymonitor.c \
        win32/gwinhttpfile.c \
        win32/gwinhttpfileinputstream.c \
@@ -342,6 +351,7 @@ libgio_2_0_la_SOURCES =             \
        gfilteroutputstream.c   \
        gicon.c                 \
        ginetaddress.c          \
+       ginetaddressmask.c      \
        ginetsocketaddress.c    \
        ginitable.c             \
        ginputstream.c          \
@@ -360,6 +370,9 @@ libgio_2_0_la_SOURCES =             \
        gnativevolumemonitor.h  \
        gnetworkaddress.c       \
        gnetworkingprivate.h    \
+       gnetworkmonitor.c       \
+       gnetworkmonitorbase.c   \
+       gnetworkmonitorbase.h   \
        gnetworkservice.c       \
        goutputstream.c         \
        gpermission.c           \
@@ -369,6 +382,9 @@ libgio_2_0_la_SOURCES =             \
        gpollfilemonitor.h      \
        gproxyresolver.c        \
        gresolver.c             \
+       gresource.c             \
+       gresourcefile.c         \
+       gresourcefile.h         \
        gseekable.c             \
        gsimpleasyncresult.c    \
        gsimplepermission.c     \
@@ -395,11 +411,14 @@ libgio_2_0_la_SOURCES =           \
        gthemedicon.c           \
        gthreadedresolver.c     \
        gthreadedresolver.h     \
-       gtimezonemonitor.c      \
        gtlsbackend.c           \
        gtlscertificate.c       \
        gtlsclientconnection.c  \
        gtlsconnection.c        \
+       gtlsdatabase.c          \
+       gtlsfiledatabase.c      \
+       gtlsinteraction.c       \
+       gtlspassword.c          \
        gtlsserverconnection.c  \
        gunionvolumemonitor.c   \
        gunionvolumemonitor.h   \
@@ -418,13 +437,10 @@ libgio_2_0_la_SOURCES =           \
        $(settings_sources)     \
        $(gdbus_sources)        \
        $(local_sources)        \
-       $(marshal_sources)      \
        $(NULL)
 
 EXTRA_DIST += strinfo.c
 
-$(libgio_2_0_la_OBJECTS): $(marshal_sources)
-
 libgio_2_0_la_LIBADD = \
        $(top_builddir)/glib/libglib-2.0.la             \
        $(top_builddir)/gobject/libgobject-2.0.la       \
@@ -434,21 +450,28 @@ libgio_2_0_la_LIBADD = \
        $(SELINUX_LIBS)                                 \
        $(GLIB_LIBS)                                    \
        $(XATTR_LIBS)                                   \
+       $(NETWORK_LIBS)                                 \
        $(NULL)
 
+libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
+
+if OS_CARBON
+libgio_2_0_la_CFLAGS = -xobjective-c
+endif
+
 if PLATFORM_WIN32
 no_undefined = -no-undefined
 endif
 
 if OS_WIN32_AND_DLL_COMPILATION
-export_symbols = -export-symbols gio.def
+export_symbols = -export-symbols $(builddir)/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
+       $(INSTALL) $(builddir)/gio.def $(DESTDIR)$(libdir)/gio-2.0.def
 
 uninstall-def-file:
        -rm $(DESTDIR)$(libdir)/gio-2.0.def
@@ -456,7 +479,7 @@ else
 install-def-file:
 uninstall-def-file:
 
-export_symbols = -export-symbols-regex '^g_.*'
+export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
 endif
 
 install-data-local: install-ms-lib install-def-file
@@ -505,6 +528,7 @@ gio_headers =                       \
        gfilteroutputstream.h   \
        gicon.h                 \
        ginetaddress.h          \
+       ginetaddressmask.h      \
        ginetsocketaddress.h    \
        ginputstream.h          \
        ginitable.h             \
@@ -522,6 +546,7 @@ gio_headers =                       \
        gmountoperation.h       \
        gnativevolumemonitor.h  \
        gnetworkaddress.h       \
+       gnetworkmonitor.h       \
        gnetworkservice.h       \
        goutputstream.h         \
        gpermission.h           \
@@ -532,6 +557,7 @@ gio_headers =                       \
        gproxyaddressenumerator.h \
        gproxyresolver.h        \
        gresolver.h             \
+       gresource.h             \
        gseekable.h             \
        gsimpleasyncresult.h    \
        gsimplepermission.h     \
@@ -549,11 +575,14 @@ gio_headers =                     \
        gtcpwrapperconnection.h \
        gthreadedsocketservice.h\
        gthemedicon.h           \
-       gtimezonemonitor.h      \
        gtlsbackend.h           \
        gtlscertificate.h       \
        gtlsclientconnection.h  \
        gtlsconnection.h        \
+       gtlsdatabase.h          \
+       gtlsfiledatabase.h      \
+       gtlsinteraction.h       \
+       gtlspassword.h          \
        gtlsserverconnection.h  \
        gvfs.h                  \
        gvolume.h               \
@@ -572,14 +601,13 @@ gioinclude_HEADERS =              \
 
 # these sources (also mentioned above) are generated.
 BUILT_SOURCES =                \
-       gio-marshal.h           \
-       gio-marshal.c           \
+       gconstructor_as_data.h  \
        gioenumtypes.h          \
        gioenumtypes.c          \
        $(NULL)
 
 EXTRA_DIST +=                  \
-       gio-marshal.list        \
+       data-to-c.pl            \
        gio.symbols             \
        gioenumtypes.h.template \
        gioenumtypes.c.template \
@@ -587,14 +615,19 @@ EXTRA_DIST +=                     \
        abicheck.sh             \
        gio.rc.in               \
        gschema.dtd             \
+       gconstructor_as_data.h  \
        $(NULL)
 
 BUILT_EXTRA_DIST =             \
        gio.rc
 
-CLEANFILES =                   \
-       $(marshal_sources)      \
-       $(NULL)
+# This is read by gobject-introspection/misc/ and gtk-doc
+gio-public-headers.txt: Makefile
+       echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
+
+CLEANFILES = gio-public-headers.txt gconstructor_as_data.h
+
+all-local: gio-public-headers.txt
 
 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
        $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
@@ -607,9 +640,20 @@ gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
            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:$@
+       lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
+
+bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
 
-bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
+glib_compile_resources_LDADD = \
+       $(top_builddir)/glib/libglib-2.0.la \
+       $(top_builddir)/gobject/libgobject-2.0.la       \
+       libgio-2.0.la
+
+glib_compile_resources_SOURCES = \
+       gvdb/gvdb-format.h              \
+       gvdb/gvdb-builder.h             \
+       gvdb/gvdb-builder.c             \
+       glib-compile-resources.c
 
 gio_querymodules_SOURCES = gio-querymodules.c
 gio_querymodules_LDADD  = \
@@ -619,8 +663,12 @@ gio_querymodules_LDADD      = \
        libgio-2.0.la                                   \
        $(NULL)
 
+gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
+       $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
+
 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
 glib_compile_schemas_SOURCES = \
+       gconstructor_as_data.h \
        gvdb/gvdb-format.h              \
        gvdb/gvdb-builder.h             \
        gvdb/gvdb-builder.c             \
@@ -645,38 +693,21 @@ gdbus_LDADD = libgio-2.0.la \
        $(top_builddir)/gobject/libgobject-2.0.la
 
 completiondir = $(sysconfdir)/bash_completion.d
-completion_SCRIPTS = \
+completion_DATA = \
        gdbus-bash-completion.sh                \
-       gsettings-bash-completion.sh
-EXTRA_DIST += $(completion_SCRIPTS)
+       gsettings-bash-completion.sh            \
+       gresource-bash-completion.sh
+EXTRA_DIST += $(completion_DATA)
 
 # ------------------------------------------------------------------------
-# generate code here for the sake of gtk-doc
-
-gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c : gdbus-example-objectmanager.xml
-       $(AM_V_GEN) $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py           \
-               --interface-prefix org.gtk.GDBus.Example.ObjectManager.         \
-               --c-namespace Example                                           \
-               --c-generate-object-manager                                     \
-               --generate-c-code gdbus-example-objectmanager-generated         \
-               --generate-docbook gdbus-example-objectmanager-generated        \
-               gdbus-example-objectmanager.xml                                 \
-               $(NULL)
-
-BUILT_SOURCES += gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c
-
-noinst_LTLIBRARIES = libgdbus-example-objectmanager.la
-libgdbus_example_objectmanager_la_SOURCES  = gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c
-libgdbus_example_objectmanager_la_LIBADD   =           \
-       $(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)
+# gresource tool
 
-EXTRA_DIST += gdbus-example-objectmanager.xml
-
-CLEANFILES += gdbus-example-objectmanager-generated-*.xml
+bin_PROGRAMS += gresource
+gresource_SOURCES = gresource-tool.c
+gresource_LDADD = libgio-2.0.la \
+       $(top_builddir)/glib/libglib-2.0.la             \
+       $(top_builddir)/gobject/libgobject-2.0.la \
+       $(ELF_LIBS)
 
 # ------------------------------------------------------------------------
 
@@ -687,20 +718,20 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10
          cp $$d/$$f $(distdir) || exit 1; done
 
 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
-       for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
+       for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
                case $$F in \
-               gunix*.c|gdesktopappinfo.c) ;; \
+               gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
                *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
                     ;; \
                esac; \
        done | sort -u >libgio.sourcefiles
        $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
        rm libgio.sourcefiles
-       
+
 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
-       for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
+       for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
                case $$F in \
-               gunix*.c|gdesktopappinfo.c) ;; \
+               gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
                *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'" />' \
                     ;; \
                esac; \
@@ -709,9 +740,9 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10
        rm libgio.vs10.sourcefiles
 
 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
-       for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
+       for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
                case $$F in \
-               gunix*.c|gdesktopappinfo.c) ;; \
+               gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
                *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
                     ;; \
                esac; \