Build ipsec on Android.

Note: this does not fully work as [ (or even test) is not supported on
Android by default.
This commit is contained in:
Tobias Brunner 2011-10-11 16:29:30 +02:00
parent 59ae6fd6f2
commit e9f23d6264
2 changed files with 32 additions and 0 deletions

View File

@ -86,4 +86,5 @@ include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
libfreeswan \
stroke \
starter \
ipsec \
))

31
src/ipsec/Android.mk Normal file
View File

@ -0,0 +1,31 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# build ipsec ------------------------------------------------------------------
LOCAL_MODULE := ipsec
LOCAL_MODULE_CLASS := EXECUTABLES
GEN := $(local-intermediates-dir)/ipsec
$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
$(GEN) : PRIVATE_CUSTOM_TOOL = sed \
-e "s:@IPSEC_SHELL@:/system/bin/sh:" \
-e "s:@IPSEC_VERSION@:$(strongswan_VERSION):" \
-e "s:@IPSEC_NAME@:strongSwan:" \
-e "s:@IPSEC_DISTRO@::" \
-e "s:@IPSEC_DIR@:$(strongswan_DIR):" \
-e "s:@IPSEC_SBINDIR@:$(strongswan_SBINDIR):" \
-e "s:@IPSEC_CONFDIR@:$(strongswan_CONFDIR):" \
-e "s:@IPSEC_PIDDIR@:$(strongswan_PIDDIR):" \
$< > $@ && chmod +x $@
$(GEN) : $(strongswan_PATH)/Android.mk
$(GEN) : $(LOCAL_PATH)/ipsec.in
$(transform-generated-source)
LOCAL_GENERATED_SOURCES := $(GEN)
include $(BUILD_SYSTEM)/base_rules.mk