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