fixed pluto/scepclient out-of-tree builds
[strongswan.git] / src / pluto / Makefile.am
1 # Makefile.am was ported from the old Makefile the most
2 # painless way. Only the most important options are included,
3 # further work may be necessary here...
4
5 ipsec_PROGRAMS = pluto _pluto_adns
6
7 pluto_SOURCES = \
8 ac.c ac.h \
9 alg_info.c alg_info.h \
10 ca.c ca.h \
11 certs.c certs.h \
12 connections.c connections.h \
13 constants.c constants.h \
14 cookie.c cookie.h \
15 crl.c crl.h \
16 crypto.c crypto.h \
17 db_ops.c db_ops.h \
18 defs.c defs.h \
19 demux.c demux.h \
20 dnskey.c dnskey.h \
21 dsa.c dsa.h \
22 elgamal.c elgamal.h \
23 fetch.c fetch.h \
24 foodgroups.c foodgroups.h \
25 gcryptfix.c gcryptfix.h \
26 id.c id.h \
27 ike_alg.c ike_alg.h \
28 ipsec_doi.c ipsec_doi.h \
29 kameipsec.h \
30 kernel.c kernel.h \
31 kernel_alg.c kernel_alg.h \
32 kernel_netlink.c kernel_netlink.h \
33 kernel_noklips.c kernel_noklips.h \
34 kernel_pfkey.c kernel_pfkey.h \
35 keys.c keys.h \
36 lex.c lex.h \
37 library.c library.h \
38 log.c log.h \
39 md2.c md2.h \
40 md5.c md5.h \
41 modecfg.c modecfg.h \
42 mp_defs.c mp_defs.h \
43 nat_traversal.c nat_traversal.h \
44 ocsp.c ocsp.h \
45 packet.c packet.h \
46 pem.c pem.h \
47 pgp.c pgp.h \
48 pkcs1.c pkcs1.h \
49 pkcs7.c pkcs7.h \
50 plutomain.c \
51 primegen.c smallprime.c \
52 rcv_whack.c rcv_whack.h \
53 rnd.c rnd.h \
54 server.c server.h \
55 sha1.c sha1.h \
56 smartcard.c smartcard.h \
57 spdb.c spdb.h \
58 state.c state.h \
59 timer.c timer.h \
60 vendor.c vendor.h \
61 virtual.c virtual.h \
62 xauth.c xauth.h \
63 x509.c x509.h \
64 alg/ike_alg_aes.c alg/ike_alg_blowfish.c alg/ike_alg_twofish.c \
65 alg/ike_alg_serpent.c alg/ike_alg_sha2.c alg/ike_alginit.c \
66 rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
67
68 _pluto_adns_SOURCES = adns.c adns.h
69
70 LIBSTRONGSWANDIR=$(top_builddir)/src/libstrongswan
71 LIBFREESWANDIR=$(top_builddir)/src/libfreeswan
72 LIBCRYPTODIR=$(top_builddir)/src/libcrypto
73
74
75 INCLUDES = \
76 -I${linuxdir} \
77 -I$(top_srcdir)/src/libstrongswan \
78 -I$(top_srcdir)/src/libfreeswan \
79 -I$(top_srcdir)/src/libcrypto \
80 -I$(top_srcdir)/src/whack
81
82 AM_CFLAGS = \
83 -DIPSEC_DIR=\"${ipsecdir}\" \
84 -DIPSEC_CONFDIR=\"${confdir}\" \
85 -DIPSEC_PIDDIR=\"${piddir}\" \
86 -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" \
87 -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
88 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
89 -DPLUTO -DKLIPS -DDEBUG \
90 -Wformat=0
91
92 pluto_LDADD = \
93 $(LIBSTRONGSWANDIR)/libstrongswan.la \
94 $(LIBFREESWANDIR)/libfreeswan.a \
95 $(LIBCRYPTODIR)/libcrypto.a \
96 -lgmp -lresolv -lpthread -ldl
97
98 _pluto_adns_LDADD = \
99 $(LIBFREESWANDIR)/libfreeswan.a \
100 -lresolv -ldl
101
102 dist_man_MANS = pluto.8 ipsec.secrets.5
103
104 # This compile option activates the memory leak detective
105 if USE_LEAK_DETECTIVE
106   AM_CFLAGS += -DLEAK_DETECTIVE
107 endif
108
109 # This compile option activates the sending of a strongSwan VID
110 if USE_VENDORID
111   AM_CFLAGS += -DVENDORID
112 endif
113
114 # This compile option activates the sending of the XAUTH VID
115 if USE_XAUTH_VID
116   AM_CFLAGS += -DXAUTH_VID
117 endif
118
119 # This compile option activates the support of the Cisco VPN client
120 if USE_CISCO_QUIRKS
121   AM_CFLAGS += -DCISCO_QUIRKS
122 endif
123
124 # This compile option activates NAT traversal with IPSec transport mode
125 if USE_NAT_TRANSPORT
126   AM_CFLAGS += -DI_KNOW_TRANSPORT_MODE_HAS_SECURITY_CONCERN_BUT_I_WANT_IT
127 endif
128
129 # This compile option activates dynamic URL fetching using libcurl
130 if USE_CURL
131   pluto_LDADD += -lcurl
132   AM_CFLAGS += -DLIBCURL
133 endif
134
135 # This compile option activates dynamic LDAP CRL fetching
136 if USE_LDAP
137   pluto_LDADD += -lldap -llber
138   AM_CFLAGS += -DLIBLDAP
139 endif
140
141 # This compile option activates smartcard support
142 if USE_SMARTCARD
143   AM_CFLAGS += -DSMARTCARD
144 endif
145
146 if USE_CAPABILITIES
147   pluto_LDADD += -lcap
148 endif
149
150 if USE_THREADS
151   AM_CFLAGS += -DTHREADS
152 endif