2e46de924dfee5dcec88bd1cd4828b62c4e6c234
[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 log.c log.h \
38 md2.c md2.h \
39 md5.c md5.h \
40 modecfg.c modecfg.h \
41 mp_defs.c mp_defs.h \
42 nat_traversal.c nat_traversal.h \
43 ocsp.c ocsp.h \
44 packet.c packet.h \
45 pem.c pem.h \
46 pgp.c pgp.h \
47 pkcs1.c pkcs1.h \
48 pkcs7.c pkcs7.h \
49 plutomain.c \
50 primegen.c smallprime.c \
51 rcv_whack.c rcv_whack.h \
52 rnd.c rnd.h \
53 server.c server.h \
54 sha1.c sha1.h \
55 smartcard.c smartcard.h \
56 spdb.c spdb.h \
57 state.c state.h \
58 timer.c timer.h \
59 vendor.c vendor.h \
60 virtual.c virtual.h \
61 xauth.c xauth.h \
62 x509.c x509.h \
63 alg/ike_alg_aes.c alg/ike_alg_blowfish.c alg/ike_alg_twofish.c \
64 alg/ike_alg_serpent.c alg/ike_alg_sha2.c alg/ike_alginit.c \
65 rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
66
67 _pluto_adns_SOURCES = adns.c adns.h
68
69 LIBSTRONGSWANDIR=$(top_builddir)/src/libstrongswan
70 LIBFREESWANDIR=$(top_builddir)/src/libfreeswan
71 LIBCRYPTODIR=$(top_builddir)/src/libcrypto
72
73
74 INCLUDES = \
75 -I${linuxdir} \
76 -I$(top_srcdir)/src/libstrongswan \
77 -I$(top_srcdir)/src/libfreeswan \
78 -I$(top_srcdir)/src/libcrypto \
79 -I$(top_srcdir)/src/whack
80
81 AM_CFLAGS = \
82 -DIPSEC_DIR=\"${ipsecdir}\" \
83 -DIPSEC_CONFDIR=\"${confdir}\" \
84 -DIPSEC_PIDDIR=\"${piddir}\" \
85 -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" \
86 -DIPSEC_PLUGINDIR=\"${plugindir}\" \
87 -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
88 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
89 -DPLUTO -DKLIPS -DDEBUG
90
91 pluto_LDADD = \
92 $(LIBSTRONGSWANDIR)/libstrongswan.la \
93 $(LIBFREESWANDIR)/libfreeswan.a \
94 $(LIBCRYPTODIR)/libcrypto.a \
95 -lgmp -lresolv -lpthread -ldl
96
97 _pluto_adns_LDADD = \
98 $(LIBFREESWANDIR)/libfreeswan.a \
99 -lresolv -ldl
100
101 dist_man_MANS = pluto.8 ipsec.secrets.5
102
103 # This compile option activates the memory leak detective
104 if USE_LEAK_DETECTIVE
105   AM_CFLAGS += -DLEAK_DETECTIVE
106 endif
107
108 # This compile option activates the sending of a strongSwan VID
109 if USE_VENDORID
110   AM_CFLAGS += -DVENDORID
111 endif
112
113 # This compile option activates the sending of the XAUTH VID
114 if USE_XAUTH_VID
115   AM_CFLAGS += -DXAUTH_VID
116 endif
117
118 # This compile option activates the support of the Cisco VPN client
119 if USE_CISCO_QUIRKS
120   AM_CFLAGS += -DCISCO_QUIRKS
121 endif
122
123 # This compile option activates NAT traversal with IPSec transport mode
124 if USE_NAT_TRANSPORT
125   AM_CFLAGS += -DI_KNOW_TRANSPORT_MODE_HAS_SECURITY_CONCERN_BUT_I_WANT_IT
126 endif
127
128 # This compile option activates dynamic URL fetching using libcurl
129 if USE_CURL
130   pluto_LDADD += -lcurl
131   AM_CFLAGS += -DLIBCURL
132 endif
133
134 # This compile option activates dynamic LDAP CRL fetching
135 if USE_LDAP
136   pluto_LDADD += -lldap -llber
137   AM_CFLAGS += -DLIBLDAP
138 endif
139
140 # This compile option activates smartcard support
141 if USE_SMARTCARD
142   AM_CFLAGS += -DSMARTCARD
143 endif
144
145 if USE_CAPABILITIES
146   pluto_LDADD += -lcap
147 endif
148
149 if USE_THREADS
150   AM_CFLAGS += -DTHREADS
151 endif