aboutsummaryrefslogtreecommitdiff
path: root/build/android/Makefile
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2015-01-03 23:49:46 +0100
committersapier <Sapier at GMX dot net>2015-01-04 16:57:19 +0100
commitbf5d6e670ab52f3e8623595f5112c107598d695b (patch)
treeb6a1e3c81365cce90eff79ee83f5014b0650dff0 /build/android/Makefile
parent64cdbae6dff170a0a8ecb0f8a5bc1080ad09e579 (diff)
downloadminetest-bf5d6e670ab52f3e8623595f5112c107598d695b.tar.gz
minetest-bf5d6e670ab52f3e8623595f5112c107598d695b.tar.bz2
minetest-bf5d6e670ab52f3e8623595f5112c107598d695b.zip
Switch to official openssl version and update to 1.0.1j
Diffstat (limited to 'build/android/Makefile')
-rw-r--r--build/android/Makefile38
1 files changed, 23 insertions, 15 deletions
diff --git a/build/android/Makefile b/build/android/Makefile
index d4760ee21..f96036fc4 100644
--- a/build/android/Makefile
+++ b/build/android/Makefile
@@ -34,6 +34,7 @@ TARGET_ABI = armeabi
TARGET_LIBDIR = armeabi
TARGET_TOOLCHAIN = arm-linux-androideabi-
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfp
+TARGET_ARCH = armv7
CROSS_PREFIX = arm-linux-androideabi-
COMPILER_VERSION = 4.8
HAVE_LEVELDB = 1
@@ -49,6 +50,7 @@ HAVE_LEVELDB = 1
# -mfloat-abi=hard -march=armv7-a
#TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
#TARGET_LDFLAGS_ADDON = -Wl,--no-warn-mismatch -lm_hard
+#TARGET_ARCH = arm
#CROSS_PREFIX = arm-linux-androideabi-
#COMPILER_VERSION = 4.8
#HAVE_LEVELDB = 1
@@ -60,6 +62,7 @@ HAVE_LEVELDB = 1
#TARGET_ABI = mips
#TARGET_LIBDIR = mips
#TARGET_TOOLCHAIN = mipsel-linux-android-
+#TARGET_ARCH = mips32
#CROSS_PREFIX = mipsel-linux-android-
#COMPILER_VERSION = 4.8
#HAVE_LEVELDB = 0
@@ -72,6 +75,7 @@ HAVE_LEVELDB = 1
#TARGET_LIBDIR = x86
#TARGET_TOOLCHAIN = x86-
#CROSS_PREFIX = i686-linux-android-
+#TARGET_ARCH = x86
#COMPILER_VERSION = 4.8
#HAVE_LEVELDB = 1
@@ -103,12 +107,13 @@ IRRLICHT_TIMESTAMP = $(IRRLICHT_DIR)timestamp
IRRLICHT_TIMESTAMP_INT = $(ROOT)/deps/irrlicht_timestamp
IRRLICHT_URL_SVN = http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es/
-OPENSSL_BASEDIR = openssl-android
+OPENSSL_VERSION = 1.0.1j
+OPENSSL_BASEDIR = openssl-$(OPENSSL_VERSION)
OPENSSL_DIR = $(ROOT)/deps/$(OPENSSL_BASEDIR)/
-OPENSSL_LIB = $(OPENSSL_DIR)libs/$(TARGET_ABI)/libopenssl.so
+OPENSSL_LIB = $(OPENSSL_DIR)/libssl.so.1.0.0
OPENSSL_TIMESTAMP = $(OPENSSL_DIR)timestamp
OPENSSL_TIMESTAMP_INT = $(ROOT)/deps/openssl_timestamp
-OPENSSL_URL_GIT = https://github.com/wobbals/openssl-android
+OPENSSL_URL = http://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz
CURL_VERSION = 7.35.0
CURL_DIR = $(ROOT)/deps/curl-$(CURL_VERSION)
@@ -118,7 +123,7 @@ CURL_TIMESTAMP_INT = $(ROOT)/deps/curl_timestamp
CURL_URL_HTTP = http://curl.haxx.se/download/curl-${CURL_VERSION}.tar.bz2
FREETYPE_DIR = $(ROOT)/deps/freetype2-android/
-FREETYPE_LIB = $(FREETYPE_DIR)/Android/obj/local/$(TARGER_ABI)/libfreetype2-static.a
+FREETYPE_LIB = $(FREETYPE_DIR)/Android/obj/local/$(TARGET_ABI)/libfreetype2-static.a
FREETYPE_TIMESTAMP = $(FREETYPE_DIR)timestamp
FREETYPE_TIMESTAMP_INT = $(ROOT)/deps/freetype_timestamp
FREETYPE_URL_GIT = https://github.com/cdave1/freetype2-android
@@ -283,7 +288,10 @@ openssl_download :
echo "openssl sources missing, downloading..."; \
mkdir -p ${ROOT}/deps; \
cd ${ROOT}/deps ; \
- git clone ${OPENSSL_URL_GIT} || exit 1; \
+ wget ${OPENSSL_URL} || exit 1; \
+ tar -xzf ${OPENSSL_BASEDIR}.tar.gz; \
+ cd ${OPENSSL_BASEDIR}; \
+ patch -p1 < ../../openssl_arch.patch; \
fi
openssl : $(OPENSSL_LIB)
@@ -298,16 +306,16 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP)
REFRESH=1; \
fi; \
if [ $$REFRESH -ne 0 ] ; then \
- export PATH=$$PATH:${SDKFOLDER}/platform-tools:${ANDROID_NDK}; \
echo "changed timestamp for openssl detected building..."; \
cd ${OPENSSL_DIR}; \
- cat jni/Application.mk | grep -v NDK_TOOLCHAIN_VERSION >jni/Application.mk.new;\
- mv jni/Application.mk.new jni/Application.mk; \
- ndk-build NDEBUG=${NDEBUG} NDK_MODULE_PATH=${NDK_MODULE_PATH} \
- APP_ABI=${TARGET_ABI} APP_PLATFORM=${APP_PLATFORM} -j${PARALLEL} \
- TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \
- TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \
- TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" || exit 1; \
+ ln -s ${OPENSSL_DIR} ../openssl; \
+ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}; \
+ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
+ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
+ --install-dir=$${TOOLCHAIN} --system=linux-x86_64; \
+ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
+ CC=${CROSS_PREFIX}gcc ./Configure -shared android-${TARGET_ARCH}; \
+ CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make all; \
touch ${OPENSSL_TIMESTAMP}; \
touch ${OPENSSL_TIMESTAMP_INT}; \
else \
@@ -346,7 +354,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
echo "changed timestamp for leveldb detected building..."; \
cd deps/leveldb; \
export CROSS_PREFIX=${CROSS_PREFIX}; \
- export TOOLCHAIN=/tmp/ndk-arm; \
+ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN} --system=linux-x86_64; \
@@ -503,7 +511,7 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
echo "changed timestamp for curl detected building..."; \
cd deps/curl-${CURL_VERSION}; \
export CROSS_PREFIX=${CROSS_PREFIX}; \
- export TOOLCHAIN=/tmp/ndk-arm; \
+ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN} --system=linux-x86_64; \