A bunch of minor changes for Windows.
[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 common_libs = ../jnlib/libjnlib.a $(libcommon) ../gl/libgnu.a
51 commonpth_libs = ../jnlib/libjnlib.a $(libcommonpth) ../gl/libgnu.a
52 pwquery_libs = ../common/libsimple-pwquery.a
53
54 #if HAVE_W32_SYSTEM
55 #.rc.o:
56 #       $(WINDRES) `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
57 #        sed -e 's/-I/--include-dir /g;s/-D/--define /g'` -i $< -o $@
58 #
59 #gpg_agent_res_ldflags = -Wl,gpg-agent-resource.o -Wl,--subsystem,windows
60 #gpg_agent_res_deps = gpg-agent-resource.o
61 #else
62 gpg_agent_res_ldflags =
63 gpg_agent_res_deps =
64 #endif
65
66
67 gpg_agent_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_PTH_CFLAGS) $(PTH_CFLAGS)
68 gpg_agent_LDADD = $(commonpth_libs) \
69                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_PTH_LIBS) $(PTH_LIBS) \
70                 $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
71 gpg_agent_LDFLAGS = $(gpg_agent_res_ldflags)
72 gpg_agent_DEPENDENCIES = $(gpg_agent_res_deps)
73
74 gpg_protect_tool_SOURCES = \
75         protect-tool.c \
76         protect.c \
77         minip12.c minip12.h 
78
79 # Needs $(NETLIBS) for libsimple-pwquery.la.
80 gpg_protect_tool_LDADD = $(pwquery_libs) $(common_libs) \
81          $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
82
83 gpg_preset_passphrase_SOURCES = \
84         preset-passphrase.c
85
86 # Needs $(NETLIBS) for libsimple-pwquery.la.
87 gpg_preset_passphrase_LDADD = \
88          $(pwquery_libs) $(common_libs) \
89          $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
90
91
92 # Make sure that all libs are build before we use them.  This is
93 # important for things like make -j2.
94 $(PROGRAMS): $(common_libs) $(commonpth_libs) $(pwquery_libs)
95
96
97
98 #
99 # Module tests
100 #
101 TESTS = t-protect
102
103 t_common_ldadd = $(common_libs) \
104                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
105
106 t_protect_SOURCES = t-protect.c protect.c 
107 t_protect_LDADD = $(t_common_ldadd)
108
109
110
111