gpg: Improve 'General key info' line of --card-status.
[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 distsigkey.gpg ChangeLog-2011 gpg-w32info.rc \
22              gpg.w32-manifest.in
23
24 AM_CPPFLAGS = -I$(top_srcdir)/common
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)
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
61 gpg-w32info.o : gpg.w32-manifest
62
63 endif
64
65 common_source =  \
66               gpg.h             \
67               dek.h             \
68               build-packet.c    \
69               compress.c        \
70               $(bzip2_source)   \
71               filter.h          \
72               free-packet.c     \
73               getkey.c          \
74               keydb.c keydb.h    \
75               keyring.c keyring.h \
76               seskey.c          \
77               kbnode.c          \
78               main.h            \
79               mainproc.c        \
80               armor.c           \
81               mdfilter.c        \
82               textfilter.c      \
83               progress.c        \
84               misc.c            \
85               rmd160.c rmd160.h \
86               options.h         \
87               openfile.c        \
88               keyid.c           \
89               packet.h          \
90               parse-packet.c    \
91               cpr.c             \
92               plaintext.c       \
93               sig-check.c       \
94               keylist.c         \
95               pkglue.c pkglue.h \
96               ecdh.c
97
98 gpg2_SOURCES  = gpg.c           \
99               server.c          \
100               $(common_source)  \
101               pkclist.c         \
102               skclist.c         \
103               pubkey-enc.c      \
104               passphrase.c      \
105               decrypt.c         \
106               decrypt-data.c    \
107               cipher.c          \
108               encrypt.c         \
109               sign.c            \
110               verify.c          \
111               revoke.c          \
112               keyedit.c         \
113               dearmor.c         \
114               import.c          \
115               export.c          \
116               migrate.c         \
117               delkey.c          \
118               keygen.c          \
119               helptext.c        \
120               keyserver.c       \
121               keyserver-internal.h \
122               call-dirmngr.c call-dirmngr.h \
123               photoid.c photoid.h \
124               call-agent.c call-agent.h \
125               trust.c $(trust_source) \
126               $(card_source) \
127               exec.c exec.h
128
129 gpgv2_SOURCES = gpgv.c           \
130               $(common_source)  \
131               verify.c
132
133 #gpgd_SOURCES = gpgd.c \
134 #              ks-proto.h \
135 #              ks-proto.c \
136 #              ks-db.c \
137 #              ks-db.h \
138 #              $(common_source)
139
140 # FIXME: Libkeybox.a links to libksba thus we need to add libksba
141 # here, even that it is not used by gpg.  A proper solution would
142 # either to split up libkeybox.a or to use a separate keybox daemon.
143 LDADD =  $(needed_libs) ../common/libgpgrl.a \
144          $(ZLIBS) $(LIBINTL) $(CAPLIBS) $(NETLIBS)
145 gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBREADLINE) \
146              $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
147              $(LIBICONV) $(resource_objs) $(extra_sys_libs)
148 gpg2_LDFLAGS = $(extra_bin_ldflags)
149 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
150               $(KSBA_LIBS) $(GPG_ERROR_LIBS) \
151               $(LIBICONV) $(resource_objs) $(extra_sys_libs)
152 gpgv2_LDFLAGS = $(extra_bin_ldflags)
153
154 t_common_ldadd =
155 module_tests = t-rmd160
156 t_rmd160_SOURCES = t-rmd160.c rmd160.c
157 t_rmd160_LDADD = $(t_common_ldadd)
158
159
160 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
161
162 install-data-local:
163         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
164         $(INSTALL_DATA) $(srcdir)/options.skel \
165                                 $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
166         $(INSTALL_DATA) $(srcdir)/distsigkey.gpg \
167                                 $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
168
169 uninstall-local:
170         -@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
171         -@rm $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
172
173
174 # There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
175 if HAVE_W32CE_SYSTEM
176 install-exec-hook:
177         mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
178               $(DESTDIR)$(bindir)/gpg$(EXEEXT)
179 endif