1d0bca8f04646d830c90ec281ef6ed0d15c4f211
[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 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 oid.c oid.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 linux26/netlink.h linux26/rtnetlink.h linux26/xfrm.h \
68 rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
69
70 _pluto_adns_SOURCES = adns.c adns.h
71
72 INCLUDES = \
73 -I${linuxdir} \
74 -I$(top_srcdir)/src/libfreeswan \
75 -I$(top_srcdir)/src/libcrypto \
76 -I$(top_srcdir)/src/whack
77
78 AM_CFLAGS = \
79 -DIPSEC_DIR=\"${ipsecdir}\" \
80 -DIPSEC_CONFDIR=\"${confdir}\" \
81 -DIPSEC_PIDDIR=\"${piddir}\" \
82 -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" \
83 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
84 -DPLUTO -DKLIPS -DDEBUG -DTHREADS
85
86 pluto_LDADD = \
87 $(top_srcdir)/src/libfreeswan/libfreeswan.a \
88 $(top_srcdir)/src/libcrypto/libcrypto.a \
89 -lgmp -lresolv -lpthread -ldl
90
91 _pluto_adns_LDADD = \
92 $(top_srcdir)/src/libfreeswan/libfreeswan.a \
93 -lresolv -ldl
94
95 dist_man_MANS = pluto.8 ipsec.secrets.5
96 EXTRA_DIST = oid.pl oid.txt
97 BUILT_SOURCES = oid.c oid.h
98 MAINTAINERCLEANFILES = oid.c oid.h
99
100 oid.c:  oid.txt oid.pl
101         $(PERL) oid.pl
102
103 oid.h:  oid.txt oid.pl
104         $(PERL) oid.pl
105
106 # This compile option activates the sending of a strongSwan VID
107 if USE_VENDORID
108   AM_CFLAGS += -DVENDORID
109 endif
110
111 # This compile option activates the support of the Cisco VPN client
112 if USE_CISCO_QUIRKS
113   AM_CFLAGS += -DCISCO_QUIRKS
114 endif
115
116 # This compile option activates NAT traversal with IPSec transport mode
117 if USE_NAT_TRANSPORT
118   AM_CFLAGS += -DI_KNOW_TRANSPORT_MODE_HAS_SECURITY_CONCERN_BUT_I_WANT_IT
119 endif
120
121 # This compile option activates dynamic URL fetching using libcurl
122 if USE_LIBCURL
123   pluto_LDADD += -lcurl
124 endif
125
126 # This compile option activates dynamic LDAP CRL fetching
127 if USE_LIBLDAP
128   pluto_LDADD += -lldap -llber
129 endif
130
131 install-exec-local :
132         mkdir -p -m 755 $(confdir)/ipsec.d
133         mkdir -p -m 755 $(confdir)/ipsec.d/cacerts
134         mkdir -p -m 755 $(confdir)/ipsec.d/ocspcerts
135         mkdir -p -m 755 $(confdir)/ipsec.d/certs
136         mkdir -p -m 755 $(confdir)/ipsec.d/acerts
137         mkdir -p -m 755 $(confdir)/ipsec.d/aacerts
138         mkdir -p -m 755 $(confdir)/ipsec.d/crls
139         mkdir -p -m 755 $(confdir)/ipsec.d/reqs
140         mkdir -p -m 700 $(confdir)/ipsec.d/private
141