Some build fixes for platforms like OSX where we use the built-in libintl.
[gnupg.git] / tools / Makefile.am
1 # Makefile.am - Tools directory
2 #       Copyright (C) 2003 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 2 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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 # USA.
20
21 EXTRA_DIST = \
22         Manifest watchgnupg.c \
23         addgnupghome gpgsm-gencert.sh \
24         lspgpot mail-signed-keys convert-from-106
25
26
27 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common
28 include $(top_srcdir)/am/cmacros.am
29
30 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
31
32 sbin_SCRIPTS = addgnupghome
33
34 bin_SCRIPTS = gpgsm-gencert.sh
35 if HAVE_USTAR
36 # bin_SCRIPTS += gpg-zip
37 noinst_SCRIPTS = gpg-zip
38 endif
39
40 if BUILD_SYMCRYPTRUN
41   symcryptrun = symcryptrun
42 else
43   symcryptrun =
44 endif
45
46 bin_PROGRAMS = gpgconf gpg-connect-agent gpgkey2ssh ${symcryptrun} \
47                gpgparsemail
48 if !HAVE_W32_SYSTEM
49 bin_PROGRAMS += watchgnupg
50 endif
51
52 noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
53
54 common_libs = ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a
55 pwquery_libs = ../common/libsimple-pwquery.a
56
57 gpgsplit_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
58                  $(ZLIBS) $(LIBINTL) $(LIBICONV)
59
60 gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
61
62 # jnlib/common sucks in gpg-error, will they, nil they (some compilers
63 # do not eliminate the supposed-to-be-unused-inline-functions).
64 gpgconf_LDADD = $(common_libs) $(LIBINTL) $(GPG_ERROR_LIBS) $(LIBICONV)
65
66 gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
67 gpgparsemail_LDADD = 
68
69 symcryptrun_SOURCES = symcryptrun.c
70 symcryptrun_LDADD = $(LIBUTIL_LIBS) $(common_libs) $(pwquery_libs) \
71                     $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL)
72
73 watchgnupg_SOURCES = watchgnupg.c 
74 watchgnupg_LDADD = $(NETLIBS)
75
76 gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c
77 gpg_connect_agent_LDADD = $(common_libs) $(LIBASSUAN_LIBS) \
78                           $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
79
80 gpgkey2ssh_SOURCES = gpgkey2ssh.c
81 gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
82 # common sucks in jnlib, via use of BUG() in an inline function, which
83 # some compilers do not eliminate.
84 gpgkey2ssh_LDADD = $(common_libs) \
85                    $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL)
86
87
88 # Make sure that all libs are build before we use them.  This is
89 # important for things like make -j2.
90 $(PROGRAMS): $(common_libs) $(pwquery_libs)
91