Various changes
[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 2 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, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18 # USA.
19
20 ## Process this file with automake to produce Makefile.in
21
22 bin_PROGRAMS = gpg-agent
23 libexec_PROGRAMS = gpg-protect-tool gpg-preset-passphrase
24 noinst_PROGRAMS = $(TESTS)
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 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_PTH_CFLAGS) $(GPG_ERROR_CFLAGS) \
31             $(PTH_CFLAGS)
32
33 gpg_agent_SOURCES = \
34         gpg-agent.c agent.h \
35         command.c command-ssh.c \
36         call-pinentry.c \
37         cache.c \
38         trans.c \
39         findkey.c \
40         pksign.c \
41         pkdecrypt.c \
42         genkey.c \
43         protect.c \
44         trustlist.c \
45         divert-scd.c \
46         call-scd.c \
47         learncard.c
48
49
50 common_libs = ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a
51 pwquery_libs = ../common/libsimple-pwquery.a
52
53 gpg_agent_LDADD = $(common_libs) \
54                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_PTH_LIBS) $(PTH_LIBS) \
55                 $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS)
56
57 gpg_protect_tool_SOURCES = \
58         protect-tool.c \
59         protect.c \
60         minip12.c minip12.h 
61
62 # Needs $(NETLIBS) for libsimple-pwquery.la.
63 gpg_protect_tool_LDADD =  $(pwquery_libs) $(common_libs) \
64          $(LIBGCRYPT_LIBS) -lgpg-error $(LIBINTL) $(NETLIBS)
65 if HAVE_W32_SYSTEM
66 gpg_protect_tool_LDADD += -lwsock32
67 endif
68
69 gpg_preset_passphrase_SOURCES = \
70         preset-passphrase.c
71
72 # Needs $(NETLIBS) for libsimple-pwquery.la.
73 gpg_preset_passphrase_LDADD =  $(pwquery_libs) $(common_libs) \
74          $(LIBGCRYPT_LIBS) -lgpg-error @LIBINTL@ $(NETLIBS)
75 if HAVE_W32_SYSTEM
76 gpg_preset_passphrase_LDADD += -lwsock32
77 endif
78
79 # Make sure that all libs are build before we use them.  This is
80 # important for things like make -j2.
81 $(PROGRAMS): $(common_libs) $(pwquery_libs)
82
83
84 #
85 # Module tests
86 #
87 TESTS = t-protect
88
89 t_common_ldadd = $(common_libs) \
90                  $(LIBGCRYPT_LIBS) -lgpg-error $(LIBINTL)
91
92 t_protect_SOURCES = t-protect.c protect.c 
93 t_protect_LDADD = $(t_common_ldadd)
94
95
96
97