-/Android.mk
+/Android.common.mk
Makefile
Makefile.in
aclocal.m4
--- /dev/null
+# some common definitions used by the main and the NDK-specific Android.mk
+# include this after strongswan_PLUGINS has been defined
+
+# 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 = $(filter $(1), $(strongswan_PLUGINS))
+add_plugin = $(if $(call plugin_enabled,$(1)), \
+ $(patsubst $(LOCAL_PATH)/%,%, \
+ $(wildcard \
+ $(subst %,$(subst -,_,$(strip $(1))), \
+ $(LOCAL_PATH)/plugins/%/%*.c \
+ ) \
+ ) \
+ ) \
+ )
+
+# strongSwan version, replaced by top Makefile
+strongswan_VERSION := "@PACKAGE_VERSION@"
+
--- /dev/null
+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 daemon from the command line
+# charon - the IKE daemon
+# scepclient - SCEP client
+
+# if you enable starter or scepclient (see above) uncomment the proper
+# lines here
+# strongswan_BUILD_STARTER := true
+# strongswan_BUILD_SCEPCLIENT := 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_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
+ pkcs1 pem xcbc hmac kernel-netlink socket-default android \
+ stroke eap-identity eap-mschapv2 eap-md5
+
+ifneq ($(strongswan_BUILD_SCEPCLIENT),)
+# plugins loaded by scepclient
+strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pem
+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_STARTER_PLUGINS) \
+ $(strongswan_SCEPCLIENT_PLUGINS))
+
+include $(LOCAL_PATH)/Android.common.mk
+
+# includes
+strongswan_PATH := $(LOCAL_PATH)
+libvstr_PATH := external/strongswan-support/vstr/include
+libcurl_PATH := external/strongswan-support/libcurl/include
+libgmp_PATH := external/strongswan-support/gmp
+openssl_PATH := external/openssl/include
+
+# some definitions
+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 \
+ -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 \
+ -DOPENSSL_NO_EC \
+ -DOPENSSL_NO_ECDSA \
+ -DOPENSSL_NO_ECDH \
+ -DOPENSSL_NO_ENGINE \
+ -DCONFIG_H_INCLUDED \
+ -DCAPABILITIES \
+ -DCAPABILITIES_NATIVE \
+ -DMONOLITHIC \
+ -DUSE_IKEV1 \
+ -DUSE_IKEV2 \
+ -DUSE_VSTR \
+ -DDEBUG \
+ -DROUTING_TABLE=0 \
+ -DROUTING_TABLE_PRIO=220 \
+ -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\"
+
+# only for Android 2.0+
+strongswan_CFLAGS += \
+ -DHAVE_IN6ADDR_ANY
+
+strongswan_BUILD := \
+ charon \
+ libcharon \
+ libhydra \
+ libstrongswan \
+ libtncif \
+ libtnccs
+
+ifneq ($(strongswan_BUILD_STARTER),)
+strongswan_BUILD += \
+ starter \
+ stroke \
+ ipsec
+endif
+
+ifneq ($(strongswan_BUILD_SCEPCLIENT),)
+strongswan_BUILD += \
+ scepclient
+endif
+
+include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
+ $(sort $(strongswan_BUILD))))
+++ /dev/null
-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 daemon from the command line
-# charon - the IKE daemon
-# scepclient - SCEP client
-
-# if you enable starter or scepclient (see above) uncomment the proper
-# lines here
-# strongswan_BUILD_STARTER := true
-# strongswan_BUILD_SCEPCLIENT := 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_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
- pkcs1 pem xcbc hmac kernel-netlink socket-default android \
- stroke eap-identity eap-mschapv2 eap-md5
-
-ifneq ($(strongswan_BUILD_SCEPCLIENT),)
-# plugins loaded by scepclient
-strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pem
-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_STARTER_PLUGINS) \
- $(strongswan_SCEPCLIENT_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
-plugin_enabled = $(filter $(1), $(strongswan_PLUGINS))
-add_plugin = $(if $(call plugin_enabled,$(1)), \
- $(patsubst $(LOCAL_PATH)/%,%, \
- $(wildcard \
- $(subst %,$(subst -,_,$(strip $(1))), \
- $(LOCAL_PATH)/plugins/%/%*.c \
- ) \
- ) \
- ) \
- )
-
-# includes
-strongswan_PATH := $(LOCAL_PATH)
-libvstr_PATH := external/strongswan-support/vstr/include
-libcurl_PATH := external/strongswan-support/libcurl/include
-libgmp_PATH := external/strongswan-support/gmp
-openssl_PATH := external/openssl/include
-
-# 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 \
- -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 \
- -DOPENSSL_NO_EC \
- -DOPENSSL_NO_ECDSA \
- -DOPENSSL_NO_ECDH \
- -DOPENSSL_NO_ENGINE \
- -DCONFIG_H_INCLUDED \
- -DCAPABILITIES \
- -DCAPABILITIES_NATIVE \
- -DMONOLITHIC \
- -DUSE_IKEV1 \
- -DUSE_IKEV2 \
- -DUSE_VSTR \
- -DDEBUG \
- -DROUTING_TABLE=0 \
- -DROUTING_TABLE_PRIO=220 \
- -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\"
-
-# only for Android 2.0+
-strongswan_CFLAGS += \
- -DHAVE_IN6ADDR_ANY
-
-strongswan_BUILD := \
- charon \
- libcharon \
- libhydra \
- libstrongswan \
- libtncif \
- libtnccs
-
-ifneq ($(strongswan_BUILD_STARTER),)
-strongswan_BUILD += \
- starter \
- stroke \
- ipsec
-endif
-
-ifneq ($(strongswan_BUILD_SCEPCLIENT),)
-strongswan_BUILD += \
- scepclient
-endif
-
-include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
- $(sort $(strongswan_BUILD))))
ACLOCAL_AMFLAGS = -I m4/config
-EXTRA_DIST = Doxyfile.in LICENSE Android.mk.in Android.mk
+EXTRA_DIST = Doxyfile.in LICENSE Android.common.mk.in Android.common.mk Android.mk
CLEANFILES = Doxyfile
-BUILT_SOURCES = Android.mk
-MAINTAINERCLEANFILES = Android.mk
+BUILT_SOURCES = Android.common.mk
+MAINTAINERCLEANFILES = Android.common.mk
if USE_DEV_HEADERS
config_includedir = $(ipseclibdir)/include
nodist_config_include_HEADERS = config.h
endif
-Android.mk : Android.mk.in configure.in
+Android.common.mk : Android.common.mk.in configure.in
sed \
-e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
$(srcdir)/$@.in > $@