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