Extend algo selection menu.
[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
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 = $(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
46 common_source =  \
47               gpg.h             \
48               build-packet.c    \
49               compress.c        \
50               $(bzip2_source)   \
51               filter.h          \
52               free-packet.c     \
53               getkey.c          \
54               keydb.c keydb.h    \
55               keyring.c keyring.h \
56               seskey.c          \
57               kbnode.c          \
58               main.h            \
59               mainproc.c        \
60               armor.c           \
61               mdfilter.c        \
62               textfilter.c      \
63               progress.c        \
64               misc.c            \
65               rmd160.c rmd160.h \
66               options.h         \
67               openfile.c        \
68               keyid.c           \
69               packet.h          \
70               parse-packet.c    \
71               cpr.c             \
72               plaintext.c       \
73               sig-check.c       \
74               keylist.c         \
75               pkglue.c pkglue.h \
76               ecdh.c
77
78 gpg2_SOURCES  = gpg.c           \
79               server.c          \
80               $(common_source)  \
81               pkclist.c         \
82               skclist.c         \
83               pubkey-enc.c      \
84               passphrase.c      \
85               decrypt.c         \
86               decrypt-data.c    \
87               cipher.c          \
88               encrypt.c         \
89               sign.c            \
90               verify.c          \
91               revoke.c          \
92               keyedit.c         \
93               dearmor.c         \
94               import.c          \
95               export.c          \
96               trustdb.c         \
97               trustdb.h         \
98               tdbdump.c         \
99               tdbio.c           \
100               tdbio.h           \
101               delkey.c          \
102               keygen.c          \
103               helptext.c        \
104               keyserver.c       \
105               keyserver-internal.h \
106               call-dirmngr.c call-dirmngr.h \
107               photoid.c photoid.h \
108               call-agent.c call-agent.h \
109               card-util.c \
110               exec.c exec.h
111
112 gpgv2_SOURCES = gpgv.c           \
113               $(common_source)  \
114               verify.c
115
116 #gpgd_SOURCES = gpgd.c \
117 #              ks-proto.h \
118 #              ks-proto.c \
119 #              ks-db.c \
120 #              ks-db.h \
121 #              $(common_source)
122
123 LDADD =  $(needed_libs) ../common/libgpgrl.a \
124          $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
125          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
126 gpg2_LDADD =  $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
127              $(LIBICONV) $(extra_sys_libs)
128 gpg2_LDFLAGS = $(extra_bin_ldflags)
129 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
130               $(LIBICONV) $(extra_sys_libs)
131 gpgv2_LDFLAGS = $(extra_bin_ldflags)
132
133 t_common_ldadd = 
134 module_tests = t-rmd160
135 t_rmd160_SOURCES = t-rmd160.c rmd160.c
136 t_rmd160_LDADD = $(t_common_ldadd)
137
138
139 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
140
141 install-data-local:
142         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
143         $(INSTALL_DATA) $(srcdir)/options.skel \
144                                 $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
145
146 uninstall-local:
147         -@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel        
148
149
150 # There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
151 if HAVE_W32CE_SYSTEM
152 install-exec-hook:
153         mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
154               $(DESTDIR)$(bindir)/gpg$(EXEEXT)
155 endif