* export.c (do_export_stream) [ENABLE_SELINUX_HACKS]: Don't allow
[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 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               comment.c         \
66               status.c          \
67               status.h          \
68               plaintext.c       \
69               sig-check.c       \
70               keylist.c         \
71               signal.c
72
73 if ENABLE_CARD_SUPPORT
74 card_support_source_g10 = card-util.c 
75 card_support_source_scd = \
76         app-common.h \
77         app-openpgp.c \
78         iso7816.c iso7816.h \
79         apdu.c apdu.h \
80         ccid-driver.c ccid-driver.h
81 card_support_source_local = cardglue.c cardglue.h tlv.c tlv.h
82 else
83 card_support_source_g10 =
84 card_support_source_scd = 
85 card_support_source_local =
86 endif
87
88 card_support_source = $(card_support_source_local) $(card_support_source_g10) $(card_support_source_scd)
89
90 gpg_SOURCES  = g10.c            \
91               $(common_source)  \
92               $(card_support_source) \
93               pkclist.c         \
94               skclist.c         \
95               pubkey-enc.c      \
96               passphrase.c      \
97               seckey-cert.c     \
98               encr-data.c       \
99               cipher.c          \
100               encode.c          \
101               sign.c            \
102               verify.c          \
103               revoke.c          \
104               decrypt.c         \
105               keyedit.c         \
106               dearmor.c         \
107               import.c          \
108               export.c          \
109               trustdb.c         \
110               trustdb.h         \
111               tdbdump.c         \
112               tdbio.c           \
113               tdbio.h           \
114               delkey.c          \
115               keygen.c          \
116               pipemode.c        \
117               helptext.c        \
118               keyserver.c       \
119               keyserver-internal.h \
120               photoid.c photoid.h \
121               exec.c exec.h
122
123 gpgv_SOURCES = gpgv.c           \
124               $(common_source)  \
125               verify.c          
126
127 #gpgd_SOURCES = gpgd.c \
128 #              ks-proto.h \
129 #              ks-proto.c \
130 #              ks-db.c \
131 #              ks-db.h \
132 #              $(common_source)
133
134 LDADD =  $(needed_libs) @LIBINTL@ @CAPLIBS@ @ZLIBS@ @W32LIBS@
135 gpg_LDADD = $(LDADD) @DLLIBS@ @NETLIBS@ @LIBUSB_LIBS@
136
137 $(PROGRAMS): $(needed_libs)
138
139 install-data-local:
140         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
141         $(INSTALL_DATA) $(srcdir)/options.skel \
142                                 $(DESTDIR)$(pkgdatadir)/options.skel
143         @set -e;\
144          if test -f $(DESTDIR)$(bindir)/gpgm ; then \
145            echo "removing obsolete gpgm binary" ;   \
146            rm $(DESTDIR)$(bindir)/gpgm ;            \
147          fi
148
149 # Helper to update some source files.
150 update-source-from-gnupg-2:
151         @set -e; \
152          if test -d ../../gnupg-1.9/scd; then dir="../../gnupg-1.9"; \
153          elif test -d ../../gnupg/scd; then dir="../../gnupg"; \
154          else exit 1; \
155          fi; \
156          for i in $(card_support_source_scd); do \
157            cp $$dir/scd/$$i $$i; echo $$i; \
158          done ;\
159          for i in $(card_support_source_g10); do \
160            cp $$dir/g10/$$i $$i; echo $$i; \
161          done ; \
162          echo "Please remember to update the ChangeLog accordingly!"