]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
Extracted some parts from Android.mk.in which can be used for NDK builds.
authorTobias Brunner <tobias@strongswan.org>
Fri, 17 Feb 2012 14:39:25 +0000 (15:39 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 Aug 2012 13:07:43 +0000 (15:07 +0200)
.gitignore
Android.common.mk.in [new file with mode: 0644]
Android.mk [moved from Android.mk.in with 85% similarity]
Makefile.am

index 34d3ee667ff1a8e75db7bebcc4e7dd5a8de7c362..29adedde61c373c8c2383e02860678ed502c5d1e 100644 (file)
@@ -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 (file)
index 0000000..1bc8a83
--- /dev/null
@@ -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@"
+
similarity index 85%
rename from Android.mk.in
rename to Android.mk
index 2b51d3ea180714cafb795a437a22472419f90b0f..edfdef39700fd7826a1d0f975119eeae0c08e51f 100644 (file)
@@ -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"
index 908afca44250db2b86044f7fae5cebceb1766117..8a558c15071908a429a454636860ef1543033457 100644 (file)
@@ -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 > $@