9f631ca28be8a956f6354b5820edc78f42cee83d
[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 fetch.c fetch.h \
22 foodgroups.c foodgroups.h \
23 ike_alg.c ike_alg.h \
24 ipsec_doi.c ipsec_doi.h \
25 kameipsec.h \
26 kernel.c kernel.h \
27 kernel_alg.c kernel_alg.h \
28 kernel_netlink.c kernel_netlink.h \
29 kernel_noklips.c kernel_noklips.h \
30 kernel_pfkey.c kernel_pfkey.h \
31 keys.c keys.h \
32 lex.c lex.h \
33 log.c log.h \
34 myid.c myid.h \
35 modecfg.c modecfg.h \
36 nat_traversal.c nat_traversal.h \
37 ocsp.c ocsp.h \
38 packet.c packet.h \
39 pkcs7.c pkcs7.h \
40 pluto.c pluto.h \
41 plutomain.c \
42 rcv_whack.c rcv_whack.h \
43 server.c server.h \
44 smartcard.c smartcard.h \
45 spdb.c spdb.h \
46 state.c state.h \
47 timer.c timer.h \
48 vendor.c vendor.h \
49 virtual.c virtual.h \
50 whack_attribute.c whack_attribute.h \
51 xauth/xauth_manager.c xauth/xauth_manager.h \
52 xauth/xauth_provider.h xauth/xauth_verifier.h \
53 x509.c x509.h \
54 builder.c builder.h \
55 rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
56
57 _pluto_adns_SOURCES = adns.c adns.h
58
59 plutomain.o :   $(top_builddir)/config.status
60
61 LIBSTRONGSWANDIR=$(top_builddir)/src/libstrongswan
62 LIBFREESWANDIR=$(top_builddir)/src/libfreeswan
63 LIBHYDRADIR=$(top_builddir)/src/libhydra
64
65 INCLUDES = \
66 -I${linux_headers} \
67 -I$(top_srcdir)/src/libstrongswan \
68 -I$(top_srcdir)/src/libfreeswan \
69 -I$(top_srcdir)/src/libhydra \
70 -I$(top_srcdir)/src/whack
71
72 AM_CFLAGS = -rdynamic \
73 -DIPSEC_DIR=\"${ipsecdir}\" \
74 -DIPSEC_CONFDIR=\"${sysconfdir}\" \
75 -DIPSEC_PIDDIR=\"${piddir}\" \
76 -DSHARED_SECRETS_FILE=\"${sysconfdir}/ipsec.secrets\" \
77 -DPLUGINS=\""${pluto_plugins} ${libhydra_plugins}\"" \
78 -DPKCS11_DEFAULT_LIB=\"${default_pkcs11}\" \
79 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
80 -DPLUTO -DKLIPS -DDEBUG
81
82 pluto_LDADD = \
83 $(LIBSTRONGSWANDIR)/libstrongswan.la \
84 $(LIBFREESWANDIR)/libfreeswan.a \
85 $(LIBHYDRADIR)/libhydra.la \
86 -lresolv $(PTHREADLIB) $(DLLIB)
87
88 _pluto_adns_LDADD = \
89 $(LIBFREESWANDIR)/libfreeswan.a \
90 -lresolv $(DLLIB)
91
92 CLEANFILES = ipsec.secrets.5
93 dist_man_MANS = pluto.8 ipsec.secrets.5
94 EXTRA_DIST = ipsec.secrets.5.in
95
96 # compile options
97 #################
98
99 # This compile option activates the sending of a strongSwan VID
100 if USE_VENDORID
101   AM_CFLAGS += -DVENDORID
102 endif
103
104 # This compile option activates the sending of the XAUTH VID
105 if USE_XAUTH_VID
106   AM_CFLAGS += -DXAUTH_VID
107 endif
108
109 # This compile option activates the support of the Cisco VPN client
110 if USE_CISCO_QUIRKS
111   AM_CFLAGS += -DCISCO_QUIRKS
112 endif
113
114 # This compile option activates NAT traversal with IPSec transport mode
115 if USE_NAT_TRANSPORT
116   AM_CFLAGS += -DI_KNOW_TRANSPORT_MODE_HAS_SECURITY_CONCERN_BUT_I_WANT_IT
117 endif
118
119 # This compile option activates smartcard support
120 if USE_SMARTCARD
121   AM_CFLAGS += -DSMARTCARD
122 endif
123
124 if USE_LIBCAP
125   pluto_LDADD += -lcap
126 endif
127
128 if USE_THREADS
129   AM_CFLAGS += -DTHREADS
130 endif
131
132 # build optional plugins
133 ########################
134
135 SUBDIRS = .
136
137 if USE_XAUTH
138   SUBDIRS += plugins/xauth
139 endif
140
141 ipsec.secrets.5 : ipsec.secrets.5.in
142         sed \
143         -e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \
144         $(srcdir)/$@.in > $@
145