2015-06-20 11:37:23 +08:00
|
|
|
ifndef IAMCU_TOOLCHAIN_PATH
|
|
|
|
$(error IAMCU_TOOLCHAIN_PATH is not set)
|
|
|
|
endif
|
|
|
|
|
|
|
|
CROSS_COMPILE_TARGET_x86 = i586-intel-elfiamcu
|
|
|
|
CROSS_COMPILE_x86_version = 4.9.3
|
|
|
|
CROSS_COMPILE_x86=${IAMCU_TOOLCHAIN_PATH}/bin/${CROSS_COMPILE_TARGET_x86}-
|
2015-10-08 22:15:43 +08:00
|
|
|
TOOLCHAIN_CFLAGS_x86 = -I${IAMCU_TOOLCHAIN_PATH}/$(CROSS_COMPILE_TARGET_x86)/include/
|
2015-06-20 11:37:23 +08:00
|
|
|
|
|
|
|
CROSS_COMPILE= $(CROSS_COMPILE_$(ARCH))
|
|
|
|
|
|
|
|
LIB_INCLUDE_DIR_x86 = -L $(IAMCU_TOOLCHAIN_PATH)/lib/gcc/$(CROSS_COMPILE_TARGET_x86)/$(CROSS_COMPILE_x86_version)
|
2015-10-08 22:15:43 +08:00
|
|
|
LIB_INCLUDE_DIR_x86 += -L ${IAMCU_TOOLCHAIN_PATH}/$(CROSS_COMPILE_TARGET_x86)/lib
|
2015-06-20 11:37:23 +08:00
|
|
|
|
|
|
|
LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
|
|
|
|
|
|
|
|
TOOLCHAIN_LIBS = gcc
|
2015-10-08 22:15:43 +08:00
|
|
|
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))
|
2015-06-20 11:37:23 +08:00
|
|
|
|
|
|
|
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
|
|
|
|
OUTPUT_FORMAT = elf32-iamcu
|
|
|
|
OUTPUT_ARCH = iamcu:intel
|
|
|
|
|
2015-10-08 22:15:43 +08:00
|
|
|
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS
|