1########################################################### 2# takes form LOCAL_AUX_TOOLCHAIN_$(LOCAL_AUX_CPU) 3########################################################### 4 5############################### 6# setup AUX environment 7############################### 8 9# shortcuts for targets with a single instance of OS, ARCH, VARIANT, CPU 10AUX_TOOLCHAIN := $(if $(LOCAL_AUX_TOOLCHAIN),$(LOCAL_AUX_TOOLCHAIN),$(AUX_TOOLCHAIN_$(AUX_CPU))) 11AUX_BUILD_NOT_COMPATIBLE:= 12ifeq ($(strip $(AUX_TOOLCHAIN)),) 13 ifeq ($(strip $(AUX_CPU)),) 14 $(warning $(LOCAL_PATH): $(LOCAL_MODULE): Undefined CPU for AUX toolchain) 15 AUX_BUILD_NOT_COMPATIBLE += TOOLCHAIN 16 else 17 $(warning $(LOCAL_PATH): $(LOCAL_MODULE): Undefined AUX toolchain for CPU=$(AUX_CPU)) 18 AUX_BUILD_NOT_COMPATIBLE += TOOLCHAIN 19 endif 20endif 21 22AUX_BUILD_NOT_COMPATIBLE += $(foreach var,OS ARCH SUBARCH CPU OS_VARIANT,$(if $(LOCAL_AUX_$(var)),$(if \ 23 $(filter $(LOCAL_AUX_$(var)),$(AUX_$(var))),,$(var)))) 24 25AUX_BUILD_NOT_COMPATIBLE := $(strip $(AUX_BUILD_NOT_COMPATIBLE)) 26 27ifneq ($(AUX_BUILD_NOT_COMPATIBLE),) 28$(info $(LOCAL_PATH): $(LOCAL_MODULE): not compatible: "$(AUX_BUILD_NOT_COMPATIBLE)" with) 29$(info ====> OS=$(AUX_OS) CPU=$(AUX_CPU) ARCH=$(AUX_ARCH) SUBARCH=$(AUX_SUBARCH) OS_VARIANT=$(AUX_OS_VARIANT)) 30$(info ====> TOOLCHAIN=$(AUX_TOOLCHAIN)) 31endif 32 33AUX_AR := $(AUX_TOOLCHAIN)ar 34AUX_AS := $(AUX_TOOLCHAIN)gcc 35AUX_CC := $(AUX_TOOLCHAIN)gcc 36AUX_CXX := $(AUX_TOOLCHAIN)g++ 37AUX_LINKER := $(AUX_TOOLCHAIN)ld 38AUX_OBJCOPY := $(AUX_TOOLCHAIN)objcopy 39AUX_OBJDUMP := $(AUX_TOOLCHAIN)objdump 40 41############################### 42# setup Android environment 43############################### 44 45LOCAL_IS_AUX_MODULE := true 46LOCAL_2ND_ARCH_VAR_PREFIX := 47LOCAL_CC := $(AUX_CC) 48LOCAL_CXX := $(AUX_CXX) 49LOCAL_NO_DEFAULT_COMPILER_FLAGS := true 50LOCAL_SYSTEM_SHARED_LIBRARIES := 51LOCAL_CXX_STL := none 52LOCAL_NO_PIC := true 53