Implemented more gpg-agen options to support certain passphrase policies.
[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 gpgsm-gencert.sh \
22         lspgpot mail-signed-keys convert-from-106 sockprox.c
23
24
25 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common
26 include $(top_srcdir)/am/cmacros.am
27
28 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
29
30 sbin_SCRIPTS = addgnupghome applygnupgdefaults
31
32 bin_SCRIPTS = gpgsm-gencert.sh
33 if HAVE_USTAR
34 # bin_SCRIPTS += gpg-zip
35 noinst_SCRIPTS = gpg-zip
36 endif
37
38 if BUILD_SYMCRYPTRUN
39   symcryptrun = symcryptrun
40 else
41   symcryptrun =
42 endif
43
44 bin_PROGRAMS = gpgconf gpg-connect-agent gpgkey2ssh ${symcryptrun}
45 if !HAVE_W32_SYSTEM
46 bin_PROGRAMS += watchgnupg gpgparsemail
47 endif
48
49 if !DISABLE_REGEX
50 libexec_PROGRAMS = gpg-check-pattern
51 endif
52
53 noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
54
55 common_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a
56 pwquery_libs = ../common/libsimple-pwquery.a
57
58 gpgsplit_LDADD = $(common_libs) \
59                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
60                  $(ZLIBS) $(LIBINTL) $(LIBICONV)
61
62 gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
63
64 # jnlib/common sucks in gpg-error, will they, nil they (some compilers
65 # do not eliminate the supposed-to-be-unused-inline-functions).
66 gpgconf_LDADD = $(common_libs) \
67                 $(LIBINTL) $(GPG_ERROR_LIBS) $(LIBICONV) $(W32SOCKLIBS)
68
69 gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
70 gpgparsemail_LDADD = 
71
72 symcryptrun_SOURCES = symcryptrun.c
73 symcryptrun_LDADD = $(LIBUTIL_LIBS) $(common_libs) $(pwquery_libs) \
74                     $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) \
75                     $(LIBICONV) $(W32SOCKLIBS)
76
77 watchgnupg_SOURCES = watchgnupg.c 
78 watchgnupg_LDADD = $(NETLIBS)
79
80 gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c
81 # FIXME: remove PTH_LIBS (why do we need them at all?)
82 gpg_connect_agent_LDADD = $(common_libs) $(LIBASSUAN_LIBS) $(PTH_LIBS) \
83                           $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
84
85 gpgkey2ssh_SOURCES = gpgkey2ssh.c
86 gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
87 # common sucks in jnlib, via use of BUG() in an inline function, which
88 # some compilers do not eliminate.
89 gpgkey2ssh_LDADD = $(common_libs) \
90                    $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
91
92
93 if !DISABLE_REGEX
94 gpg_check_pattern_SOURCES = gpg-check-pattern.c
95 gpg_check_pattern_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
96 gpg_check_pattern_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
97                           $(LIBINTL) $(LIBICONV) $(W32SOCKLIBS)
98 endif
99
100 # Make sure that all libs are build before we use them.  This is
101 # important for things like make -j2.
102 $(PROGRAMS): $(common_libs) $(pwquery_libs)
103