aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Android.common.mk.in19
-rw-r--r--Android.mk (renamed from Android.mk.in)14
-rw-r--r--Makefile.am8
4 files changed, 25 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 34d3ee667..29adedde6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-/Android.mk
+/Android.common.mk
Makefile
Makefile.in
aclocal.m4
diff --git a/Android.common.mk.in b/Android.common.mk.in
new file mode 100644
index 000000000..1bc8a8304
--- /dev/null
+++ b/Android.common.mk.in
@@ -0,0 +1,19 @@
+# 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@"
+
diff --git a/Android.mk.in b/Android.mk
index 2b51d3ea1..edfdef397 100644
--- a/Android.mk.in
+++ b/Android.mk
@@ -32,18 +32,7 @@ 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 \
- ) \
- ) \
- ) \
- )
+include $(LOCAL_PATH)/Android.common.mk
# includes
strongswan_PATH := $(LOCAL_PATH)
@@ -53,7 +42,6 @@ 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"
diff --git a/Makefile.am b/Makefile.am
index 908afca44..8a558c150 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,17 +6,17 @@ endif
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 > $@