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