gpg: Auto-create revocation certificates.
[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 ChangeLog-2011 gpg-w32info.rc
22
23 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common \
24               -I$(top_srcdir)/include -I$(top_srcdir)/intl
25
26 include $(top_srcdir)/am/cmacros.am
27
28 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
29
30 needed_libs = ../kbx/libkeybox.a $(libcommon) ../gl/libgnu.a
31
32 bin_PROGRAMS = gpg2
33 if !HAVE_W32CE_SYSTEM
34 bin_PROGRAMS += gpgv2
35 endif
36 noinst_PROGRAMS = $(module_tests)
37 TESTS = $(module_tests)
38
39 if ENABLE_BZIP2_SUPPORT
40 bzip2_source = compress-bz2.c
41 else
42 bzip2_source =
43 endif
44
45 if ENABLE_CARD_SUPPORT
46 card_source = card-util.c
47 else
48 card_source =
49 endif
50
51 if NO_TRUST_MODELS
52 trust_source =
53 else
54 trust_source = trustdb.c trustdb.h tdbdump.c tdbio.c tdbio.h
55 endif
56
57
58 if HAVE_W32_SYSTEM
59 resource_objs += gpg-w32info.o
60 endif
61
62 common_source =  \
63               gpg.h             \
64               dek.h             \
65               build-packet.c    \
66               compress.c        \
67               $(bzip2_source)   \
68               filter.h          \
69               free-packet.c     \
70               getkey.c          \
71               keydb.c keydb.h    \
72               keyring.c keyring.h \
73               seskey.c          \
74               kbnode.c          \
75               main.h            \
76               mainproc.c        \
77               armor.c           \
78               mdfilter.c        \
79               textfilter.c      \
80               progress.c        \
81               misc.c            \
82               rmd160.c rmd160.h \
83               options.h         \
84               openfile.c        \
85               keyid.c           \
86               packet.h          \
87               parse-packet.c    \
88               cpr.c             \
89               plaintext.c       \
90               sig-check.c       \
91               keylist.c         \
92               pkglue.c pkglue.h \
93               ecdh.c
94
95 gpg2_SOURCES  = gpg.c           \
96               server.c          \
97               $(common_source)  \
98               pkclist.c         \
99               skclist.c         \
100               pubkey-enc.c      \
101               passphrase.c      \
102               decrypt.c         \
103               decrypt-data.c    \
104               cipher.c          \
105               encrypt.c         \
106               sign.c            \
107               verify.c          \
108               revoke.c          \
109               keyedit.c         \
110               dearmor.c         \
111               import.c          \
112               export.c          \
113               migrate.c         \
114               delkey.c          \
115               keygen.c          \
116               helptext.c        \
117               keyserver.c       \
118               keyserver-internal.h \
119               call-dirmngr.c call-dirmngr.h \
120               photoid.c photoid.h \
121               call-agent.c call-agent.h \
122               trust.c $(trust_source) \
123               $(card_source) \
124               exec.c exec.h
125
126 gpgv2_SOURCES = gpgv.c           \
127               $(common_source)  \
128               verify.c
129
130 #gpgd_SOURCES = gpgd.c \
131 #              ks-proto.h \
132 #              ks-proto.c \
133 #              ks-db.c \
134 #              ks-db.h \
135 #              $(common_source)
136
137 # FIXME: Libkeybox.a links to libksba thus we need to add libksba
138 # here, even that it is not used by gpg.  A proper solution would
139 # either to split up libkeybox.a or to use a separate keybox daemon.
140 LDADD =  $(needed_libs) ../common/libgpgrl.a \
141          $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
142          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
143 gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
144              $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
145              $(LIBICONV) $(resource_objs) $(extra_sys_libs)
146 gpg2_LDFLAGS = $(extra_bin_ldflags)
147 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
148               $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
149               $(LIBICONV) $(resource_objs) $(extra_sys_libs)
150 gpgv2_LDFLAGS = $(extra_bin_ldflags)
151
152 t_common_ldadd =
153 module_tests = t-rmd160
154 t_rmd160_SOURCES = t-rmd160.c rmd160.c
155 t_rmd160_LDADD = $(t_common_ldadd)
156
157
158 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
159
160 install-data-local:
161         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
162         $(INSTALL_DATA) $(srcdir)/options.skel \
163                                 $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
164
165 uninstall-local:
166         -@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
167
168
169 # There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
170 if HAVE_W32CE_SYSTEM
171 install-exec-hook:
172         mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
173               $(DESTDIR)$(bindir)/gpg$(EXEEXT)
174 endif