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