zephyr/scripts/Makefile.toolchain.issm

43 lines
1.8 KiB
Makefile

#
# The ISSM standalone toolchain provides both the x86 IAMCU and elf32 ARC
# toolchains. Currently supported version is '2016-05-12':
# https://software.intel.com/en-us/articles/issm-toolchain-only-download
#
ifndef ISSM_INSTALLATION_PATH
$(error ISSM_INSTALLATION_PATH is not set)
endif
# IA_VERSION and ARC_VERSION can be used to adjust the toolchain
# paths inside the ISSM installation to use an specific version, e.g.:
IA_VERSION ?= gcc-ia/5.2.1
ARC_VERSION ?= gcc-arc/4.8.5
ISSM_TOOLCHAIN_GCC_IA_ROOT ?= $(ISSM_INSTALLATION_PATH)/tools/compiler/$(IA_VERSION)
ISSM_TOOLCHAIN_GCC_ARC_ROOT ?= $(ISSM_INSTALLATION_PATH)/tools/compiler/$(ARC_VERSION)
#x86
CROSS_COMPILE_TARGET_x86 = i586-intel-elfiamcu
CROSS_COMPILE_x86=$(ISSM_TOOLCHAIN_GCC_IA_ROOT)/bin/$(CROSS_COMPILE_TARGET_x86)-
CROSS_COMPILE_x86_version = $(shell $(CROSS_COMPILE_x86)gcc -dumpversion)
LIB_INCLUDE_DIR_x86 = -L $(ISSM_TOOLCHAIN_GCC_IA_ROOT)/lib/gcc/$(CROSS_COMPILE_TARGET_x86)/$(CROSS_COMPILE_x86_version)
LIB_INCLUDE_DIR_x86 += -L $(ISSM_TOOLCHAIN_GCC_IA_ROOT)/$(CROSS_COMPILE_TARGET_x86)/lib
TOOLCHAIN_CFLAGS_x86 = -I$(ISSM_TOOLCHAIN_GCC_IA_ROOT)/$(CROSS_COMPILE_TARGET_x86)/include/
# arc
CROSS_COMPILE_TARGET_arc = arc-elf32
CROSS_COMPILE_arc=$(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/bin/$(CROSS_COMPILE_TARGET_arc)-
CROSS_COMPILE_arc_version = $(shell $(CROSS_COMPILE_arc)gcc -dumpversion)
LIB_INCLUDE_DIR_arc = -L $(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/lib/gcc/$(CROSS_COMPILE_TARGET_arc)/$(CROSS_COMPILE_arc_version)
LIB_INCLUDE_DIR_arc += -L $(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/$(CROSS_COMPILE_TARGET_arc)/lib
TOOLCHAIN_CFLAGS_arc = -I$(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/$(CROSS_COMPILE_TARGET_arc)/include
TOOLCHAIN_LIBS = gcc
CROSS_COMPILE= $(CROSS_COMPILE_$(ARCH))
LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS