d6984941e912d2ecb9ce51f972a6d0d704a40b24
[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 localedir = $(datadir)/locale
23 INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/include -I$(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\"
24
25 EXTRA_DIST = options.skel
26 # it seems that we can't use this with automake 1.5
27 #OMIT_DEPENDENCIES = zlib.h zconf.h
28 libexecdir = @libexecdir@/@PACKAGE@
29 if ! HAVE_DOSISH_SYSTEM
30 AM_CFLAGS = -DGNUPG_LIBEXECDIR="\"$(libexecdir)\""
31 endif
32 needed_libs = ../common/libcommon.a ../jnlib/libjnlib.a
33
34 #noinst_PROGRAMS = gpgd
35 bin_PROGRAMS = gpg gpgv
36
37 common_source =  \
38               global.h gpg.h    \
39               build-packet.c    \
40               compress.c        \
41               filter.h          \
42               free-packet.c     \
43               getkey.c          \
44               keydb.c keydb.h    \
45               keyring.c keyring.h \
46               seskey.c          \
47               kbnode.c          \
48               main.h            \
49               mainproc.c        \
50               armor.c           \
51               mdfilter.c        \
52               textfilter.c      \
53               progress.c        \
54               misc.c            \
55               options.h         \
56               openfile.c        \
57               keyid.c           \
58               packet.h          \
59               parse-packet.c    \
60               comment.c         \
61               status.c          \
62               status.h          \
63               plaintext.c       \
64               sig-check.c       \
65               keylist.c         \
66               pkglue.c pkglue.h 
67
68 gpg_SOURCES  = g10.c            \
69               $(common_source)  \
70               pkclist.c         \
71               skclist.c         \
72               pubkey-enc.c      \
73               passphrase.c      \
74               seckey-cert.c     \
75               encr-data.c       \
76               cipher.c          \
77               encode.c          \
78               sign.c            \
79               verify.c          \
80               revoke.c          \
81               decrypt.c         \
82               keyedit.c         \
83               dearmor.c         \
84               import.c          \
85               export.c          \
86               trustdb.c         \
87               trustdb.h         \
88               tdbdump.c         \
89               tdbio.c           \
90               tdbio.h           \
91               delkey.c          \
92               keygen.c          \
93               pipemode.c        \
94               helptext.c        \
95               keyserver.c       \
96               keyserver-internal.h \
97               photoid.c photoid.h \
98               call-agent.c call-agent.h \
99               card-util.c \
100               exec.c exec.h
101
102 gpgv_SOURCES = gpgv.c           \
103               $(common_source)  \
104               verify.c          
105
106 #gpgd_SOURCES = gpgd.c \
107 #              ks-proto.h \
108 #              ks-proto.c \
109 #              ks-db.c \
110 #              ks-db.h \
111 #              $(common_source)
112
113 LDADD =  $(needed_libs) @INTLLIBS@ @CAPLIBS@ @ZLIBS@ 
114 gpg_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) -lassuan -lgpg-error
115 gpgv_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) -lassuan -lgpg-error
116
117 $(PROGRAMS): $(needed_libs)
118
119 install-data-local:
120         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
121         $(INSTALL_DATA) $(srcdir)/options.skel \
122                                 $(DESTDIR)$(pkgdatadir)/options.skel
123         @set -e;\
124          if test -f $(DESTDIR)$(bindir)/gpgm ; then \
125            echo "removing obsolete gpgm binary" ;   \
126            rm $(DESTDIR)$(bindir)/gpgm ;            \
127          fi