Add support for variable arch builds to support mips & 64-bit archs
This commit is contained in:
parent
84c6645220
commit
adb9a19367
|
@ -24,17 +24,37 @@ endif
|
||||||
# Android NDK setup
|
# Android NDK setup
|
||||||
NDK_BASE ?= /opt/android-ndk
|
NDK_BASE ?= /opt/android-ndk
|
||||||
NDK_PLATFORM_LEVEL ?= 16
|
NDK_PLATFORM_LEVEL ?= 16
|
||||||
NDK_ABI ?= arm
|
|
||||||
NDK_TOOLCHAIN_VERSION=4.8
|
NDK_TOOLCHAIN_VERSION=4.8
|
||||||
APP_ABI ?= armeabi
|
APP_ABI ?= armeabi
|
||||||
|
|
||||||
|
NDK_ABI := $(APP_ABI)
|
||||||
|
ifneq ($(filter arm%, $(APP_ABI)),)
|
||||||
|
NDK_ABI := arm
|
||||||
|
endif
|
||||||
|
ifneq ($(filter arm64%, $(APP_ABI)),)
|
||||||
|
NDK_ABI := arm64
|
||||||
|
endif
|
||||||
NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
|
NDK_SYSROOT=$(NDK_BASE)/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]')
|
||||||
ifeq ($(NDK_ABI),x86)
|
ifneq ($(filter mips%, $(NDK_ABI)),)
|
||||||
HOST = i686-linux-android
|
HOST := $(NDK_ABI)el-linux-android
|
||||||
NDK_TOOLCHAIN = $(NDK_ABI)-$(NDK_TOOLCHAIN_VERSION)
|
endif
|
||||||
else
|
ifneq ($(filter arm64, $(NDK_ABI)),)
|
||||||
HOST = $(NDK_ABI)-linux-androideabi
|
HOST := aarch64-linux-android
|
||||||
NDK_TOOLCHAIN = $(HOST)-$(NDK_TOOLCHAIN_VERSION)
|
endif
|
||||||
|
ifneq ($(filter arm, $(NDK_ABI)),)
|
||||||
|
HOST := arm-linux-androideabi
|
||||||
|
endif
|
||||||
|
ifneq ($(filter x86, $(NDK_ABI)),)
|
||||||
|
HOST := i686-linux-android
|
||||||
|
endif
|
||||||
|
ifneq ($(filter x86_64, $(NDK_ABI)),)
|
||||||
|
HOST := x86_64-linux-android
|
||||||
|
endif
|
||||||
|
|
||||||
|
NDK_TOOLCHAIN := $(HOST)-$(NDK_TOOLCHAIN_VERSION)
|
||||||
|
ifneq ($(filter x86%, $(NDK_ABI)),)
|
||||||
|
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=$(NDK_BASE)/toolchains/$(NDK_TOOLCHAIN)/prebuilt/$(NDK_UNAME)-$(NDK_PROCESSOR)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue