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 x509 pubkey pkcs1 \
7 pem xcbc hmac kernel-netlink socket-default android
9 # helper macros to only add source files for plugins included in the list above
10 # source files are relative to the android.mk that called the macro
11 plugin_enabled
= $(findstring $(1), $(strongswan_PLUGINS
))
12 add_plugin
= $(if
$(call plugin_enabled
,$(1)), \
13 $(patsubst $(LOCAL_PATH
)/%,%, \
15 $(LOCAL_PATH
)/plugins
/$(subst -,_
,$(strip $(1)))/*.c \
21 strongswan_PATH
:= $(LOCAL_PATH
)
22 libvstr_PATH
:= external
/strongswan-support
/vstr
/include
23 libgmp_PATH
:= external
/strongswan-support
/gmp
25 # CFLAGS (partially from a configure run using droid-gcc)
26 strongswan_CFLAGS
:= \
31 -Wno-strict-aliasing \
36 -DHAVE_CLOCK_GETTIME \
37 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
40 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
41 -DHAVE_IPSEC_MODE_BEET \
42 -DHAVE_IPSEC_DIR_FWD \
46 -DROUTING_TABLE_PRIO
=220 \
47 -DVERSION
=\"@PACKAGE_VERSION@
\" \
48 -DPLUGINS
='"$(strongswan_PLUGINS)"' \
49 -DIPSEC_DIR
=\"/system
/bin
\" \
50 -DIPSEC_PIDDIR
=\"/data
/misc
/vpn
\" \
51 -DSTRONGSWAN_CONF
=\"/system
/etc
/strongswan.conf
\" \
52 -DDEV_RANDOM
=\"/dev
/random
\" \
53 -DDEV_URANDOM
=\"/dev
/urandom
\"
55 # only for Android 2.0+
56 strongswan_CFLAGS
+= \
59 include $(addprefix $(LOCAL_PATH
)/src
/,$(addsuffix /Android.mk
, \