Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Commit

Permalink
switch to standard NDK env var: ANDROID_NDK_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
eighthave committed Apr 10, 2015
1 parent b73627a commit 0fbd48d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions external/Makefile
Expand Up @@ -32,10 +32,10 @@ else
endif

# Android NDK setup
NDK_BASE ?= /opt/android-ndk
ANDROID_NDK_HOME ?= /opt/android-ndk
NDK_ABI=arm
# NDK platform level, aka APP_PLATFORM, is equivalent to minSdkVersion
NDK_SYSROOT=$(NDK_BASE)/platforms/$(APP_PLATFORM)/arch-$(NDK_ABI)
NDK_SYSROOT=$(ANDROID_NDK_HOME)/platforms/$(APP_PLATFORM)/arch-$(NDK_ABI)
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
ifeq ($(NDK_ABI),x86)
HOST = i686-linux-android
Expand All @@ -44,11 +44,11 @@ else
HOST = $(NDK_ABI)-linux-androideabi
NDK_TOOLCHAIN = $(HOST)-$(NDK_TOOLCHAIN_VERSION)
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
TARGET_ARCH_ABI = $(APP_ABI)
include $(NDK_BASE)/toolchains/$(NDK_TOOLCHAIN)/setup.mk
include $(ANDROID_NDK_HOME)/toolchains/$(NDK_TOOLCHAIN)/setup.mk


# install root for built files
Expand Down
8 changes: 4 additions & 4 deletions make-release-build
Expand Up @@ -32,11 +32,11 @@ if [ -z $ANDROID_HOME ]; then
fi
fi

if [ -z $ANDROID_NDK ]; then
if [ -z $ANDROID_NDK_HOME ]; then
if which ndk-build 2>&1 /dev/null; then
ANDROID_NDK=`which ndk-build | sed 's,/ndk-build,,'`
ANDROID_NDK_HOME=`which ndk-build | sed 's,/ndk-build,,'`
else
echo "ANDROID_NDK not set and 'ndk-build' not in PATH"
echo "ANDROID_NDK_HOME not set and 'ndk-build' not in PATH"
exit
fi
fi
Expand All @@ -59,7 +59,7 @@ git submodule foreach --recursive git submodule sync
git submodule update --init --recursive

make -C external/
$ANDROID_NDK/ndk-build
$ANDROID_NDK_HOME/ndk-build

if [ -e ~/.android/ant.properties ]; then
cp ~/.android/ant.properties $projectroot/
Expand Down

0 comments on commit 0fbd48d

Please sign in to comment.