* g10.c (main): New commands --card-edit, --card-status and
[gnupg.git] / g10 / Makefile.am
1 # Copyright (C) 1998, 1999, 2000, 2001, 2002,
2 #               2003  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 libexecdir = @libexecdir@/@PACKAGE@
27 if ! HAVE_DOSISH_SYSTEM
28 AM_CFLAGS = -DGNUPG_LIBEXECDIR="\"$(libexecdir)\""
29 endif
30 needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
31
32 #noinst_PROGRAMS = gpgd
33 bin_PROGRAMS = gpg gpgv
34
35 common_source =  \
36               global.h          \
37               build-packet.c    \
38               compress.c        \
39               filter.h          \
40               free-packet.c     \
41               getkey.c          \
42               keydb.c keydb.h    \
43               keyring.c keyring.h \
44               seskey.c          \
45               kbnode.c          \
46               main.h            \
47               mainproc.c        \
48               armor.c           \
49               mdfilter.c        \
50               textfilter.c      \
51               progress.c        \
52               misc.c            \
53               options.h         \
54               openfile.c        \
55               keyid.c           \
56               packet.h          \
57               parse-packet.c    \
58               comment.c         \
59               status.c          \
60               status.h          \
61               plaintext.c       \
62               sig-check.c       \
63               keylist.c         \
64               signal.c
65
66 card_support_source = \
67         cardglue.c cardclue.h \
68         card-util.c \
69         app-common.h \
70         app-openpgp.c \
71         iso7816.c iso7816.h \
72         apdu.c apdu.h \
73         ccid-driver.c ccid-driver.h
74
75
76 gpg_SOURCES  = g10.c            \
77               $(common_source)  \
78               $(card_support_source) \
79               pkclist.c         \
80               skclist.c         \
81               pubkey-enc.c      \
82               passphrase.c      \
83               seckey-cert.c     \
84               encr-data.c       \
85               cipher.c          \
86               encode.c          \
87               sign.c            \
88               verify.c          \
89               revoke.c          \
90               decrypt.c         \
91               keyedit.c         \
92               dearmor.c         \
93               import.c          \
94               export.c          \
95               trustdb.c         \
96               trustdb.h         \
97               tdbdump.c         \
98               tdbio.c           \
99               tdbio.h           \
100               delkey.c          \
101               keygen.c          \
102               pipemode.c        \
103               helptext.c        \
104               keyserver.c       \
105               keyserver-internal.h \
106               photoid.c photoid.h \
107               exec.c exec.h
108
109 gpgv_SOURCES = gpgv.c           \
110               $(common_source)  \
111               verify.c          
112
113 #gpgd_SOURCES = gpgd.c \
114 #              ks-proto.h \
115 #              ks-proto.c \
116 #              ks-db.c \
117 #              ks-db.h \
118 #              $(common_source)
119
120 LDADD =  $(needed_libs) @INTLLIBS@ @CAPLIBS@ @ZLIBS@ @W32LIBS@
121 # gpg gets LIBOBJS to add in mkdtemp if the platform doesn't have it
122 gpg_LDADD = @LIBOBJS@ $(LDADD) @DLLIBS@ @NETLIBS@ @LIBUSB_LIBS@
123
124 $(PROGRAMS): $(needed_libs)
125
126 install-data-local:
127         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
128         $(INSTALL_DATA) $(srcdir)/options.skel \
129                                 $(DESTDIR)$(pkgdatadir)/options.skel
130         @set -e;\
131          if test -f $(DESTDIR)$(bindir)/gpgm ; then \
132            echo "removing obsolete gpgm binary" ;   \
133            rm $(DESTDIR)$(bindir)/gpgm ;            \
134          fi