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
# -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
#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
#TARGET_LIBDIR = x86
#TARGET_TOOLCHAIN = x86-
#CROSS_PREFIX = i686-linux-android-
+#TARGET_ARCH = x86
#COMPILER_VERSION = 4.8
#HAVE_LEVELDB = 1
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)
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
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)
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 \
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; \
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; \
--- /dev/null
+--- openssl-1.0.1j/Configure.orig 2014-10-15 14:53:39.000000000 +0200
++++ openssl-1.0.1j/Configure 2015-01-03 22:41:43.505749921 +0100
+@@ -407,6 +407,8 @@
+ "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"android-arm","gcc:-march=armv4 -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"android-mips32","gcc:-march=mips32 -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+
+ #### *BSD [do see comment about ${BSDthreads} above!]
+ "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",