gpg: Allow building without any trust model support.
[gnupg.git] / g10 / Makefile.am
index 899677c..ba68648 100644 (file)
@@ -18,7 +18,7 @@
 
 ## Process this file with automake to produce Makefile.in
 
-EXTRA_DIST = options.skel ChangeLog-2011
+EXTRA_DIST = options.skel ChangeLog-2011 gpg-w32info.rc
 
 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common \
               -I$(top_srcdir)/include -I$(top_srcdir)/intl
@@ -42,9 +42,26 @@ else
 bzip2_source =
 endif
 
+if ENABLE_CARD_SUPPORT
+card_source = card-util.c
+else
+card_source =
+endif
+
+if NO_TRUST_MODELS
+trust_source =
+else
+trust_source = trustdb.c trustdb.h tdbdump.c tdbio.c tdbio.h
+endif
+
+
+if HAVE_W32_SYSTEM
+resource_objs += gpg-w32info.o
+endif
 
 common_source =  \
              gpg.h             \
+             dek.h             \
              build-packet.c    \
              compress.c        \
              $(bzip2_source)   \
@@ -93,11 +110,6 @@ gpg2_SOURCES  = gpg.c               \
              dearmor.c         \
              import.c          \
              export.c          \
-             trustdb.c         \
-             trustdb.h         \
-             tdbdump.c         \
-             tdbio.c           \
-             tdbio.h           \
              delkey.c          \
              keygen.c          \
              helptext.c        \
@@ -106,7 +118,8 @@ gpg2_SOURCES  = gpg.c               \
              call-dirmngr.c call-dirmngr.h \
              photoid.c photoid.h \
              call-agent.c call-agent.h \
-             card-util.c \
+             trust.c $(trust_source) \
+             $(card_source) \
              exec.c exec.h
 
 gpgv2_SOURCES = gpgv.c           \
@@ -128,11 +141,11 @@ LDADD =  $(needed_libs) ../common/libgpgrl.a \
          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
 gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
              $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
-            $(LIBICONV) $(extra_sys_libs)
+            $(LIBICONV) $(resource_objs) $(extra_sys_libs)
 gpg2_LDFLAGS = $(extra_bin_ldflags)
 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
               $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
-             $(LIBICONV) $(extra_sys_libs)
+             $(LIBICONV) $(resource_objs) $(extra_sys_libs)
 gpgv2_LDFLAGS = $(extra_bin_ldflags)
 
 t_common_ldadd =