Extracted some parts from Android.mk.in which can be used for NDK builds.

This commit is contained in:
Tobias Brunner 2012-02-17 15:39:25 +01:00
parent 80b267f9e3
commit 3fa8d7738e
4 changed files with 25 additions and 18 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/Android.mk
/Android.common.mk
Makefile
Makefile.in
aclocal.m4

19
Android.common.mk.in Normal file
View File

@ -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@"

View 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"

View 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 > $@