update Makefile to add specific NDK versioning for openssl
This commit is contained in:
parent
84ab10731c
commit
fa1ed5505d
|
@ -28,6 +28,7 @@ endif
|
||||||
|
|
||||||
# Android NDK setup
|
# Android NDK setup
|
||||||
ANDROID_NDK_HOME ?= /opt/android-ndk
|
ANDROID_NDK_HOME ?= /opt/android-ndk
|
||||||
|
ANDROID_NDK ?= $(ANDROID_NDK_HOME)
|
||||||
NDK_PLATFORM_LEVEL ?= 16
|
NDK_PLATFORM_LEVEL ?= 16
|
||||||
NDK_TOOLCHAIN_VERSION=4.9
|
NDK_TOOLCHAIN_VERSION=4.9
|
||||||
APP_ABI ?= armeabi
|
APP_ABI ?= armeabi
|
||||||
|
@ -42,6 +43,7 @@ endif
|
||||||
ifneq ($(filter arm64%, $(APP_ABI)),)
|
ifneq ($(filter arm64%, $(APP_ABI)),)
|
||||||
NDK_ABI := arm64
|
NDK_ABI := arm64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NDK_SYSROOT=$(ANDROID_NDK_HOME)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
|
NDK_SYSROOT=$(ANDROID_NDK_HOME)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
|
||||||
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
|
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
|
||||||
ifneq ($(filter mips%, $(NDK_ABI)),)
|
ifneq ($(filter mips%, $(NDK_ABI)),)
|
||||||
|
@ -125,10 +127,9 @@ ifneq ($(filter mips%, $(NDK_ABI)),)
|
||||||
OPENSSL_CONF_FLAG+=-D_MIPS_SZLONG=32 -D__MIPSEL__
|
OPENSSL_CONF_FLAG+=-D_MIPS_SZLONG=32 -D__MIPSEL__
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lib/libcrypto.a:
|
lib/libcrypto.a:
|
||||||
cd openssl && \
|
cd openssl && \
|
||||||
./Configure android -DL_ENDIAN $(OPENSSL_CONF_FLAG) && \
|
./Configure android -D__ANDROID_API__=$(NDK_PLATFORM_LEVEL) -DL_ENDIAN $(OPENSSL_CONF_FLAG) && \
|
||||||
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr depend && \
|
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr depend && \
|
||||||
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr build_libs
|
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr build_libs
|
||||||
|
|
||||||
|
@ -136,7 +137,7 @@ lib/libssl.a:
|
||||||
cp config.sub openssl
|
cp config.sub openssl
|
||||||
cp config.guess openssl
|
cp config.guess openssl
|
||||||
cd openssl && \
|
cd openssl && \
|
||||||
./Configure android -DL_ENDIAN $(OPENSSL_CONF_FLAG) && \
|
./Configure android -D__ANDROID_API__=$(NDK_PLATFORM_LEVEL) -DL_ENDIAN $(OPENSSL_CONF_FLAG) && \
|
||||||
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr depend && \
|
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr depend && \
|
||||||
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr build_libs
|
make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr build_libs
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue