2015-05-14 19:09:10 +08:00
|
|
|
ifndef XTOOLS_TOOLCHAIN_PATH
|
|
|
|
$(error XTOOLS_TOOLCHAIN_PATH is not set)
|
|
|
|
endif
|
2015-05-13 12:44:22 +08:00
|
|
|
|
|
|
|
CROSS_COMPILE_TARGET_arm = arm-none-eabi
|
|
|
|
CROSS_COMPILE_TARGET_x86 = i586-pc-elf
|
|
|
|
|
2015-06-02 22:40:34 +08:00
|
|
|
CROSS_COMPILE_TARGET = ${CROSS_COMPILE_TARGET_${ARCH}}
|
2016-09-11 04:07:29 +08:00
|
|
|
CROSS_COMPILE = ${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-
|
|
|
|
CROSS_COMPILE_version ?= $(shell $(CROSS_COMPILE)gcc -dumpversion)
|
|
|
|
TOOLCHAIN_CFLAGS = -I${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_TARGET}/sysroot/usr/include
|
2015-05-13 12:44:22 +08:00
|
|
|
|
2015-05-19 07:55:02 +08:00
|
|
|
TOOLCHAIN_LIBS = gcc
|
2015-05-17 20:55:21 +08:00
|
|
|
|
2015-06-02 22:40:34 +08:00
|
|
|
LIB_INCLUDE_DIR += -L ${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}/lib/gcc/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_version}/
|
|
|
|
|
2016-08-26 06:44:48 +08:00
|
|
|
QEMU_BIN_PATH ?= /usr/local/bin
|
|
|
|
|
|
|
|
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS QEMU_BIN_PATH
|