switch to standard NDK env var: ANDROID_NDK_HOME

ANDROID_NDK_HOME is hardcoded in gradle as the name of the env var:
https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle/internal/Sdk.groovy
This commit is contained in:
Hans-Christoph Steiner 2015-06-03 16:13:18 -04:00
parent 663cade62d
commit cf43fa247d
2 changed files with 5 additions and 5 deletions

2
BUILD
View File

@ -27,7 +27,7 @@ Be sure that you have all of the git submodules up-to-date:
To begin building, from the Orbot root directory, you first need to build all To begin building, from the Orbot root directory, you first need to build all
external C/native dependencies: external C/native dependencies:
export NDK_BASE={PATH TO YOUR NDK INSTALL} export ANDROID_NDK_HOME={PATH TO YOUR NDK INSTALL}
make -C external make -C external
At this point, you'll have Tor and Polipo binaries that can be run on an At this point, you'll have Tor and Polipo binaries that can be run on an

8
external/Makefile vendored
View File

@ -22,7 +22,7 @@ else
endif endif
# Android NDK setup # Android NDK setup
NDK_BASE ?= /opt/android-ndk ANDROID_NDK_HOME ?= /opt/android-ndk
NDK_PLATFORM_LEVEL ?= 16 NDK_PLATFORM_LEVEL ?= 16
NDK_TOOLCHAIN_VERSION=4.8 NDK_TOOLCHAIN_VERSION=4.8
APP_ABI ?= armeabi APP_ABI ?= armeabi
@ -33,7 +33,7 @@ endif
ifneq ($(filter arm64%, $(APP_ABI)),) ifneq ($(filter arm64%, $(APP_ABI)),)
NDK_ABI := arm64 NDK_ABI := arm64
endif endif
NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI) NDK_SYSROOT=$(ANDROID_NDK_HOME)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]') NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
ifneq ($(filter mips%, $(NDK_ABI)),) ifneq ($(filter mips%, $(NDK_ABI)),)
HOST := $(NDK_ABI)el-linux-android HOST := $(NDK_ABI)el-linux-android
@ -55,11 +55,11 @@ NDK_TOOLCHAIN := $(HOST)-$(NDK_TOOLCHAIN_VERSION)
ifneq ($(filter x86%, $(NDK_ABI)),) ifneq ($(filter x86%, $(NDK_ABI)),)
NDK_TOOLCHAIN := $(NDK_ABI)-$(NDK_TOOLCHAIN_VERSION) NDK_TOOLCHAIN := $(NDK_ABI)-$(NDK_TOOLCHAIN_VERSION)
endif endif
NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/$(NDK_TOOLCHAIN)/prebuilt/$(NDK_UNAME)-$(NDK_PROCESSOR) NDK_TOOLCHAIN_BASE=$(ANDROID_NDK_HOME)/toolchains/$(NDK_TOOLCHAIN)/prebuilt/$(NDK_UNAME)-$(NDK_PROCESSOR)
# include Android's build flags # include Android's build flags
TARGET_ARCH_ABI = $(APP_ABI) TARGET_ARCH_ABI = $(APP_ABI)
include $(NDK_BASE)/toolchains/$(NDK_TOOLCHAIN)/setup.mk include $(ANDROID_NDK_HOME)/toolchains/$(NDK_TOOLCHAIN)/setup.mk
CC := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-gcc --sysroot=$(NDK_SYSROOT) CC := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-gcc --sysroot=$(NDK_SYSROOT)
CXX := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-g++ --sysroot=$(NDK_SYSROOT) CXX := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-g++ --sysroot=$(NDK_SYSROOT)