c9dc7d7b00904faa2cdeae71743f39ee9a414a9c
[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 linux26/rtnetlink.h \
9 linux26/xfrm.h \
10 linux26/netlink.h \
11 rsaref/pkcs11t.h \
12 rsaref/pkcs11.h \
13 rsaref/unix.h \
14 rsaref/pkcs11f.h \
15 alg/ike_alg_twofish.c \
16 alg/ike_alg_aes.c \
17 alg/ike_alg_blowfish.c \
18 alg/ike_alg_sha2.c \
19 alg/ike_alg_serpent.c \
20 alg/ike_alginit.c \
21 kernel_alg.c \
22 kernel_alg.h \
23 kernel_pfkey.h \
24 kernel_pfkey.c \
25 gcryptfix.c \
26 gcryptfix.h \
27 primegen.c \
28 smallprime.c \
29 ocsp.c \
30 ocsp.h \
31 pgp.c \
32 ac.c \
33 certs.c \
34 connections.c \
35 certs.h \
36 virtual.c \
37 connections.h \
38 fetch.c \
39 virtual.h \
40 fetch.h \
41 ipsec_doi.c \
42 ipsec_doi.h \
43 x509.c \
44 kameipsec.h \
45 cookie.c \
46 x509.h \
47 cookie.h \
48 pgp.h \
49 ac.h \
50 sha1.c \
51 sha1.h \
52 constants.c \
53 smartcard.c \
54 kernel.c \
55 constants.h \
56 smartcard.h \
57 kernel.h \
58 dnskey.c \
59 asn1.c \
60 dnskey.h \
61 elgamal.c \
62 db_ops.c \
63 asn1.h \
64 elgamal.h \
65 oid.c \
66 db_ops.h \
67 mp_defs.c \
68 state.c \
69 oid.h \
70 mp_defs.h \
71 ca.c \
72 state.h \
73 pkcs7.c \
74 lex.c \
75 ca.h \
76 pkcs7.h \
77 id.c \
78 lex.h \
79 id.h \
80 keys.c \
81 ike_alg.c \
82 keys.h \
83 md5.c \
84 md5.h \
85 kernel_noklips.c \
86 ike_alg.h \
87 rcv_whack.c \
88 rcv_whack.h \
89 alg_info.c \
90 alg_info.h \
91 pem.c \
92 kernel_noklips.h \
93 foodgroups.c \
94 pem.h \
95 kernel_netlink.c \
96 foodgroups.h \
97 vendor.c \
98 vendor.h \
99 packet.c \
100 packet.h \
101 crl.c \
102 md2.c \
103 rnd.c \
104 crl.h \
105 md2.h \
106 spdb.c \
107 rnd.h \
108 spdb.h \
109 modecfg.c \
110 timer.h \
111 nat_traversal.c \
112 server.c \
113 dsa.c \
114 plutomain.c \
115 modecfg.h \
116 kernel_netlink.h \
117 nat_traversal.h \
118 server.h \
119 dsa.h \
120 timer.c \
121 crypto.c \
122 pkcs1.c \
123 log.c \
124 defs.c \
125 demux.c \
126 crypto.h \
127 pkcs1.h \
128 log.h \
129 defs.h \
130 demux.h
131
132 _pluto_adns_SOURCES = adns.c adns.h
133
134 INCLUDES = -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/libcrypto -I$(top_srcdir)/src/whack
135 AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_PIDDIR=\"${piddir}\" \
136 -DDEBUG -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES -DNAT_TRAVERSAL -DVIRTUAL_IP -DPLUTO \
137 -DVENDORID -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" -DTHREADS -DKLIPS
138 pluto_LDADD = $(top_srcdir)/src/libfreeswan/libfreeswan.a $(top_srcdir)/src/libcrypto/libcrypto.a -lgmp -lresolv -lpthread
139 _pluto_adns_LDADD = -lresolv $(top_srcdir)/src/libfreeswan/libfreeswan.a
140 dist_man_MANS = pluto.8 ipsec.secrets.5
141 EXTRA_DIST = oid.pl oid.txt
142
143 # TODO: get perl from ./configure
144 PERL=perl
145
146 oid.c: oid.txt oid.pl
147         $PERL oid.pl
148
149 oid.h: oid.txt oid.pl
150         $PERL oid.pl
151
152 # This compile option activates dynamic URL fetching using libcurl
153 if USE_LIBCURL
154   pluto_LDADD += -lcurl
155 endif
156
157 # This compile option activates dynamic LDAP CRL fetching
158 if USE_LDAP
159   pluto_LDADD += -lldap -llber
160 endif
161
162 # This compile option activates smartcard support
163 if USE_SMARTCARD
164   AM_CFLAGS += -DSMARTCARD
165   pluto_LDADD += -ldl
166 endif
167
168 install-exec-local :
169         mkdir -p -m 755 $(confdir)/ipsec.d
170         mkdir -p -m 755 $(confdir)/ipsec.d/cacerts
171         mkdir -p -m 755 $(confdir)/ipsec.d/ocspcerts
172         mkdir -p -m 755 $(confdir)/ipsec.d/certs
173         mkdir -p -m 755 $(confdir)/ipsec.d/acerts
174         mkdir -p -m 755 $(confdir)/ipsec.d/aacerts
175         mkdir -p -m 755 $(confdir)/ipsec.d/crls
176         mkdir -p -m 755 $(confdir)/ipsec.d/reqs
177         mkdir -p -m 700 $(confdir)/ipsec.d/private
178