android: Fix Android.mk for ipsec script
[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_TAGS := optional
9
10 LOCAL_MODULE_CLASS := EXECUTABLES
11
12 GEN := $(local-intermediates-dir)/ipsec
13
14 $(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
15 $(GEN) : PRIVATE_CUSTOM_TOOL = sed \
16 -e "s:@IPSEC_SHELL@:/system/bin/sh:" \
17 -e "s:@IPSEC_VERSION@:$(strongswan_VERSION):" \
18 -e "s:@IPSEC_NAME@:strongSwan:" \
19 -e "s:@IPSEC_DISTRO@::" \
20 -e "s:@IPSEC_DIR@:$(strongswan_DIR):" \
21 -e "s:@IPSEC_SCRIPT@:ipsec:" \
22 -e "s:@IPSEC_SBINDIR@:$(strongswan_SBINDIR):" \
23 -e "s:@IPSEC_CONFDIR@:$(strongswan_CONFDIR):" \
24 -e "s:@IPSEC_PIDDIR@:$(strongswan_PIDDIR):" \
25 $< > $@ && chmod +x $@
26
27 $(GEN) : $(strongswan_PATH)/Android.mk
28 $(GEN) : $(LOCAL_PATH)/_ipsec.in
29 $(transform-generated-source)
30
31 LOCAL_GENERATED_SOURCES := $(GEN)
32
33 include $(BUILD_SYSTEM)/base_rules.mk
34