g10: Unattended key generation "Key-Grip" and "Subkey-Grip".
[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 <https://www.gnu.org/licenses/>.
18
19 EXTRA_DIST = \
20         Manifest watchgnupg.c no-libgcrypt.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 =
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_WKS_TOOLS
49   gpg_wks_server = gpg-wks-server
50 else
51   gpg_wks_server =
52 endif
53
54 libexec_PROGRAMS = gpg-wks-client
55
56 bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun}
57 if !HAVE_W32_SYSTEM
58 bin_PROGRAMS += watchgnupg gpgparsemail ${gpg_wks_server}
59 endif
60
61 if !DISABLE_REGEX
62 libexec_PROGRAMS += gpg-check-pattern
63 endif
64
65 if !HAVE_W32CE_SYSTEM
66 noinst_PROGRAMS = clean-sat make-dns-cert gpgsplit
67 endif
68
69 if !HAVE_W32CE_SYSTEM
70 if BUILD_GPGTAR
71   bin_PROGRAMS += gpgtar
72 else
73   noinst_PROGRAMS += gpgtar
74 endif
75 endif
76
77 common_libs = $(libcommon)
78 commonpth_libs = $(libcommonpth)
79
80 # Some modules require PTH under W32CE.
81 if HAVE_W32CE_SYSTEM
82 maybe_commonpth_libs = $(commonpth_libs)
83 else
84 maybe_commonpth_libs = $(common_libs)
85 endif
86
87 if HAVE_W32CE_SYSTEM
88 pwquery_libs =
89 else
90 pwquery_libs = ../common/libsimple-pwquery.a
91 endif
92
93 if HAVE_W32CE_SYSTEM
94 opt_libassuan_libs = $(LIBASSUAN_LIBS)
95 endif
96
97 gpgsplit_LDADD = $(common_libs) \
98                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
99                  $(ZLIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
100
101 gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c
102
103 # common sucks in gpg-error, will they, nil they (some compilers
104 # do not eliminate the supposed-to-be-unused-inline-functions).
105 gpgconf_LDADD = $(maybe_commonpth_libs) $(opt_libassuan_libs) \
106                 $(LIBINTL) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(NETLIBS) \
107                 $(LIBICONV) $(W32SOCKLIBS)
108 gpgconf_LDFLAGS = $(extra_bin_ldflags)
109
110 gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
111 gpgparsemail_LDADD =
112
113 symcryptrun_SOURCES = symcryptrun.c
114 symcryptrun_LDADD = $(LIBUTIL_LIBS) $(common_libs) $(pwquery_libs) \
115                     $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) \
116                     $(LIBICONV) $(NETLIBS) $(W32SOCKLIBS) $(LIBASSUAN_LIBS)
117
118 watchgnupg_SOURCES = watchgnupg.c
119 watchgnupg_LDADD = $(NETLIBS)
120
121 gpg_connect_agent_SOURCES = gpg-connect-agent.c
122 gpg_connect_agent_LDADD = ../common/libgpgrl.a $(common_libs) \
123                           $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) \
124                           $(GPG_ERROR_LIBS) \
125                           $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
126                           $(resource_objs)
127
128
129 if !DISABLE_REGEX
130 gpg_check_pattern_SOURCES = gpg-check-pattern.c
131 gpg_check_pattern_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(INCICONV)
132 gpg_check_pattern_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
133                           $(LIBINTL) $(NETLIBS) $(LIBICONV) $(W32SOCKLIBS) \
134                           $(LIBICONV)
135 endif
136
137 gpgtar_SOURCES = \
138         gpgtar.c gpgtar.h \
139         gpgtar-create.c \
140         gpgtar-extract.c \
141         gpgtar-list.c
142 gpgtar_CFLAGS = $(GPG_ERROR_CFLAGS)
143 gpgtar_LDADD = $(libcommon) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
144                $(LIBINTL) $(NETLIBS) $(LIBICONV) $(W32SOCKLIBS)
145
146 gpg_wks_server_SOURCES = \
147         gpg-wks-server.c \
148         gpg-wks.h \
149         wks-util.c \
150         wks-receive.c \
151         rfc822parse.c rfc822parse.h \
152         mime-parser.c mime-parser.h \
153         mime-maker.c  mime-maker.h  \
154         send-mail.c   send-mail.h
155
156 gpg_wks_server_CFLAGS = $(GPG_ERROR_CFLAGS) $(INCICONV)
157 gpg_wks_server_LDADD = $(libcommon) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
158                        $(LIBINTL) $(LIBICONV)
159
160 gpg_wks_client_SOURCES = \
161         gpg-wks-client.c \
162         gpg-wks.h  \
163         wks-util.c \
164         wks-receive.c \
165         rfc822parse.c rfc822parse.h \
166         mime-parser.c mime-parser.h \
167         mime-maker.h  mime-maker.c  \
168         send-mail.c   send-mail.h   \
169         call-dirmngr.c call-dirmngr.h
170
171 gpg_wks_client_CFLAGS = $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) $(INCICONV)
172 gpg_wks_client_LDADD = $(libcommon) \
173                        $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
174                        $(LIBINTL) $(LIBICONV)
175
176
177 # Make sure that all libs are build before we use them.  This is
178 # important for things like make -j2.
179 $(PROGRAMS): $(common_libs) $(pwquery_libs) ../common/libgpgrl.a