summaryrefslogtreecommitdiff
path: root/Android.mk.in
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
committerYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
commitb34738ed08c2227300d554b139e2495ca5da97d6 (patch)
tree62f33b52820f2e49f0e53c0f8c636312037c8054 /Android.mk.in
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz
vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip
Imported Upstream version 4.6.4
Diffstat (limited to 'Android.mk.in')
-rw-r--r--Android.mk.in83
1 files changed, 70 insertions, 13 deletions
diff --git a/Android.mk.in b/Android.mk.in
index d1bec5a29..e1f061350 100644
--- a/Android.mk.in
+++ b/Android.mk.in
@@ -1,11 +1,39 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+# the executables that should be installed on the final system have to be added
+# to PRODUCT_PACKAGES in
+# build/target/product/core.mk
+# possible executables are
+# starter - allows to control and configure the daemons from the command line
+# charon - the IKEv2 daemon
+# pluto - the IKEv1 daemon
+
+# if you enable starter and/or pluto (see above) uncomment the proper lines here
+# strongswan_BUILD_STARTER := true
+# strongswan_BUILD_PLUTO := true
+
# this is the list of plugins that are built into libstrongswan and charon
# also these plugins are loaded by default (if not changed in strongswan.conf)
-strongswan_PLUGINS := openssl fips-prf random pubkey pkcs1 \
+strongswan_CHARON_PLUGINS := openssl fips-prf random pubkey pkcs1 \
pem xcbc hmac kernel-netlink socket-default android \
- eap-identity eap-mschapv2 eap-md5
+ stroke eap-identity eap-mschapv2 eap-md5
+
+ifneq ($(strongswan_BUILD_PLUTO),)
+# if both daemons are enabled we use raw sockets in charon
+strongswan_CHARON_PLUGINS := $(subst socket-default,socket-raw, \
+ $(strongswan_CHARON_PLUGINS))
+# plugins loaded by pluto
+strongswan_PLUTO_PLUGINS := openssl fips-prf random pubkey pkcs1 \
+ pem xcbc hmac kernel-netlink xauth
+endif
+
+strongswan_STARTER_PLUGINS := kernel-netlink
+
+# list of all plugins - used to enable them with the function below
+strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
+ $(strongswan_PLUTO_PLUGINS) \
+ $(strongswan_STARTER_PLUGINS))
# helper macros to only add source files for plugins included in the list above
# source files are relative to the android.mk that called the macro
@@ -25,6 +53,15 @@ strongswan_PATH := $(LOCAL_PATH)
libvstr_PATH := external/strongswan-support/vstr/include
libgmp_PATH := external/strongswan-support/gmp
+# some definitions
+strongswan_VERSION := "@PACKAGE_VERSION@"
+strongswan_DIR := "/system/bin"
+strongswan_SBINDIR := "/system/bin"
+strongswan_PIDDIR := "/data/misc/vpn"
+strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
+strongswan_CONFDIR := "/system/etc"
+strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
+
# CFLAGS (partially from a configure run using droid-gcc)
strongswan_CFLAGS := \
-Wno-format \
@@ -51,14 +88,15 @@ strongswan_CFLAGS := \
-DCAPABILITIES_NATIVE \
-DMONOLITHIC \
-DUSE_VSTR \
+ -DDEBUG \
-DROUTING_TABLE=0 \
-DROUTING_TABLE_PRIO=220 \
- -DVERSION=\"@PACKAGE_VERSION@\" \
- -DPLUGINS='"$(strongswan_PLUGINS)"' \
- -DPLUGINDIR=\"/system/bin/ipsec\" \
- -DIPSEC_DIR=\"/system/bin\" \
- -DIPSEC_PIDDIR=\"/data/misc/vpn\" \
- -DSTRONGSWAN_CONF=\"/system/etc/strongswan.conf\" \
+ -DVERSION=\"$(strongswan_VERSION)\" \
+ -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
+ -DIPSEC_DIR=\"$(strongswan_DIR)\" \
+ -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
+ -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \
+ -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \
-DDEV_RANDOM=\"/dev/random\" \
-DDEV_URANDOM=\"/dev/urandom\"
@@ -66,9 +104,28 @@ strongswan_CFLAGS := \
strongswan_CFLAGS += \
-DHAVE_IN6ADDR_ANY
+strongswan_BUILD := \
+ charon \
+ libcharon \
+ libhydra \
+ libstrongswan \
+ libtncif \
+ libtnccs
+
+ifneq ($(strongswan_BUILD_STARTER),)
+strongswan_BUILD += \
+ libfreeswan \
+ starter \
+ stroke \
+ ipsec
+endif
+
+ifneq ($(strongswan_BUILD_PLUTO),)
+strongswan_BUILD += \
+ libfreeswan \
+ pluto \
+ whack
+endif
+
include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
- charon \
- libcharon \
- libhydra \
- libstrongswan \
- ))
+ $(sort $(strongswan_BUILD))))