* gpg.c (print_mds), armor.c (armor_filter, parse_hash_header): Add
[gnupg.git] / g10 / Makefile.am
1 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2 #               2005 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 2 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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19
20 ## Process this file with automake to produce Makefile.in
21
22 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/intl @LIBUSB_CPPFLAGS@
23
24 EXTRA_DIST = options.skel
25 # it seems that we can't use this with automake 1.5
26 #OMIT_DEPENDENCIES = zlib.h zconf.h
27
28 if ! HAVE_DOSISH_SYSTEM
29 AM_CPPFLAGS += -DGNUPG_LIBEXECDIR="\"$(libexecdir)/@PACKAGE@\""
30 endif
31
32 needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
33 other_libs = $(LIBICONV) $(SRVLIBS) $(LIBINTL) $(CAPLIBS)
34
35 bin_PROGRAMS = gpg gpgv
36
37 if ENABLE_BZIP2_SUPPORT
38 bzip2_source = compress-bz2.c
39 else
40 bzip2_source =
41 endif
42
43 common_source =  \
44               global.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               options.h         \
63               openfile.c        \
64               keyid.c           \
65               packet.h          \
66               parse-packet.c    \
67               status.c          \
68               status.h          \
69               plaintext.c       \
70               sig-check.c       \
71               keylist.c         \
72               signal.c
73
74 if ENABLE_CARD_SUPPORT
75 card_support_source_gpg = card-util.c 
76 card_support_source_scd = \
77         app-common.h \
78         app-openpgp.c \
79         iso7816.c iso7816.h \
80         apdu.c apdu.h \
81         ccid-driver.c ccid-driver.h
82 card_support_source_local = cardglue.c cardglue.h tlv.c tlv.h
83 else
84 card_support_source_gpg =
85 card_support_source_scd = 
86 card_support_source_local =
87 endif
88
89 card_support_source = $(card_support_source_local) $(card_support_source_gpg) $(card_support_source_scd)
90
91 gpg_SOURCES  = gpg.c            \
92               $(common_source)  \
93               $(card_support_source) \
94               pkclist.c         \
95               skclist.c         \
96               pubkey-enc.c      \
97               passphrase.c      \
98               seckey-cert.c     \
99               encr-data.c       \
100               cipher.c          \
101               encode.c          \
102               sign.c            \
103               verify.c          \
104               revoke.c          \
105               decrypt.c         \
106               keyedit.c         \
107               dearmor.c         \
108               import.c          \
109               export.c          \
110               trustdb.c         \
111               trustdb.h         \
112               tdbdump.c         \
113               tdbio.c           \
114               tdbio.h           \
115               delkey.c          \
116               keygen.c          \
117               pipemode.c        \
118               helptext.c        \
119               keyserver.c       \
120               keyserver-internal.h \
121               photoid.c photoid.h \
122               exec.c exec.h
123
124 gpgv_SOURCES = gpgv.c           \
125               $(common_source)  \
126               verify.c          
127
128 LDADD =  $(needed_libs) $(other_libs) @ZLIBS@ @W32LIBS@ @LIBREADLINE@
129 gpg_LDADD = $(LDADD) @DLLIBS@ @NETLIBS@ @LIBUSB@
130
131 $(PROGRAMS): $(needed_libs)
132
133 install-data-local:
134         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
135         $(INSTALL_DATA) $(srcdir)/options.skel \
136                                 $(DESTDIR)$(pkgdatadir)/options.skel
137         @set -e;\
138          if test -f $(DESTDIR)$(bindir)/gpgm ; then \
139            echo "removing obsolete gpgm binary" ;   \
140            rm $(DESTDIR)$(bindir)/gpgm ;            \
141          fi
142
143 # Helper to update some source files.
144 update-source-from-gnupg-2:
145         @set -e; \
146          if test -d ../../gnupg-1.9/scd; then dir="../../gnupg-1.9"; \
147          elif test -d ../../gnupg/scd; then dir="../../gnupg"; \
148          else exit 1; \
149          fi; \
150          for i in $(card_support_source_scd); do \
151            cp $$dir/scd/$$i $$i; echo $$i; \
152          done ;\
153          for i in $(card_support_source_gpg); do \
154            cp $$dir/g10/$$i $$i; echo $$i; \
155          done ; \
156          echo "Please remember to update the ChangeLog accordingly!"