More changes on the way to remove secring.gpg.
[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         ccidmon.c
24
25
26 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common
27 include $(top_srcdir)/am/cmacros.am
28
29 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
30
31 sbin_SCRIPTS = addgnupghome applygnupgdefaults
32
33 bin_SCRIPTS = gpgsm-gencert.sh
34 if HAVE_USTAR
35 # bin_SCRIPTS += gpg-zip
36 noinst_SCRIPTS = gpg-zip
37 endif
38
39 if BUILD_SYMCRYPTRUN
40   symcryptrun = symcryptrun
41 else
42   symcryptrun =
43 endif
44
45 # Fixme: We should remove the gpgkey2ssh tool.
46 bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun}
47 if !HAVE_W32_SYSTEM
48 bin_PROGRAMS += watchgnupg gpgparsemail
49 endif
50 if !HAVE_W32CE_SYSTEM
51 bin_PROGRAMS += gpgkey2ssh gpgtar
52 endif
53
54 if !DISABLE_REGEX
55 libexec_PROGRAMS = gpg-check-pattern
56 endif
57
58 if !HAVE_W32CE_SYSTEM
59 noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
60 endif
61
62 common_libs = $(libcommon) ../gl/libgnu.a
63 if HAVE_W32CE_SYSTEM
64 pwquery_libs = 
65 else
66 pwquery_libs = ../common/libsimple-pwquery.a
67 endif
68
69 if HAVE_W32CE_SYSTEM
70 opt_libassuan_libs = $(LIBASSUAN_LIBS)
71 endif
72
73 gpgsplit_LDADD = $(common_libs) \
74                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
75                  $(ZLIBS) $(LIBINTL) $(LIBICONV)
76
77 gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
78
79 # common sucks in gpg-error, will they, nil they (some compilers
80 # do not eliminate the supposed-to-be-unused-inline-functions).
81 gpgconf_LDADD = $(common_libs) $(opt_libassuan_libs) \
82                 $(LIBINTL) $(GPG_ERROR_LIBS) $(LIBICONV) $(W32SOCKLIBS)
83
84 gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
85 gpgparsemail_LDADD = 
86
87 symcryptrun_SOURCES = symcryptrun.c
88 symcryptrun_LDADD = $(LIBUTIL_LIBS) $(common_libs) $(pwquery_libs) \
89                     $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) \
90                     $(LIBICONV) $(W32SOCKLIBS)
91
92 watchgnupg_SOURCES = watchgnupg.c 
93 watchgnupg_LDADD = $(NETLIBS)
94
95 gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c
96 # FIXME: remove PTH_LIBS (why do we need them at all?)
97 gpg_connect_agent_LDADD = ../common/libgpgrl.a $(common_libs) \
98                           $(LIBASSUAN_LIBS) $(PTH_LIBS) $(GPG_ERROR_LIBS) \
99                           $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV)
100
101 if !HAVE_W32CE_SYSTEM
102 gpgkey2ssh_SOURCES = gpgkey2ssh.c
103 gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
104 # common via use of BUG() in an inline function, which
105 # some compilers do not eliminate.
106 gpgkey2ssh_LDADD = $(common_libs) \
107                    $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
108 endif
109
110 if !DISABLE_REGEX
111 gpg_check_pattern_SOURCES = gpg-check-pattern.c
112 gpg_check_pattern_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
113 gpg_check_pattern_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
114                           $(LIBINTL) $(LIBICONV) $(W32SOCKLIBS)
115 endif
116
117 gpgtar_SOURCES = \
118         gpgtar.c gpgtar.h \
119         gpgtar-create.c \
120         gpgtar-extract.c \
121         gpgtar-list.c \
122         no-libgcrypt.c
123 gpgtar_LDADD = $(common_libs)
124
125
126 # Make sure that all libs are build before we use them.  This is
127 # important for things like make -j2.
128 $(PROGRAMS): $(common_libs) $(pwquery_libs) ../common/libgpgrl.a
129