From 9456cb696caee2aa16195157e3f730717635c028 Mon Sep 17 00:00:00 2001 From: Hussein Kasem Date: Wed, 30 Oct 2019 21:48:15 +0100 Subject: [PATCH] Android: Add script calling OpenSSL configure with the right parameters --- android/external/Makefile | 8 +++++--- utils/configure_openssl.sh | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 utils/configure_openssl.sh diff --git a/android/external/Makefile b/android/external/Makefile index c71244c..0cd1753 100644 --- a/android/external/Makefile +++ b/android/external/Makefile @@ -11,7 +11,7 @@ NDK_ABI ?= arm NDK_TOOLCHAIN_VERSION ?= clang APP_ABI ?= armeabi-v7a -APP_PLATFORM ?= android-18 +ANDROID_API ?= 18 PEP_PACKAGE_NAME ?= security.pEp APP_OPTIM ?= debug @@ -242,10 +242,12 @@ openssl-clean: EXTERNAL_SRCS += openssl-src EXTERNAL_SRCS_CLEAN += openssl-clean + +OPENSSL_ARCHITECTURE:=android-arm + openssl/Makefile: openssl.src.stamp cd openssl && \ - PATH="$(ANDROID_NDK_HOME)/bin:$(PATH)" ./Configure android-arm --prefix=$(prefix) - + ../../../utils/configure_openssl.sh ${OPENSSL_ARCHITECTURE} $(ANDROID_API) $(LOCAL) openssl/libssl.so: | openssl/Makefile PATH="$(ANDROID_NDK_HOME)/bin:$(PATH)" $(MAKE) -C openssl diff --git a/utils/configure_openssl.sh b/utils/configure_openssl.sh new file mode 100644 index 0000000..c013136 --- /dev/null +++ b/utils/configure_openssl.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +###  +# DONT USE IT +###  +CC=clang +TOOLCHAINS_PATH=$(python ../../../utils/ndk_toolchains_path.py --ndk ${ANDROID_NDK}) +PATH=$TOOLCHAINS_PATH/bin:$PATH + +ARCHITECTURE=$1 +ANDROID_API=$2 +echo $3 + +./Configure ${ARCHITECTURE} -D__ANDROID_API__=$ANDROID_API --prefix=$3