Build ipsec on Android.
[strongswan.git] / src / ipsec / Android.mk
1 LOCAL_PATH := $(call my-dir)
2 include $(CLEAR_VARS)
3
4 # build ipsec ------------------------------------------------------------------
5
6 LOCAL_MODULE := ipsec
7
8 LOCAL_MODULE_CLASS := EXECUTABLES
9
10 GEN := $(local-intermediates-dir)/ipsec
11
12 $(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
13 $(GEN) : PRIVATE_CUSTOM_TOOL = sed \
14 -e "s:@IPSEC_SHELL@:/system/bin/sh:" \
15 -e "s:@IPSEC_VERSION@:$(strongswan_VERSION):" \
16 -e "s:@IPSEC_NAME@:strongSwan:" \
17 -e "s:@IPSEC_DISTRO@::" \
18 -e "s:@IPSEC_DIR@:$(strongswan_DIR):" \
19 -e "s:@IPSEC_SBINDIR@:$(strongswan_SBINDIR):" \
20 -e "s:@IPSEC_CONFDIR@:$(strongswan_CONFDIR):" \
21 -e "s:@IPSEC_PIDDIR@:$(strongswan_PIDDIR):" \
22 $< > $@ && chmod +x $@
23
24 $(GEN) : $(strongswan_PATH)/Android.mk
25 $(GEN) : $(LOCAL_PATH)/ipsec.in
26 $(transform-generated-source)
27
28 LOCAL_GENERATED_SOURCES := $(GEN)
29
30 include $(BUILD_SYSTEM)/base_rules.mk
31