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