pluto and scepclient now use chunk_t from libstrongswan
[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 asn1.c asn1.h \
11 ca.c ca.h \
12 certs.c certs.h \
13 connections.c connections.h \
14 constants.c constants.h \
15 cookie.c cookie.h \
16 crl.c crl.h \
17 crypto.c crypto.h \
18 db_ops.c db_ops.h \
19 defs.c defs.h \
20 demux.c demux.h \
21 dnskey.c dnskey.h \
22 dsa.c dsa.h \
23 elgamal.c elgamal.h \
24 fetch.c fetch.h \
25 foodgroups.c foodgroups.h \
26 gcryptfix.c gcryptfix.h \
27 id.c id.h \
28 ike_alg.c ike_alg.h \
29 ipsec_doi.c ipsec_doi.h \
30 kameipsec.h \
31 kernel.c kernel.h \
32 kernel_alg.c kernel_alg.h \
33 kernel_netlink.c kernel_netlink.h \
34 kernel_noklips.c kernel_noklips.h \
35 kernel_pfkey.c kernel_pfkey.h \
36 keys.c keys.h \
37 lex.c lex.h \
38 library.c library.h \
39 log.c log.h \
40 md2.c md2.h \
41 md5.c md5.h \
42 modecfg.c modecfg.h \
43 mp_defs.c mp_defs.h \
44 nat_traversal.c nat_traversal.h \
45 ocsp.c ocsp.h \
46 packet.c packet.h \
47 pem.c pem.h \
48 pgp.c pgp.h \
49 pkcs1.c pkcs1.h \
50 pkcs7.c pkcs7.h \
51 plutomain.c \
52 primegen.c smallprime.c \
53 rcv_whack.c rcv_whack.h \
54 rnd.c rnd.h \
55 server.c server.h \
56 sha1.c sha1.h \
57 smartcard.c smartcard.h \
58 spdb.c spdb.h \
59 state.c state.h \
60 timer.c timer.h \
61 vendor.c vendor.h \
62 virtual.c virtual.h \
63 xauth.c xauth.h \
64 x509.c x509.h \
65 alg/ike_alg_aes.c alg/ike_alg_blowfish.c alg/ike_alg_twofish.c \
66 alg/ike_alg_serpent.c alg/ike_alg_sha2.c alg/ike_alginit.c \
67 rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
68
69 _pluto_adns_SOURCES = adns.c adns.h
70
71 LIBSTRONGSWANDIR=$(top_srcdir)/src/libstrongswan
72 LIBFREESWANDIR=$(top_builddir)/src/libfreeswan
73 LIBCRYPTODIR=$(top_builddir)/src/libcrypto
74
75
76 INCLUDES = \
77 -I${linuxdir} \
78 -I$(LIBSTRONGSWANDIR)\
79 -I$(top_srcdir)/src/libfreeswan \
80 -I$(top_srcdir)/src/libcrypto \
81 -I$(top_srcdir)/src/whack
82
83 AM_CFLAGS = \
84 -DIPSEC_DIR=\"${ipsecdir}\" \
85 -DIPSEC_CONFDIR=\"${confdir}\" \
86 -DIPSEC_PIDDIR=\"${piddir}\" \
87 -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" \
88 -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
89 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
90 -DPLUTO -DKLIPS -DDEBUG
91
92 pluto_LDADD = \
93 oid.o debug.o linked_list.o enumerator.o settings.o utils.o chunk.o \
94 $(LIBFREESWANDIR)/libfreeswan.a \
95 $(LIBCRYPTODIR)/libcrypto.a \
96 -lgmp -lresolv -lpthread -ldl
97
98 if USE_LEAK_DETECTIVE
99   AM_CFLAGS += -DLEAK_DETECTIVE
100   pluto_LDADD += backtrace.o leak_detective.o
101 endif
102
103 _pluto_adns_LDADD = \
104 $(LIBFREESWANDIR)/libfreeswan.a \
105 -lresolv -ldl
106
107 dist_man_MANS = pluto.8 ipsec.secrets.5
108
109 # Copy functions from libstrongswan
110 oid.o : $(LIBSTRONGSWANDIR)/asn1/oid.c $(LIBSTRONGSWANDIR)/asn1/oid.h
111                 $(COMPILE) -c -o $@ $<
112
113 debug.o : $(LIBSTRONGSWANDIR)/debug.c $(LIBSTRONGSWANDIR)/debug.h
114                 $(COMPILE) -c -o $@ $<
115
116 backtrace.o : $(LIBSTRONGSWANDIR)/utils/backtrace.c $(LIBSTRONGSWANDIR)/utils/backtrace.h
117                 $(COMPILE) -c -o $@ $<
118
119 leak_detective.o : $(LIBSTRONGSWANDIR)/utils/leak_detective.c $(LIBSTRONGSWANDIR)/utils/leak_detective.h
120                 $(COMPILE) -c -o $@ $<
121
122 linked_list.o : $(LIBSTRONGSWANDIR)/utils/linked_list.c $(LIBSTRONGSWANDIR)/utils/linked_list.h
123                 $(COMPILE) -c -o $@ $<
124
125 enumerator.o : $(LIBSTRONGSWANDIR)/utils/enumerator.c $(LIBSTRONGSWANDIR)/utils/enumerator.h
126                 $(COMPILE) -c -o $@ $<
127
128 settings.o : $(LIBSTRONGSWANDIR)/settings.c $(LIBSTRONGSWANDIR)/settings.h
129                 $(COMPILE) -c -o $@ $<
130
131 utils.o : $(LIBSTRONGSWANDIR)/utils.c $(LIBSTRONGSWANDIR)/utils.h
132                 $(COMPILE) -c -o $@ $<
133
134 chunk.o : $(LIBSTRONGSWANDIR)/chunk.c $(LIBSTRONGSWANDIR)/chunk.h
135                 $(COMPILE) -c -o $@ $<
136
137 # This compile option activates the sending of a strongSwan VID
138 if USE_VENDORID
139   AM_CFLAGS += -DVENDORID
140 endif
141
142 # This compile option activates the sending of the XAUTH VID
143 if USE_XAUTH_VID
144   AM_CFLAGS += -DXAUTH_VID
145 endif
146
147 # This compile option activates the support of the Cisco VPN client
148 if USE_CISCO_QUIRKS
149   AM_CFLAGS += -DCISCO_QUIRKS
150 endif
151
152 # This compile option activates NAT traversal with IPSec transport mode
153 if USE_NAT_TRANSPORT
154   AM_CFLAGS += -DI_KNOW_TRANSPORT_MODE_HAS_SECURITY_CONCERN_BUT_I_WANT_IT
155 endif
156
157 # This compile option activates dynamic URL fetching using libcurl
158 if USE_CURL
159   pluto_LDADD += -lcurl
160   AM_CFLAGS += -DLIBCURL
161 endif
162
163 # This compile option activates dynamic LDAP CRL fetching
164 if USE_LDAP
165   pluto_LDADD += -lldap -llber
166   AM_CFLAGS += -DLIBLDAP
167 endif
168
169 # This compile option activates smartcard support
170 if USE_SMARTCARD
171   AM_CFLAGS += -DSMARTCARD
172 endif
173
174 if USE_CAPABILITIES
175   pluto_LDADD += -lcap
176 endif
177
178 if USE_THREADS
179   AM_CFLAGS += -DTHREADS
180 endif