* Makefile.am: No need to link with curl any longer.
[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 INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
23 EXTRA_DIST = options.skel
24 # it seems that we can't use this with automake 1.5
25 #OMIT_DEPENDENCIES = zlib.h zconf.h
26
27 if ! HAVE_DOSISH_SYSTEM
28 AM_CFLAGS = -DGNUPG_LIBEXECDIR="\"$(libexecdir)/@PACKAGE@\""
29 endif
30 needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
31 other_libs = $(LIBICONV) $(SRVLIBS) $(LIBINTL) $(CAPLIBS)
32
33 bin_PROGRAMS = gpg gpgv
34
35 if ENABLE_BZIP2_SUPPORT
36 bzip2_source = compress-bz2.c
37 else
38 bzip2_source =
39 endif
40
41 common_source =  \
42               global.h          \
43               build-packet.c    \
44               compress.c        \
45               $(bzip2_source)   \
46               filter.h          \
47               free-packet.c     \
48               getkey.c          \
49               keydb.c keydb.h    \
50               keyring.c keyring.h \
51               seskey.c          \
52               kbnode.c          \
53               main.h            \
54               mainproc.c        \
55               armor.c           \
56               mdfilter.c        \
57               textfilter.c      \
58               progress.c        \
59               misc.c            \
60               options.h         \
61               openfile.c        \
62               keyid.c           \
63               packet.h          \
64               parse-packet.c    \
65               status.c          \
66               status.h          \
67               plaintext.c       \
68               sig-check.c       \
69               keylist.c         \
70               signal.c
71
72 if ENABLE_CARD_SUPPORT
73 card_support_source_g10 = card-util.c 
74 card_support_source_scd = \
75         app-common.h \
76         app-openpgp.c \
77         iso7816.c iso7816.h \
78         apdu.c apdu.h \
79         ccid-driver.c ccid-driver.h
80 card_support_source_local = cardglue.c cardglue.h tlv.c tlv.h
81 else
82 card_support_source_g10 =
83 card_support_source_scd = 
84 card_support_source_local =
85 endif
86
87 card_support_source = $(card_support_source_local) $(card_support_source_g10) $(card_support_source_scd)
88
89 gpg_SOURCES  = g10.c            \
90               $(common_source)  \
91               $(card_support_source) \
92               pkclist.c         \
93               skclist.c         \
94               pubkey-enc.c      \
95               passphrase.c      \
96               seckey-cert.c     \
97               encr-data.c       \
98               cipher.c          \
99               encode.c          \
100               sign.c            \
101               verify.c          \
102               revoke.c          \
103               decrypt.c         \
104               keyedit.c         \
105               dearmor.c         \
106               import.c          \
107               export.c          \
108               trustdb.c         \
109               trustdb.h         \
110               tdbdump.c         \
111               tdbio.c           \
112               tdbio.h           \
113               delkey.c          \
114               keygen.c          \
115               pipemode.c        \
116               helptext.c        \
117               keyserver.c       \
118               keyserver-internal.h \
119               photoid.c photoid.h \
120               exec.c exec.h
121
122 gpgv_SOURCES = gpgv.c           \
123               $(common_source)  \
124               verify.c          
125
126 LDADD =  $(needed_libs) $(other_libs) @ZLIBS@ @W32LIBS@ @LIBREADLINE@
127 gpg_LDADD = $(LDADD) @DLLIBS@ @NETLIBS@ @LIBUSB@
128
129 $(PROGRAMS): $(needed_libs)
130
131 install-data-local:
132         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
133         $(INSTALL_DATA) $(srcdir)/options.skel \
134                                 $(DESTDIR)$(pkgdatadir)/options.skel
135         @set -e;\
136          if test -f $(DESTDIR)$(bindir)/gpgm ; then \
137            echo "removing obsolete gpgm binary" ;   \
138            rm $(DESTDIR)$(bindir)/gpgm ;            \
139          fi
140
141 # Helper to update some source files.
142 update-source-from-gnupg-2:
143         @set -e; \
144          if test -d ../../gnupg-1.9/scd; then dir="../../gnupg-1.9"; \
145          elif test -d ../../gnupg/scd; then dir="../../gnupg"; \
146          else exit 1; \
147          fi; \
148          for i in $(card_support_source_scd); do \
149            cp $$dir/scd/$$i $$i; echo $$i; \
150          done ;\
151          for i in $(card_support_source_g10); do \
152            cp $$dir/g10/$$i $$i; echo $$i; \
153          done ; \
154          echo "Please remember to update the ChangeLog accordingly!"