Extracted some parts from Android.mk.in which can be used for NDK builds.
This commit is contained in:
parent
80b267f9e3
commit
3fa8d7738e
|
@ -1,4 +1,4 @@
|
||||||
/Android.mk
|
/Android.common.mk
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
|
|
|
@ -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@"
|
||||||
|
|
|
@ -32,18 +32,7 @@ strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
|
||||||
$(strongswan_STARTER_PLUGINS) \
|
$(strongswan_STARTER_PLUGINS) \
|
||||||
$(strongswan_SCEPCLIENT_PLUGINS))
|
$(strongswan_SCEPCLIENT_PLUGINS))
|
||||||
|
|
||||||
# helper macros to only add source files for plugins included in the list above
|
include $(LOCAL_PATH)/Android.common.mk
|
||||||
# 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
|
# includes
|
||||||
strongswan_PATH := $(LOCAL_PATH)
|
strongswan_PATH := $(LOCAL_PATH)
|
||||||
|
@ -53,7 +42,6 @@ libgmp_PATH := external/strongswan-support/gmp
|
||||||
openssl_PATH := external/openssl/include
|
openssl_PATH := external/openssl/include
|
||||||
|
|
||||||
# some definitions
|
# some definitions
|
||||||
strongswan_VERSION := "@PACKAGE_VERSION@"
|
|
||||||
strongswan_DIR := "/system/bin"
|
strongswan_DIR := "/system/bin"
|
||||||
strongswan_SBINDIR := "/system/bin"
|
strongswan_SBINDIR := "/system/bin"
|
||||||
strongswan_PIDDIR := "/data/misc/vpn"
|
strongswan_PIDDIR := "/data/misc/vpn"
|
|
@ -6,17 +6,17 @@ endif
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4/config
|
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
|
CLEANFILES = Doxyfile
|
||||||
BUILT_SOURCES = Android.mk
|
BUILT_SOURCES = Android.common.mk
|
||||||
MAINTAINERCLEANFILES = Android.mk
|
MAINTAINERCLEANFILES = Android.common.mk
|
||||||
|
|
||||||
if USE_DEV_HEADERS
|
if USE_DEV_HEADERS
|
||||||
config_includedir = $(ipseclibdir)/include
|
config_includedir = $(ipseclibdir)/include
|
||||||
nodist_config_include_HEADERS = config.h
|
nodist_config_include_HEADERS = config.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Android.mk : Android.mk.in configure.in
|
Android.common.mk : Android.common.mk.in configure.in
|
||||||
sed \
|
sed \
|
||||||
-e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
|
-e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
|
||||||
$(srcdir)/$@.in > $@
|
$(srcdir)/$@.in > $@
|
||||||
|
|
Loading…
Reference in New Issue