summaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-05-25 19:01:36 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-05-25 19:01:36 +0000
commit1ac70afcc1f7d6d2738a34308810719b0976d29f (patch)
tree805f6ce2a15d1a717781d7cbceac8408a74b6b0c /Android.mk
parented7d79f96177044949744da10f4431c1d6242241 (diff)
downloadvyos-strongswan-1ac70afcc1f7d6d2738a34308810719b0976d29f.tar.gz
vyos-strongswan-1ac70afcc1f7d6d2738a34308810719b0976d29f.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.4.0)
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk64
1 files changed, 64 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 000000000..0cda18302
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,64 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# 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 x509 pubkey pkcs1 \
+ pem xcbc hmac kernel-netlink socket-default android
+
+# 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
+plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS))
+add_plugin = $(if $(call plugin_enabled,$(1)), \
+ $(patsubst $(LOCAL_PATH)/%,%, \
+ $(wildcard \
+ $(LOCAL_PATH)/plugins/$(subst -,_,$(strip $(1)))/*.c \
+ ) \
+ ) \
+ )
+
+# includes
+strongswan_PATH := $(LOCAL_PATH)
+libvstr_PATH := external/strongswan-support/vstr/include
+libgmp_PATH := external/strongswan-support/gmp
+
+# CFLAGS (partially from a configure run using droid-gcc)
+strongswan_CFLAGS := \
+ -Wno-format \
+ -Wno-pointer-sign \
+ -Wno-pointer-arith \
+ -Wno-sign-compare \
+ -Wno-strict-aliasing \
+ -DHAVE___BOOL \
+ -DHAVE_STDBOOL_H \
+ -DHAVE_ALLOCA_H \
+ -DHAVE_ALLOCA \
+ -DHAVE_CLOCK_GETTIME \
+ -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
+ -DHAVE_PRCTL \
+ -DHAVE_LINUX_UDP_H \
+ -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
+ -DHAVE_IPSEC_MODE_BEET \
+ -DHAVE_IPSEC_DIR_FWD \
+ -DMONOLITHIC \
+ -DUSE_VSTR \
+ -DROUTING_TABLE=0 \
+ -DROUTING_TABLE_PRIO=220 \
+ -DVERSION=\"4.4.0\" \
+ -DPLUGINS='"$(strongswan_PLUGINS)"' \
+ -DIPSEC_DIR=\"/system/bin\" \
+ -DIPSEC_PIDDIR=\"/data/misc/vpn\" \
+ -DSTRONGSWAN_CONF=\"/system/etc/strongswan.conf\" \
+ -DDEV_RANDOM=\"/dev/random\" \
+ -DDEV_URANDOM=\"/dev/urandom\"
+
+# only for Android 2.0+
+strongswan_CFLAGS += \
+ -DHAVE_IN6ADDR_ANY
+
+include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
+ charon \
+ libcharon \
+ libhydra \
+ libstrongswan \
+ ))