336bbdfea2246d9cc9ec1c0f68d643c7ac73c882
[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 packet.c packet.h \
46 pem.c pem.h \
47 pgp.c pgp.h \
48 pkcs1.c pkcs1.h \
49 pkcs7.c pkcs7.h \
50 plutomain.c \
51 primegen.c smallprime.c \
52 rcv_whack.c rcv_whack.h \
53 rnd.c rnd.h \
54 server.c server.h \
55 sha1.c sha1.h \
56 smartcard.c smartcard.h \
57 spdb.c spdb.h \
58 state.c state.h \
59 timer.c timer.h \
60 vendor.c vendor.h \
61 virtual.c virtual.h \
62 xauth.c xauth.h \
63 x509.c x509.h \
64 alg/ike_alg_aes.c alg/ike_alg_blowfish.c alg/ike_alg_twofish.c \
65 alg/ike_alg_serpent.c alg/ike_alg_sha2.c alg/ike_alginit.c \
66 rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
67
68 _pluto_adns_SOURCES = adns.c adns.h
69
70 LIBSTRONGSWANDIR=$(top_srcdir)/src/libstrongswan
71 LIBFREESWANDIR=$(top_srcdir)/src/libfreeswan
72 LIBCRYPTODIR=$(top_srcdir)/src/libcrypto
73
74
75 INCLUDES = \
76 -I${linuxdir} \
77 -I$(LIBSTRONGSWANDIR)\
78 -I$(top_srcdir)/src/libfreeswan \
79 -I$(top_srcdir)/src/libcrypto \
80 -I$(top_srcdir)/src/whack
81
82 AM_CFLAGS = \
83 -DIPSEC_DIR=\"${ipsecdir}\" \
84 -DIPSEC_CONFDIR=\"${confdir}\" \
85 -DIPSEC_PIDDIR=\"${piddir}\" \
86 -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" \
87 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
88 -DPLUTO -DKLIPS -DDEBUG -DTHREADS
89
90 pluto_LDADD = \
91 oid.o \
92 $(LIBFREESWANDIR)/libfreeswan.a \
93 $(LIBCRYPTODIR)/libcrypto.a \
94 -lgmp -lresolv -lpthread -ldl
95
96 _pluto_adns_LDADD = \
97 $(LIBFREESWANDIR)/libfreeswan.a \
98 -lresolv -ldl
99
100 dist_man_MANS = pluto.8 ipsec.secrets.5
101
102 oid.o : $(LIBSTRONGSWANDIR)/asn1/oid.c $(LIBSTRONGSWANDIR)/asn1/oid.h
103                 $(COMPILE) -c -o $@ $<
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 $(DESTDIR)$(confdir)/ipsec.d
132         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/cacerts
133         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/ocspcerts
134         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/certs
135         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/acerts
136         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/aacerts
137         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/crls
138         mkdir -p -m 755 $(DESTDIR)$(confdir)/ipsec.d/reqs
139         mkdir -p -m 700 $(DESTDIR)$(confdir)/ipsec.d/private
140         chown -R $(ipsecuid):$(ipsecgid) $(DESTDIR)$(confdir)/ipsec.d
141