1 LOCAL_PATH
:= $(call my-dir
)
4 # this is the list of plugins that are built into libstrongswan and charon
5 # also these plugins are loaded by default (if not changed in strongswan.conf)
6 strongswan_PLUGINS
:= openssl fips-prf random pubkey pkcs1 \
7 pem xcbc hmac kernel-netlink socket-default android \
8 eap-identity eap-mschapv2 eap-md5
10 # helper macros to only add source files for plugins included in the list above
11 # source files are relative to the android.mk that called the macro
12 plugin_enabled
= $(findstring $(1), $(strongswan_PLUGINS
))
13 add_plugin
= $(if
$(call plugin_enabled
,$(1)), \
14 $(patsubst $(LOCAL_PATH
)/%,%, \
16 $(subst %,$(subst -,_
,$(strip $(1))), \
17 $(LOCAL_PATH
)/plugins
/%/%*.c \
24 strongswan_PATH
:= $(LOCAL_PATH
)
25 libvstr_PATH
:= external
/strongswan-support
/vstr
/include
26 libgmp_PATH
:= external
/strongswan-support
/gmp
28 # CFLAGS (partially from a configure run using droid-gcc)
29 strongswan_CFLAGS
:= \
34 -Wno-strict-aliasing \
39 -DHAVE_CLOCK_GETTIME \
40 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
43 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
44 -DHAVE_IPSEC_MODE_BEET \
45 -DHAVE_IPSEC_DIR_FWD \
51 -DCAPABILITIES_NATIVE \
55 -DROUTING_TABLE_PRIO
=220 \
56 -DVERSION
=\"@PACKAGE_VERSION@
\" \
57 -DPLUGINS
='"$(strongswan_PLUGINS)"' \
58 -DIPSEC_DIR
=\"/system
/bin
\" \
59 -DIPSEC_PIDDIR
=\"/data
/misc
/vpn
\" \
60 -DSTRONGSWAN_CONF
=\"/system
/etc
/strongswan.conf
\" \
61 -DDEV_RANDOM
=\"/dev
/random
\" \
62 -DDEV_URANDOM
=\"/dev
/urandom
\"
64 # only for Android 2.0+
65 strongswan_CFLAGS
+= \
68 include $(addprefix $(LOCAL_PATH
)/src
/,$(addsuffix /Android.mk
, \