1 LOCAL_PATH
:= $(call my-dir
)
4 # the executables that should be installed on the final system have to be added
5 # to PRODUCT_PACKAGES in
6 # build/target/product/core.mk
7 # possible executables are
8 # starter - allows to control and configure the daemons from the command line
9 # charon - the IKE daemon
11 # if you enable starter (see above) uncomment this line too
12 # strongswan_BUILD_STARTER := true
14 # this is the list of plugins that are built into libstrongswan and charon
15 # also these plugins are loaded by default (if not changed in strongswan.conf)
16 strongswan_CHARON_PLUGINS
:= openssl fips-prf random pubkey pkcs1 \
17 pem xcbc hmac kernel-netlink socket-default android \
18 stroke eap-identity eap-mschapv2 eap-md5
20 strongswan_STARTER_PLUGINS
:= kernel-netlink
22 # list of all plugins - used to enable them with the function below
23 strongswan_PLUGINS
:= $(sort $(strongswan_CHARON_PLUGINS
) \
24 $(strongswan_STARTER_PLUGINS
))
26 # helper macros to only add source files for plugins included in the list above
27 # source files are relative to the android.mk that called the macro
28 plugin_enabled
= $(findstring $(1), $(strongswan_PLUGINS
))
29 add_plugin
= $(if
$(call plugin_enabled
,$(1)), \
30 $(patsubst $(LOCAL_PATH
)/%,%, \
32 $(subst %,$(subst -,_
,$(strip $(1))), \
33 $(LOCAL_PATH
)/plugins
/%/%*.c \
40 strongswan_PATH
:= $(LOCAL_PATH
)
41 libvstr_PATH
:= external
/strongswan-support
/vstr
/include
42 libgmp_PATH
:= external
/strongswan-support
/gmp
45 strongswan_VERSION
:= "@PACKAGE_VERSION@"
46 strongswan_DIR
:= "/system/bin"
47 strongswan_SBINDIR
:= "/system/bin"
48 strongswan_PIDDIR
:= "/data/misc/vpn"
49 strongswan_PLUGINDIR
:= "$(strongswan_IPSEC_DIR)/ipsec"
50 strongswan_CONFDIR
:= "/system/etc"
51 strongswan_STRONGSWAN_CONF
:= "$(strongswan_CONFDIR)/strongswan.conf"
53 # CFLAGS (partially from a configure run using droid-gcc)
54 strongswan_CFLAGS
:= \
59 -Wno-strict-aliasing \
64 -DHAVE_CLOCK_GETTIME \
65 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
68 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
69 -DHAVE_IPSEC_MODE_BEET \
70 -DHAVE_IPSEC_DIR_FWD \
76 -DCAPABILITIES_NATIVE \
82 -DROUTING_TABLE_PRIO
=220 \
83 -DVERSION
=\"$(strongswan_VERSION
)\" \
84 -DPLUGINDIR
=\"$(strongswan_PLUGINDIR
)\" \
85 -DIPSEC_DIR
=\"$(strongswan_DIR
)\" \
86 -DIPSEC_PIDDIR
=\"$(strongswan_PIDDIR
)\" \
87 -DIPSEC_CONFDIR
=\"$(strongswan_CONFDIR
)\" \
88 -DSTRONGSWAN_CONF
=\"$(strongswan_STRONGSWAN_CONF
)\" \
89 -DDEV_RANDOM
=\"/dev
/random
\" \
90 -DDEV_URANDOM
=\"/dev
/urandom
\"
92 # only for Android 2.0+
93 strongswan_CFLAGS
+= \
104 ifneq ($(strongswan_BUILD_STARTER
),)
105 strongswan_BUILD
+= \
111 include $(addprefix $(LOCAL_PATH
)/src
/,$(addsuffix /Android.mk
, \
112 $(sort $(strongswan_BUILD
))))