Imported Upstream version 2.0.19
[platform/upstream/gpg2.git] / g10 / Makefile.am
1 # Copyright (C) 1998, 1999, 2000, 2001, 2002,
2 #               2003, 2006  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
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) ../jnlib/libjnlib.a ../gl/libgnu.a
31
32 bin_PROGRAMS = gpg2 gpgv2
33 noinst_PROGRAMS = $(module_tests)
34 TESTS = $(module_tests)
35
36 if ENABLE_BZIP2_SUPPORT
37 bzip2_source = compress-bz2.c
38 else
39 bzip2_source =
40 endif
41
42
43 common_source =  \
44               gpg.h             \
45               build-packet.c    \
46               compress.c        \
47               $(bzip2_source)   \
48               filter.h          \
49               free-packet.c     \
50               getkey.c          \
51               keydb.c keydb.h    \
52               keyring.c keyring.h \
53               seskey.c          \
54               kbnode.c          \
55               main.h            \
56               mainproc.c        \
57               armor.c           \
58               mdfilter.c        \
59               textfilter.c      \
60               progress.c        \
61               misc.c            \
62               rmd160.c rmd160.h \
63               options.h         \
64               openfile.c        \
65               keyid.c           \
66               packet.h          \
67               parse-packet.c    \
68               cpr.c             \
69               plaintext.c       \
70               sig-check.c       \
71               keylist.c         \
72               pkglue.c pkglue.h
73
74 gpg2_SOURCES  = gpg.c           \
75               server.c          \
76               $(common_source)  \
77               pkclist.c         \
78               skclist.c         \
79               pubkey-enc.c      \
80               passphrase.c      \
81               seckey-cert.c     \
82               encr-data.c       \
83               cipher.c          \
84               encode.c          \
85               sign.c            \
86               verify.c          \
87               revoke.c          \
88               decrypt.c         \
89               keyedit.c         \
90               dearmor.c         \
91               import.c          \
92               export.c          \
93               trustdb.c         \
94               trustdb.h         \
95               tdbdump.c         \
96               tdbio.c           \
97               tdbio.h           \
98               delkey.c          \
99               keygen.c          \
100               helptext.c        \
101               keyserver.c       \
102               keyserver-internal.h \
103               photoid.c photoid.h \
104               call-agent.c call-agent.h \
105               card-util.c \
106               exec.c exec.h
107
108 gpgv2_SOURCES = gpgv.c           \
109               $(common_source)  \
110               verify.c
111
112 #gpgd_SOURCES = gpgd.c \
113 #              ks-proto.h \
114 #              ks-proto.c \
115 #              ks-db.c \
116 #              ks-db.h \
117 #              $(common_source)
118
119 LDADD =  $(needed_libs) ../common/libgpgrl.a \
120          $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
121          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
122 gpg2_LDADD =  $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
123              $(LIBICONV)
124 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
125               $(LIBICONV)
126
127 t_common_ldadd =
128 module_tests = t-rmd160
129 t_rmd160_SOURCES = t-rmd160.c rmd160.c
130 t_rmd160_LDADD = $(t_common_ldadd)
131
132
133 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
134
135 install-data-local:
136         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
137         $(INSTALL_DATA) $(srcdir)/options.skel \
138                                 $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
139
140 uninstall-local:
141         -@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel