w32: Add icons and version information.
[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
22 if !HAVE_W32CE_SYSTEM
23 # fixme: Do no use simple-pwquery for preset-passphrase.
24 libexec_PROGRAMS += gpg-preset-passphrase
25 endif
26 noinst_PROGRAMS = $(TESTS)
27
28 EXTRA_DIST = ChangeLog-2011 gpg-agent-w32info.rc
29
30
31 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl
32
33 include $(top_srcdir)/am/cmacros.am
34
35 if HAVE_W32_SYSTEM
36 resource_objs += gpg-agent-w32info.o
37 endif
38
39 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
40
41 gpg_agent_SOURCES = \
42         gpg-agent.c agent.h \
43         command.c command-ssh.c \
44         call-pinentry.c \
45         cache.c \
46         trans.c \
47         findkey.c \
48         pksign.c \
49         pkdecrypt.c \
50         genkey.c \
51         protect.c \
52         trustlist.c \
53         divert-scd.c \
54         cvt-openpgp.c cvt-openpgp.h \
55         call-scd.c \
56         learncard.c
57
58 common_libs = $(libcommon) ../gl/libgnu.a
59 commonpth_libs = $(libcommonpth) ../gl/libgnu.a
60 if HAVE_W32CE_SYSTEM
61 pwquery_libs =
62 else
63 pwquery_libs = ../common/libsimple-pwquery.a
64 endif
65
66
67 gpg_agent_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(NPTH_CFLAGS)
68 gpg_agent_LDADD = $(commonpth_libs) \
69                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(NPTH_LIBS) \
70                 $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
71                 $(resource_objs)
72 gpg_agent_LDFLAGS = $(extra_bin_ldflags) $(gpg_agent_res_ldflags)
73 gpg_agent_DEPENDENCIES = $(gpg_agent_res_deps)
74                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(PTH_LIBS) \
75                 $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
76                 $(resource_objs)
77
78 gpg_protect_tool_SOURCES = \
79         protect-tool.c \
80         protect.c
81
82 gpg_protect_tool_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
83 gpg_protect_tool_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) \
84          $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
85
86 gpg_preset_passphrase_SOURCES = \
87         preset-passphrase.c
88
89 # Needs $(NETLIBS) for libsimple-pwquery.la.
90 gpg_preset_passphrase_LDADD = \
91          $(pwquery_libs) $(common_libs) \
92          $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
93
94
95 # Make sure that all libs are build before we use them.  This is
96 # important for things like make -j2.
97 $(PROGRAMS): $(common_libs) $(commonpth_libs) $(pwquery_libs)
98
99
100
101 #
102 # Module tests
103 #
104 TESTS = t-protect
105
106 t_common_ldadd = $(common_libs)  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
107                   $(LIBINTL) $(LIBICONV) $(NETLIBS)
108
109 t_protect_SOURCES = t-protect.c protect.c
110 t_protect_LDADD = $(t_common_ldadd)