gpg: Fix buglet in the check_all_keysigs function.
[gnupg.git] / tools / Makefile.am
1 # Makefile.am - Tools directory
2 #       Copyright (C) 2003, 2007 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
19 EXTRA_DIST = \
20         Manifest watchgnupg.c \
21         addgnupghome applygnupgdefaults \
22         lspgpot mail-signed-keys convert-from-106 sockprox.c \
23         ccidmon.c ChangeLog-2011 gpg-connect-agent-w32info.rc
24
25
26 AM_CPPFLAGS = -I$(top_srcdir)/common
27 include $(top_srcdir)/am/cmacros.am
28
29 if HAVE_W32_SYSTEM
30 resource_objs += gpg-connect-agent-w32info.o
31 endif
32
33 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
34
35 sbin_SCRIPTS = addgnupghome applygnupgdefaults
36
37 if HAVE_USTAR
38 # bin_SCRIPTS += gpg-zip
39 noinst_SCRIPTS = gpg-zip
40 endif
41
42 if BUILD_SYMCRYPTRUN
43   symcryptrun = symcryptrun
44 else
45   symcryptrun =
46 endif
47
48 if BUILD_GPGTAR
49   gpgtar = gpgtar
50 else
51   gpgtar =
52 endif
53
54 bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun}
55 if !HAVE_W32_SYSTEM
56 bin_PROGRAMS += watchgnupg gpgparsemail
57 endif
58 if !HAVE_W32CE_SYSTEM
59 bin_PROGRAMS += ${gpgtar}
60 endif
61
62 if !DISABLE_REGEX
63 libexec_PROGRAMS = gpg-check-pattern
64 endif
65
66 if !HAVE_W32CE_SYSTEM
67 noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
68 endif
69
70 common_libs = $(libcommon)
71 commonpth_libs = $(libcommonpth)
72
73 # Some modules require PTH under W32CE.
74 if HAVE_W32CE_SYSTEM
75 maybe_commonpth_libs = $(commonpth_libs)
76 else
77 maybe_commonpth_libs = $(common_libs)
78 endif
79
80 if HAVE_W32CE_SYSTEM
81 pwquery_libs =
82 else
83 pwquery_libs = ../common/libsimple-pwquery.a
84 endif
85
86 if HAVE_W32CE_SYSTEM
87 opt_libassuan_libs = $(LIBASSUAN_LIBS)
88 endif
89
90 gpgsplit_LDADD = $(common_libs) \
91                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
92                  $(ZLIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
93
94 gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
95
96 # common sucks in gpg-error, will they, nil they (some compilers
97 # do not eliminate the supposed-to-be-unused-inline-functions).
98 gpgconf_LDADD = $(maybe_commonpth_libs) $(opt_libassuan_libs) \
99                 $(LIBINTL) $(GPG_ERROR_LIBS) $(NETLIBS) \
100                 $(LIBICONV) $(W32SOCKLIBS)
101 gpgconf_LDFLAGS = $(extra_bin_ldflags)
102
103 gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
104 gpgparsemail_LDADD =
105
106 symcryptrun_SOURCES = symcryptrun.c
107 symcryptrun_LDADD = $(LIBUTIL_LIBS) $(common_libs) $(pwquery_libs) \
108                     $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) \
109                     $(LIBICONV) $(NETLIBS) $(W32SOCKLIBS)
110
111 watchgnupg_SOURCES = watchgnupg.c
112 watchgnupg_LDADD = $(NETLIBS)
113
114 gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c
115 # FIXME: remove PTH_LIBS (why do we need them at all?)
116 gpg_connect_agent_LDADD = ../common/libgpgrl.a $(common_libs) \
117                           $(LIBASSUAN_LIBS) $(NPTH_LIBS) $(GPG_ERROR_LIBS) \
118                           $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
119                           $(resource_objs)
120
121
122 if !DISABLE_REGEX
123 gpg_check_pattern_SOURCES = gpg-check-pattern.c
124 gpg_check_pattern_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
125 gpg_check_pattern_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
126                           $(LIBINTL) $(NETLIBS) $(LIBICONV) $(W32SOCKLIBS)
127 endif
128
129 gpgtar_SOURCES = \
130         gpgtar.c gpgtar.h \
131         gpgtar-create.c \
132         gpgtar-extract.c \
133         gpgtar-list.c \
134         no-libgcrypt.c
135 gpgtar_CFLAGS = $(GPG_ERROR_CFLAGS)
136 gpgtar_LDADD = $(libcommon) $(GPG_ERROR_LIBS) \
137                $(LIBINTL) $(NETLIBS) $(LIBICONV) $(W32SOCKLIBS)
138
139
140 # Make sure that all libs are build before we use them.  This is
141 # important for things like make -j2.
142 $(PROGRAMS): $(common_libs) $(pwquery_libs) ../common/libgpgrl.a