Merge remote-tracking branch 'origin/new_core'
Conflicts: OsmAnd/jni/Application.mk OsmAnd/ndk-build.sh
This commit is contained in:
commit
5c03bb9a01
2 changed files with 38 additions and 4 deletions
34
OsmAnd/full-ndk-build.sh
Executable file
34
OsmAnd/full-ndk-build.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -d "$ANDROID_SDK" ]; then
|
||||||
|
echo "ANDROID_SDK is not set"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [ ! -d "$ANDROID_NDK" ]; then
|
||||||
|
echo "ANDROID_NDK is not set"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
if [ -z "$OSMAND_ARCHITECTURES_SET" ]; then
|
||||||
|
OSMAND_ARCHITECTURES_SET=(x86 mips arm armv5 armv7 armv7-neon)
|
||||||
|
export OSMAND_ARCHITECTURES_SET
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$(uname -a)" =~ Linux ]]; then
|
||||||
|
if [[ -z "$OSMAND_BUILD_CPU_CORES_NUM" ]]; then
|
||||||
|
OSMAND_BUILD_CPU_CORES_NUM=`nproc`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$(uname -a)" =~ Darwin ]]; then
|
||||||
|
if [[ -z "$OSMAND_BUILD_CPU_CORES_NUM" ]]; then
|
||||||
|
OSMAND_BUILD_CPU_CORES_NUM=`sysctl hw.ncpu | awk '{print $2}'`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
OSMAND_ANDROID_EXTERNAL_DEPENDENCIES=(expat freetype gdal giflib glm glsl-optimizer harfbuzz jpeg libpng protobuf qtbase-android skia)
|
||||||
|
"$SCRIPT_LOC/../../core/externals/configure.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
||||||
|
"$SCRIPT_LOC/../../core/externals/build.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
||||||
|
"$SCRIPT_LOC/../../jni/generate.sh"
|
||||||
|
(cd "$SCRIPT_LOC" && "$ANDROID_NDK/ndk-build" -j$OSMAND_BUILD_CPU_CORES_NUM)
|
|
@ -1,10 +1,10 @@
|
||||||
APP_STL := gnustl_shared
|
APP_STL := gnustl_shared
|
||||||
APP_CPPFLAGS := -std=c++11 -fexceptions -frtti
|
APP_CPPFLAGS := -std=c++11 -fexceptions -frtti
|
||||||
|
|
||||||
ifeq ($(wildcard $(ANDROID_NDK/toolchains/*-4.8)),)
|
ifeq ($(wildcard $(ANDROID_NDK)/toolchains/*-4.8),)
|
||||||
NDK_TOOLCHAIN_VERSION := 4.7
|
|
||||||
else
|
|
||||||
NDK_TOOLCHAIN_VERSION := 4.8
|
NDK_TOOLCHAIN_VERSION := 4.8
|
||||||
|
else
|
||||||
|
NDK_TOOLCHAIN_VERSION := 4.7
|
||||||
endif
|
endif
|
||||||
|
|
||||||
APP_ABI :=
|
APP_ABI :=
|
||||||
|
|
Loading…
Reference in a new issue