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 daemon from the command line
9 # charon - the IKE daemon
10 # scepclient - SCEP client
12 # if you enable starter or scepclient (see above) uncomment the proper
14 # strongswan_BUILD_STARTER := true
15 # strongswan_BUILD_SCEPCLIENT := true
17 # this is the list of plugins that are built into libstrongswan and charon
18 # also these plugins are loaded by default (if not changed in strongswan.conf)
19 strongswan_CHARON_PLUGINS
:= android-log openssl fips-prf random nonce pubkey \
20 pkcs1 pem xcbc hmac kernel-netlink socket-default android \
21 stroke eap-identity eap-mschapv2 eap-md5
23 ifneq ($(strongswan_BUILD_SCEPCLIENT
),)
24 # plugins loaded by scepclient
25 strongswan_SCEPCLIENT_PLUGINS
:= openssl curl fips-prf random pkcs1 pem
28 strongswan_STARTER_PLUGINS
:= kernel-netlink
30 # list of all plugins - used to enable them with the function below
31 strongswan_PLUGINS
:= $(sort $(strongswan_CHARON_PLUGINS
) \
32 $(strongswan_STARTER_PLUGINS
) \
33 $(strongswan_SCEPCLIENT_PLUGINS
))
35 # helper macros to only add source files for plugins included in the list above
36 # source files are relative to the android.mk that called the macro
37 plugin_enabled
= $(filter $(1), $(strongswan_PLUGINS
))
38 add_plugin
= $(if
$(call plugin_enabled
,$(1)), \
39 $(patsubst $(LOCAL_PATH
)/%,%, \
41 $(subst %,$(subst -,_
,$(strip $(1))), \
42 $(LOCAL_PATH
)/plugins
/%/%*.c \
49 strongswan_PATH
:= $(LOCAL_PATH
)
50 libvstr_PATH
:= external
/strongswan-support
/vstr
/include
51 libcurl_PATH
:= external
/strongswan-support
/libcurl
/include
52 libgmp_PATH
:= external
/strongswan-support
/gmp
53 openssl_PATH
:= external
/openssl
/include
56 strongswan_VERSION
:= "@PACKAGE_VERSION@"
57 strongswan_DIR
:= "/system/bin"
58 strongswan_SBINDIR
:= "/system/bin"
59 strongswan_PIDDIR
:= "/data/misc/vpn"
60 strongswan_PLUGINDIR
:= "$(strongswan_IPSEC_DIR)/ipsec"
61 strongswan_CONFDIR
:= "/system/etc"
62 strongswan_STRONGSWAN_CONF
:= "$(strongswan_CONFDIR)/strongswan.conf"
64 # CFLAGS (partially from a configure run using droid-gcc)
65 strongswan_CFLAGS
:= \
70 -Wno-strict-aliasing \
75 -DHAVE_CLOCK_GETTIME \
76 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
79 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
80 -DHAVE_IPSEC_MODE_BEET \
81 -DHAVE_IPSEC_DIR_FWD \
88 -DCAPABILITIES_NATIVE \
95 -DROUTING_TABLE_PRIO
=220 \
96 -DVERSION
=\"$(strongswan_VERSION
)\" \
97 -DPLUGINDIR
=\"$(strongswan_PLUGINDIR
)\" \
98 -DIPSEC_DIR
=\"$(strongswan_DIR
)\" \
99 -DIPSEC_PIDDIR
=\"$(strongswan_PIDDIR
)\" \
100 -DIPSEC_CONFDIR
=\"$(strongswan_CONFDIR
)\" \
101 -DSTRONGSWAN_CONF
=\"$(strongswan_STRONGSWAN_CONF
)\" \
102 -DDEV_RANDOM
=\"/dev
/random
\" \
103 -DDEV_URANDOM
=\"/dev
/urandom
\"
105 # only for Android 2.0+
106 strongswan_CFLAGS
+= \
109 strongswan_BUILD
:= \
117 ifneq ($(strongswan_BUILD_STARTER
),)
118 strongswan_BUILD
+= \
124 ifneq ($(strongswan_BUILD_SCEPCLIENT
),)
125 strongswan_BUILD
+= \
129 include $(addprefix $(LOCAL_PATH
)/src
/,$(addsuffix /Android.mk
, \
130 $(sort $(strongswan_BUILD
))))