gpg: Try hard to use MDC also for sign+symenc.
[gnupg.git] / g10 / Makefile.am
1 # Copyright (C) 1998, 1999, 2000, 2001, 2002,
2 #               2003, 2006, 2010  Free Software Foundation, Inc.
3 #
4 # This file is part of GnuPG.
5 #
6 # GnuPG is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # GnuPG is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19 ## Process this file with automake to produce Makefile.in
20
21 EXTRA_DIST = options.skel dirmngr-conf.skel distsigkey.gpg \
22              ChangeLog-2011 gpg-w32info.rc \
23              gpg.w32-manifest.in test.c t-keydb-keyring.kbx
24
25 AM_CPPFLAGS = -I$(top_srcdir)/common
26
27 include $(top_srcdir)/am/cmacros.am
28
29 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) \
30             $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
31
32 needed_libs = ../kbx/libkeybox.a $(libcommon)
33
34 bin_PROGRAMS = gpg2
35 if !HAVE_W32CE_SYSTEM
36 bin_PROGRAMS += gpgv2
37 endif
38 noinst_PROGRAMS = $(module_tests)
39 TESTS = $(module_tests)
40
41 if ENABLE_BZIP2_SUPPORT
42 bzip2_source = compress-bz2.c
43 else
44 bzip2_source =
45 endif
46
47 if ENABLE_CARD_SUPPORT
48 card_source = card-util.c
49 else
50 card_source =
51 endif
52
53 if NO_TRUST_MODELS
54 trust_source =
55 else
56 trust_source = trustdb.c trustdb.h tdbdump.c tdbio.c tdbio.h
57 endif
58
59
60 if HAVE_W32_SYSTEM
61 resource_objs += gpg-w32info.o
62
63 gpg-w32info.o : gpg.w32-manifest
64
65 endif
66
67 common_source =  \
68               gpg.h             \
69               dek.h             \
70               build-packet.c    \
71               compress.c        \
72               $(bzip2_source)   \
73               filter.h          \
74               free-packet.c     \
75               getkey.c          \
76               keydb.c keydb.h    \
77               keyring.c keyring.h \
78               seskey.c          \
79               kbnode.c          \
80               main.h            \
81               mainproc.c        \
82               armor.c           \
83               mdfilter.c        \
84               textfilter.c      \
85               progress.c        \
86               misc.c            \
87               rmd160.c rmd160.h \
88               options.h         \
89               openfile.c        \
90               keyid.c           \
91               packet.h          \
92               parse-packet.c    \
93               cpr.c             \
94               plaintext.c       \
95               sig-check.c       \
96               keylist.c         \
97               pkglue.c pkglue.h \
98               ecdh.c
99
100 gpg2_SOURCES  = gpg.c           \
101               server.c          \
102               $(common_source)  \
103               pkclist.c         \
104               skclist.c         \
105               pubkey-enc.c      \
106               passphrase.c      \
107               decrypt.c         \
108               decrypt-data.c    \
109               cipher.c          \
110               encrypt.c         \
111               sign.c            \
112               verify.c          \
113               revoke.c          \
114               keyedit.c         \
115               dearmor.c         \
116               import.c          \
117               export.c          \
118               migrate.c         \
119               delkey.c          \
120               keygen.c          \
121               helptext.c        \
122               keyserver.c       \
123               keyserver-internal.h \
124               call-dirmngr.c call-dirmngr.h \
125               photoid.c photoid.h \
126               call-agent.c call-agent.h \
127               trust.c $(trust_source) \
128               $(card_source) \
129               exec.c exec.h
130
131 gpgv2_SOURCES = gpgv.c           \
132               $(common_source)  \
133               verify.c
134
135 #gpgd_SOURCES = gpgd.c \
136 #              ks-proto.h \
137 #              ks-proto.c \
138 #              ks-db.c \
139 #              ks-db.h \
140 #              $(common_source)
141
142 LDADD =  $(needed_libs) ../common/libgpgrl.a \
143          $(ZLIBS) $(LIBINTL) $(CAPLIBS) $(NETLIBS)
144 gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBREADLINE) \
145              $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
146              $(LIBICONV) $(resource_objs) $(extra_sys_libs)
147 gpg2_LDFLAGS = $(extra_bin_ldflags)
148 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
149               $(GPG_ERROR_LIBS) \
150               $(LIBICONV) $(resource_objs) $(extra_sys_libs)
151 gpgv2_LDFLAGS = $(extra_bin_ldflags)
152
153 t_common_ldadd =
154 module_tests = t-rmd160 t-keydb
155 t_rmd160_SOURCES = t-rmd160.c rmd160.c
156 t_rmd160_LDADD = $(t_common_ldadd)
157 t_keydb_SOURCES = t-keydb.c test-stubs.c $(common_source)
158 t_keydb_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
159               $(LIBICONV) $(t_common_ldadd)
160
161
162 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
163
164 install-data-local:
165         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
166         $(INSTALL_DATA) $(srcdir)/options.skel \
167                                 $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
168         $(INSTALL_DATA) $(srcdir)/dirmngr-conf.skel \
169                                 $(DESTDIR)$(pkgdatadir)/dirmngr-conf.skel
170         $(INSTALL_DATA) $(srcdir)/distsigkey.gpg \
171                                 $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
172
173 uninstall-local:
174         -@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
175         -@rm $(DESTDIR)$(pkgdatadir)/dirmngr-conf.skel
176         -@rm $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
177
178
179 # There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
180 if HAVE_W32CE_SYSTEM
181 install-exec-hook:
182         mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
183               $(DESTDIR)$(bindir)/gpg$(EXEEXT)
184 endif