Imported Upstream version 2.0.26
[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 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 = $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_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 if HAVE_W32_SYSTEM
43 resource_objs += gpg-w32info.o
44 endif
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
77 gpg2_SOURCES  = gpg.c           \
78               server.c          \
79               $(common_source)  \
80               pkclist.c         \
81               skclist.c         \
82               pubkey-enc.c      \
83               passphrase.c      \
84               seckey-cert.c     \
85               encr-data.c       \
86               cipher.c          \
87               encode.c          \
88               sign.c            \
89               verify.c          \
90               revoke.c          \
91               decrypt.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               photoid.c photoid.h \
107               call-agent.c call-agent.h \
108               card-util.c \
109               exec.c exec.h
110
111 gpgv2_SOURCES = gpgv.c           \
112               $(common_source)  \
113               verify.c
114
115 #gpgd_SOURCES = gpgd.c \
116 #              ks-proto.h \
117 #              ks-proto.c \
118 #              ks-db.c \
119 #              ks-db.h \
120 #              $(common_source)
121
122 LDADD =  $(needed_libs) ../common/libgpgrl.a \
123          $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
124          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
125 gpg2_LDADD =  $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
126              $(LIBICONV) $(resource_objs)
127 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
128               $(LIBICONV) $(resource_objs)
129
130 t_common_ldadd =
131 module_tests = t-rmd160
132 t_rmd160_SOURCES = t-rmd160.c rmd160.c
133 t_rmd160_LDADD = $(t_common_ldadd)
134
135
136 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
137
138 install-data-local:
139         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
140         $(INSTALL_DATA) $(srcdir)/options.skel \
141                                 $(DESTDIR)$(pkgdatadir)/gpg-conf.skel
142
143 uninstall-local:
144         -@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel