[Olsr-dev] [PATCH v1 1/1] android: use the machine specific NDK instead of always the 32bit variant
Ferry Huberts
(spam-protected)
Tue Aug 19 12:07:29 CEST 2014
From: Ferry Huberts <(spam-protected)>
Signed-off-by: Ferry Huberts <(spam-protected)>
---
make/Makefile.android | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/make/Makefile.android b/make/Makefile.android
index e45c138..b6e2b34 100644
--- a/make/Makefile.android
+++ b/make/Makefile.android
@@ -93,17 +93,18 @@ UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
/sbin/ldconfig -n $(LIBDIR)
# Android NDK setup
-HOST = arm-linux-androideabi
NDK_BASE ?= /opt/android-ndk
NDK_PLATFORM_LEVEL ?= 4
+NDK_ARCH=$(shell uname -m)
NDK_ABI=arm
+NDK_ABIDIR=linux-androideabi
NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
NDK_UNAME=$(shell uname -s | tr '[A-Z]' '[a-z]')
# if you are using NDK older than r8, you must use 4.4.3:
#NDK_COMPILER_VERSION=4.4.3
NDK_COMPILER_VERSION=4.6
-NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/$(NDK_ABI)-linux-androideabi-$(NDK_COMPILER_VERSION)/prebuilt/$(NDK_UNAME)-x86
-CROSS_COMPILE = $(NDK_TOOLCHAIN)/bin/$(HOST)-
+NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/$(NDK_ABI)-$(NDK_ABIDIR)-$(NDK_COMPILER_VERSION)/prebuilt/$(NDK_UNAME)-$(NDK_ARCH)
+CROSS_COMPILE = $(NDK_TOOLCHAIN)/bin/$(NDK_ABI)-$(NDK_ABIDIR)-
CC = $(CROSS_COMPILE)gcc --sysroot="$(NDK_SYSROOT)"
LD = $(CROSS_COMPILE)ld
--
1.9.3
More information about the Olsr-dev
mailing list