agent: Fix length test in sshcontrol parser.
[gnupg.git] / agent / Makefile.am
1 # Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
2 #
3 # This file is part of GnuPG.
4 #
5 # GnuPG is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # GnuPG is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17
18 ## Process this file with automake to produce Makefile.in
19
20 bin_PROGRAMS = gpg-agent
21 libexec_PROGRAMS = gpg-protect-tool gpg-preset-passphrase
22 noinst_PROGRAMS = $(TESTS)
23
24 EXTRA_DIST = ChangeLog-2011 gpg-agent-w32info.rc
25
26 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl
27
28 include $(top_srcdir)/am/cmacros.am
29
30 if HAVE_W32_SYSTEM
31 resource_objs += gpg-agent-w32info.o
32 endif
33
34 AM_CFLAGS = $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS)
35
36 gpg_agent_SOURCES = \
37         gpg-agent.c agent.h \
38         command.c command-ssh.c \
39         call-pinentry.c \
40         cache.c \
41         trans.c \
42         findkey.c \
43         pksign.c \
44         pkdecrypt.c \
45         genkey.c \
46         protect.c \
47         trustlist.c \
48         divert-scd.c \
49         call-scd.c \
50         learncard.c
51
52 common_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a
53 commonpth_libs = $(libcommonpth) ../jnlib/libjnlib.a ../gl/libgnu.a
54 pwquery_libs = ../common/libsimple-pwquery.a
55
56
57 gpg_agent_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(PTH_CFLAGS)
58 gpg_agent_LDADD = $(commonpth_libs) \
59                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(PTH_LIBS) \
60                 $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
61                 $(resource_objs)
62
63 gpg_protect_tool_SOURCES = \
64         protect-tool.c \
65         protect.c \
66         minip12.c minip12.h
67
68 gpg_protect_tool_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
69 gpg_protect_tool_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) \
70          $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
71
72 gpg_preset_passphrase_SOURCES = \
73         preset-passphrase.c
74
75 # Needs $(NETLIBS) for libsimple-pwquery.la.
76 gpg_preset_passphrase_LDADD = \
77          $(pwquery_libs) $(common_libs) \
78          $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
79
80
81 # Make sure that all libs are build before we use them.  This is
82 # important for things like make -j2.
83 $(PROGRAMS): $(common_libs) $(commonpth_libs) $(pwquery_libs)
84
85
86
87 #
88 # Module tests
89 #
90 TESTS = t-protect
91
92 t_common_ldadd = $(common_libs) \
93                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
94
95 t_protect_SOURCES = t-protect.c protect.c
96 t_protect_LDADD = $(t_common_ldadd)