diff options
author | sfan5 <sfan5@live.de> | 2016-12-22 14:45:53 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-12-22 22:17:54 +0100 |
commit | 70579dc7c3e76da109d8f99eeeffccff6ea5713b (patch) | |
tree | 14dd47b76a517edf8d17341749c639f41696559e /build/android | |
parent | 1dd361f37c31d43556c51096078686345c0f76f5 (diff) | |
download | minetest-70579dc7c3e76da109d8f99eeeffccff6ea5713b.tar.gz minetest-70579dc7c3e76da109d8f99eeeffccff6ea5713b.tar.bz2 minetest-70579dc7c3e76da109d8f99eeeffccff6ea5713b.zip |
Android: Workarounds for Googles completely broken NDK
Diffstat (limited to 'build/android')
-rw-r--r-- | build/android/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build/android/Makefile b/build/android/Makefile index dd62df7fb..6e7a389c9 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -220,6 +220,8 @@ $(OPENAL_LIB): $(OPENAL_TIMESTAMP) ${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \ NDK_MODULE_PATH=${NDK_MODULE_PATH} APP_ABI=${TARGET_ABI} \ TARGET_ARCH_ABI=${TARGET_ABI} APP_PLATFORM=${APP_PLATFORM} \ + PRIVATE_CC=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}gcc \ + PRIVATE_CXX=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}g++ \ TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \ TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \ TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" || exit 1; \ @@ -266,6 +268,8 @@ $(OGG_LIB): $(OGG_TIMESTAMP) ${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \ NDK_MODULE_PATH=${NDK_MODULE_PATH} \ APP_ABI=${TARGET_ABI} APP_PLATFORM=${APP_PLATFORM} \ + PRIVATE_CC=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}gcc \ + PRIVATE_CXX=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}g++ \ TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \ TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \ TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" || exit 1; \ @@ -313,6 +317,7 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB) export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-openssl; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ + --platform=android-9 \ --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ CC=${CROSS_PREFIX}gcc ./Configure enable-gmp -DL_ENDIAN -I${GMP_DIR} -L${GMP_DIR}/usr/lib android-${TARGET_ARCH};\ @@ -363,6 +368,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP) export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-leveldb; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ + --platform=android-9 \ --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export CC=${CROSS_PREFIX}gcc; \ @@ -416,6 +422,8 @@ $(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP) ${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \ NDK_MODULE_PATH=${NDK_MODULE_PATH} \ APP_PLATFORM=${APP_PLATFORM} APP_ABI=${TARGET_ABI} \ + PRIVATE_CC=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}gcc \ + PRIVATE_CXX=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}g++ \ TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \ TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \ TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" || exit 1; \ @@ -469,6 +477,7 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP) export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-iconv; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ + --platform=android-9 \ --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export CC=${CROSS_PREFIX}gcc; \ @@ -531,6 +540,8 @@ $(IRRLICHT_LIB): $(IRRLICHT_TIMESTAMP) $(FREETYPE_LIB) ${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \ NDK_MODULE_PATH=${NDK_MODULE_PATH} \ APP_ABI=${TARGET_ABI} APP_PLATFORM=${APP_PLATFORM} \ + PRIVATE_CC=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}gcc \ + PRIVATE_CXX=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}g++ \ TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \ TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \ TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" || exit 1; \ @@ -581,6 +592,7 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB) export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-curl; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ + --platform=android-9 \ --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export CC=${CROSS_PREFIX}gcc; \ @@ -640,6 +652,7 @@ $(GMP_LIB): $(GMP_TIMESTAMP) export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-gmp; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ + --platform=android-9 \ --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export CC=${CROSS_PREFIX}gcc; \ @@ -757,6 +770,8 @@ apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(GMP_LIB) + @${ANDROID_NDK}/ndk-build NDK_MODULE_PATH=${NDK_MODULE_PATH} \ GPROF=${GPROF} APP_ABI=${TARGET_ABI} HAVE_LEVELDB=${HAVE_LEVELDB} \ APP_PLATFORM=${APP_PLATFORM} \ + PRIVATE_CC=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}gcc \ + PRIVATE_CXX=${NDK_MODULE_PATH}/${TARGET_TOOLCHAIN}${COMPILER_VERSION}/prebuilt/linux-x86_64/bin/${TARGET_TOOLCHAIN}g++ \ TARGET_LIBDIR=${TARGET_LIBDIR} \ TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \ TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \ |