Rework status table to be less dynamically generated.
[gpgme.git] / src / Makefile.am
index cf88ab1e6b22e144706f74480917b978b8ba0ae1..ea8e70ebc0cc358412374bb11c70f25810f36e9a 100644 (file)
@@ -1,28 +1,27 @@
 # Copyright (C) 2000 Werner Koch (dd9jn)
 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 g10 Code GmbH
-# 
+#
 # This file is part of GPGME.
-# 
+#
 # GPGME is free software; you can redistribute it and/or modify it
 # under the terms of the GNU Lesser General Public License as
 # published by the Free Software Foundation; either version 2.1 of the
 # License, or (at your option) any later version.
-# 
+#
 # GPGME is distributed in the hope that it will be useful, but WITHOUT
 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
 # Public License for more details.
-# 
+#
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 ## Process this file with automake to produce Makefile.in
 
 # Note: moc_kdpipeiodevice should actually be a dependcy below.
-EXTRA_DIST = gpgme-config.in gpgme.m4 mkstatus libgpgme.vers \
+EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
             gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
-BUILT_SOURCES = status-table.h
-MOSTLYCLEANFILES = status-table.h
+
 bin_SCRIPTS = gpgme-config
 m4datadir = $(datadir)/aclocal
 m4data_DATA = gpgme.m4
@@ -33,11 +32,6 @@ ltlib_gpgme_pthread = libgpgme-pthread.la
 else
 ltlib_gpgme_pthread =
 endif
-if HAVE_PTH
-ltlib_gpgme_pth = libgpgme-pth.la
-else
-ltlib_gpgme_pth =
-endif
 
 if BUILD_W32_GLIB
 ltlib_gpgme_glib = libgpgme-glib.la
@@ -52,7 +46,7 @@ ltlib_gpgme_qt =
 endif
 
 lib_LTLIBRARIES = libgpgme.la $(ltlib_gpgme_glib) $(ltlib_gpgme_qt) \
-       $(ltlib_gpgme_pthread) $(ltlib_gpgme_pth)
+       $(ltlib_gpgme_pthread)
 
 if HAVE_LD_VERSION_SCRIPT
 libgpgme_version_script_cmd = -Wl,--version-script=$(srcdir)/libgpgme.vers
@@ -68,6 +62,10 @@ system_components = ath.h posix-util.c posix-sema.c posix-io.c
 system_components_not_extra =
 endif
 
+if HAVE_W32CE_SYSTEM
+system_components += w32-ce.h w32-ce.c
+endif
+
 if HAVE_GPGSM
 gpgsm_components = engine-gpgsm.c
 else
@@ -92,6 +90,12 @@ else
 g13_components =
 endif
 
+if HAVE_UISERVER
+uiserver_components = engine-uiserver.c
+else
+uiserver_components =
+endif
+
 # These are the source files common to all library versions.  We used
 # to build a non-installed library for that, but that does not work
 # correctly on all platforms (in particular, one can not specify the
@@ -108,20 +112,19 @@ main_sources =                                                            \
        sign.c passphrase.c progress.c                                  \
        key.c keylist.c trust-item.c trustlist.c                        \
        import.c export.c genkey.c delete.c edit.c getauditlog.c        \
-       opassuan.c                                                      \
-       engine.h engine-backend.h engine.c engine-gpg.c status-table.h  \
+       opassuan.c passwd.c                                             \
+       engine.h engine-backend.h engine.c engine-gpg.c status-table.c  \
        $(gpgsm_components) $(assuan_components) $(gpgconf_components)  \
-       $(g13_components) g13.c                                         \
+       $(uiserver_components)                                          \
+       $(g13_components) vfs-mount.c vfs-create.c                      \
        gpgconf.c                                                       \
        sema.h priv-io.h $(system_components) dirinfo.c                 \
        debug.c debug.h gpgme.c version.c error.c
 
 libgpgme_la_SOURCES = $(main_sources)                                  \
-       ath.h ath.c $(system_components_not_extra) 
+       ath.h ath.c $(system_components_not_extra)
 libgpgme_pthread_la_SOURCES = $(main_sources)                          \
        ath.h ath-pthread.c $(system_components_not_extra)
-libgpgme_pth_la_SOURCES = $(main_sources)                              \
-       ath.h ath-pth.c $(system_components_not_extra)
 
 if BUILD_W32_GLIB
 libgpgme_glib_la_SOURCES = $(main_sources) ath.h ath.c w32-glib-io.c
@@ -142,30 +145,29 @@ endif
 
 # We use a global CFLAGS and CPPFLAGS setting for all library
 # versions, because then every object file is only compiled once.
-AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @PTH_CPPFLAGS@ \
-       @QT4_CORE_CFLAGS@
-AM_CFLAGS = @LIBASSUAN_CFLAGS@ @PTH_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@
+AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @QT4_CORE_CFLAGS@
+AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@
 
 if HAVE_W32_SYSTEM
-
 # Windows provides us with an endless stream of Tough Love.  To spawn
 # processes with a controlled set of inherited handles, we need a
 # wrapper process.
+# Except on Windows CE.  There nothing is inheritable anyway.
+if HAVE_W32CE_SYSTEM
+libexec_PROGRAMS =
+else
 libexec_PROGRAMS = gpgme-w32spawn
+endif
 
+RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-SUFFIXES: .rc .lo
+SUFFIXES = .rc .lo
 
 .rc.lo:
-       $(LTRCCOMPILE) -i $< -o $@
+       $(LTRCCOMPILE) -i "$<" -o "$@"
 
 gpgme_res = versioninfo.lo
-gpgme_res_ldflag = -Wl,.libs/versioninfo.o
-
 no_undefined = -no-undefined
 export_symbols = -export-symbols $(srcdir)/gpgme.def
 
@@ -179,7 +181,6 @@ gpgme_deps = $(gpgme_res) gpgme.def
 
 else
 gpgme_res =
-gpgme_res_ldflag =
 no_undefined =
 export_symbols =
 install-def-file:
@@ -188,46 +189,41 @@ uninstall-def-file:
 gpgme_deps =
 endif
 
-libgpgme_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) $(export_symbols) \
+libgpgme_la_LDFLAGS = $(no_undefined) $(export_symbols) \
        $(libgpgme_version_script_cmd) -version-info \
        @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
 libgpgme_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers $(gpgme_deps)
-libgpgme_la_LIBADD = @LIBASSUAN_LIBS@ @LTLIBOBJS@ @GPG_ERROR_LIBS@
+libgpgme_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
+                    @GPG_ERROR_LIBS@
 
-libgpgme_pthread_la_LDFLAGS = $(libgpgme_version_script_cmd) -version-info \
+libgpgme_pthread_la_LDFLAGS = $(no_undefined) $(export_symbols) \
+       $(libgpgme_version_script_cmd) -version-info \
        @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
 libgpgme_pthread_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers
-libgpgme_pthread_la_LIBADD = @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
+libgpgme_pthread_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
        -lpthread @GPG_ERROR_LIBS@
 
-libgpgme_pth_la_LDFLAGS = @PTH_LDFLAGS@ \
-       $(libgpgme_version_script_cmd) -version-info \
-       @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
-libgpgme_pth_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers
-libgpgme_pth_la_LIBADD = @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
-       @PTH_LIBS@ @GPG_ERROR_LIBS@
-
 if BUILD_W32_GLIB
-libgpgme_glib_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) \
+libgpgme_glib_la_LDFLAGS = $(no_undefined) \
        $(export_symbols) $(libgpgme_version_script_cmd) -version-info \
        @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
 libgpgme_glib_la_DEPENDENCIES =        @LTLIBOBJS@ \
        $(srcdir)/libgpgme.vers $(gpgme_deps)
-libgpgme_glib_la_LIBADD = @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
+libgpgme_glib_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
        @GPG_ERROR_LIBS@ @GLIB_LIBS@
 endif
 
 if BUILD_W32_QT
-libgpgme_qt_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) \
+libgpgme_qt_la_LDFLAGS = $(no_undefined) \
        $(export_symbols) $(libgpgme_version_script_cmd) -version-info \
        @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
 libgpgme_qt_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers $(gpgme_deps)
-libgpgme_qt_la_LIBADD = @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
+libgpgme_qt_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
        @GPG_ERROR_LIBS@ @QT4_CORE_LIBS@
 endif
 
-status-table.h : gpgme.h
-       $(srcdir)/mkstatus < $(builddir)/gpgme.h > status-table.h
+noinst_PROGRAMS = gpgme-tool
+gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
 
 install-data-local: install-def-file