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 3 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, see <http://www.gnu.org/licenses/>. 18## Process this file with automake to produce Makefile.in 19 20AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/intl @LIBUSB_CPPFLAGS@ 21 22# it seems that we can't use this with automake 1.5 23#OMIT_DEPENDENCIES = zlib.h zconf.h 24 25if ! HAVE_DOSISH_SYSTEM 26AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" 27AM_CPPFLAGS += -DGNUPG_LIBEXECDIR="\"$(libexecdir)/@PACKAGE@\"" 28AM_CPPFLAGS += -DGNUPG_DATADIR="\"$(pkgdatadir)\"" 29AM_CPPFLAGS += -DGNUPG_LIBDIR="\"$(libdir)/@PACKAGE@\"" 30endif 31 32needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a 33other_libs = $(LIBICONV) $(DNSLIBS) $(LIBINTL) $(CAPLIBS) 34 35 36bin_PROGRAMS = gpg gpgv 37 38# "make distcheck" runs "gpg --version" which unfortunately may print 39# warnings about unsupported options to stderr which make distcheck 40# rejects. I am not sure on how to pass the envvar GNUPGHOME to that 41# gpg invocation to make sure that a gpg.conf from gnupg 2 is not 42# used. The easiest way to avoid that is to not run this extra test. 43AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = gpg$(EXEEXT) 44 45dist_pkgdata_DATA = options.skel 46 47if ENABLE_BZIP2_SUPPORT 48bzip2_source = compress-bz2.c 49else 50bzip2_source = 51endif 52 53common_source = \ 54 global.h \ 55 build-packet.c \ 56 compress.c \ 57 $(bzip2_source) \ 58 filter.h \ 59 free-packet.c \ 60 getkey.c \ 61 keydb.c keydb.h \ 62 keyring.c keyring.h \ 63 seskey.c \ 64 kbnode.c \ 65 main.h \ 66 mainproc.c \ 67 armor.c \ 68 mdfilter.c \ 69 textfilter.c \ 70 progress.c \ 71 misc.c \ 72 options.h \ 73 openfile.c \ 74 keyid.c \ 75 packet.h \ 76 parse-packet.c \ 77 status.c \ 78 status.h \ 79 plaintext.c \ 80 sig-check.c \ 81 keylist.c \ 82 signal.c 83 84if ENABLE_CARD_SUPPORT 85card_support_source_gpg = card-util.c 86card_support_source_scd = \ 87 app-common.h \ 88 app-openpgp.c \ 89 iso7816.c iso7816.h \ 90 apdu.c apdu.h \ 91 ccid-driver.c ccid-driver.h 92card_support_source_local = cardglue.c cardglue.h tlv.c tlv.h 93else 94card_support_source_gpg = 95card_support_source_scd = 96card_support_source_local = 97endif 98 99card_support_source = $(card_support_source_local) $(card_support_source_gpg) $(card_support_source_scd) 100 101gpg_SOURCES = gpg.c \ 102 $(common_source) \ 103 $(card_support_source) \ 104 pkclist.c \ 105 skclist.c \ 106 pubkey-enc.c \ 107 passphrase.c \ 108 seckey-cert.c \ 109 encr-data.c \ 110 cipher.c \ 111 encode.c \ 112 sign.c \ 113 verify.c \ 114 revoke.c \ 115 decrypt.c \ 116 keyedit.c \ 117 dearmor.c \ 118 import.c \ 119 export.c \ 120 trustdb.c \ 121 trustdb.h \ 122 tdbdump.c \ 123 tdbio.c \ 124 tdbio.h \ 125 delkey.c \ 126 keygen.c \ 127 pipemode.c \ 128 helptext.c \ 129 keyserver.c \ 130 keyserver-internal.h \ 131 photoid.c photoid.h \ 132 exec.c exec.h 133 134gpgv_SOURCES = gpgv.c \ 135 $(common_source) \ 136 verify.c 137 138LDADD = $(needed_libs) $(other_libs) @ZLIBS@ @W32LIBS@ 139gpg_LDADD = $(LDADD) @LIBREADLINE@ @DLLIBS@ @NETLIBS@ @LIBUSB@ 140 141$(PROGRAMS): $(needed_libs) 142 143install-exec-hook: 144 @set -e;\ 145 if test -f $(DESTDIR)$(bindir)/gpgm ; then \ 146 echo "removing obsolete gpgm binary" ; \ 147 rm $(DESTDIR)$(bindir)/gpgm ; \ 148 fi 149 150# Helper to update some source files. 151update-source-from-gnupg-2: 152 @set -e; \ 153 if test -d ../../gnupg-1.9/scd; then dir="../../gnupg-1.9"; \ 154 elif test -d ../../gnupg/scd; then dir="../../gnupg"; \ 155 else exit 1; \ 156 fi; \ 157 for i in $(card_support_source_scd); do \ 158 cp $$dir/scd/$$i $$i; echo $$i; \ 159 done ;\ 160 for i in $(card_support_source_gpg); do \ 161 cp $$dir/g10/$$i $$i; echo $$i; \ 162 done ; \ 163 echo "Please remember to update the ChangeLog accordingly!" 164