New command --check-programs for gpgconf.
[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 = gpg-agent.ico gpg-agent-resource.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 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
31
32 gpg_agent_SOURCES = \
33         gpg-agent.c agent.h \
34         command.c command-ssh.c \
35         call-pinentry.c \
36         cache.c \
37         trans.c \
38         findkey.c \
39         pksign.c \
40         pkdecrypt.c \
41         genkey.c \
42         protect.c \
43         trustlist.c \
44         divert-scd.c \
45         call-scd.c \
46         learncard.c
47
48 common_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a
49 commonpth_libs = $(libcommonpth) ../jnlib/libjnlib.a ../gl/libgnu.a
50 pwquery_libs = ../common/libsimple-pwquery.a
51
52 #if HAVE_W32_SYSTEM
53 #.rc.o:
54 #       $(WINDRES) `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
55 #        sed -e 's/-I/--include-dir /g;s/-D/--define /g'` -i $< -o $@
56 #
57 #gpg_agent_res_ldflags = -Wl,gpg-agent-resource.o -Wl,--subsystem,windows
58 #gpg_agent_res_deps = gpg-agent-resource.o
59 #else
60 gpg_agent_res_ldflags =
61 gpg_agent_res_deps =
62 #endif
63
64
65 gpg_agent_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_PTH_CFLAGS) $(PTH_CFLAGS)
66 gpg_agent_LDADD = $(commonpth_libs) \
67                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_PTH_LIBS) $(PTH_LIBS) \
68                 $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
69 gpg_agent_LDFLAGS = $(gpg_agent_res_ldflags)
70 gpg_agent_DEPENDENCIES = $(gpg_agent_res_deps)
71
72 gpg_protect_tool_SOURCES = \
73         protect-tool.c \
74         protect.c \
75         minip12.c minip12.h 
76
77 # Needs $(NETLIBS) for libsimple-pwquery.la.
78 gpg_protect_tool_LDADD = $(pwquery_libs) $(common_libs) \
79          $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
80
81 gpg_preset_passphrase_SOURCES = \
82         preset-passphrase.c
83
84 # Needs $(NETLIBS) for libsimple-pwquery.la.
85 gpg_preset_passphrase_LDADD = \
86          $(pwquery_libs) $(common_libs) \
87          $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
88
89
90 # Make sure that all libs are build before we use them.  This is
91 # important for things like make -j2.
92 $(PROGRAMS): $(common_libs) $(commonpth_libs) $(pwquery_libs)
93
94
95
96 #
97 # Module tests
98 #
99 TESTS = t-protect
100
101 t_common_ldadd = $(common_libs) \
102                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
103
104 t_protect_SOURCES = t-protect.c protect.c 
105 t_protect_LDADD = $(t_common_ldadd)
106
107
108
109