2015-05-14 19:09:10 +08:00
|
|
|
|
|
|
|
ifndef YOCTO_SDK_INSTALL_DIR
|
|
|
|
$(error YOCTO_SDK_INSTALL_DIR is not set)
|
|
|
|
endif
|
|
|
|
|
2015-05-13 12:44:22 +08:00
|
|
|
# arm
|
|
|
|
CROSS_COMPILE_TARGET_arm = arm-poky-eabi
|
2015-09-25 00:52:15 +08:00
|
|
|
CROSS_COMPILE_arm_version = 5.2.0
|
2015-05-13 12:44:22 +08:00
|
|
|
CROSS_COMPILE_arm=${YOCTO_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-linux/usr/bin/$(CROSS_COMPILE_TARGET_arm)/$(CROSS_COMPILE_TARGET_arm)-
|
|
|
|
|
2015-09-25 00:52:15 +08:00
|
|
|
LIB_INCLUDE_DIR_arm = -L ${YOCTO_SDK_INSTALL_DIR}/sysroots/armv5-poky-eabi/usr/lib/$(CROSS_COMPILE_TARGET_arm)/$(CROSS_COMPILE_arm_version)
|
2015-05-13 12:44:22 +08:00
|
|
|
|
2015-08-08 08:33:03 +08:00
|
|
|
# iamcu
|
|
|
|
CROSS_COMPILE_TARGET_iamcu = i586-poky-elfiamcu
|
|
|
|
CROSS_COMPILE_iamcu_version = 4.9.3
|
|
|
|
CROSS_COMPILE_iamcu=${YOCTO_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/$(CROSS_COMPILE_TARGET_iamcu)-
|
|
|
|
|
|
|
|
LIB_INCLUDE_DIR_iamcu = -L ${YOCTO_SDK_INSTALL_DIR}/sysroots/iamcu-poky-elfiamcu/usr/lib/i586-poky-elfiamcu/$(CROSS_COMPILE_iamcu_version)
|
|
|
|
LIB_INCLUDE_DIR_iamcu += -L ${YOCTO_SDK_INSTALL_DIR}/sysroots/iamcu-poky-elfiamcu/usr/i586-default-elfiamcu/lib/
|
|
|
|
TOOLCHAIN_CFLAGS_iamcu = -I${YOCTO_SDK_INSTALL_DIR}/sysroots/iamcu-poky-elfiamcu/usr/i586-default-elfiamcu/include
|
2015-05-13 12:44:22 +08:00
|
|
|
|
|
|
|
# x86
|
|
|
|
CROSS_COMPILE_TARGET_x86 = i586-poky-elf
|
2015-09-25 00:52:15 +08:00
|
|
|
CROSS_COMPILE_x86_version = 4.9.3
|
2015-05-13 12:44:22 +08:00
|
|
|
CROSS_COMPILE_x86=${YOCTO_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-linux/usr/bin/$(CROSS_COMPILE_TARGET_x86)/$(CROSS_COMPILE_TARGET_x86)-
|
|
|
|
|
2015-08-08 08:33:03 +08:00
|
|
|
LIB_INCLUDE_DIR_x86 = -L ${YOCTO_SDK_INSTALL_DIR}/sysroots/i586-poky-elf/usr/lib/i586-poky-elf/$(CROSS_COMPILE_x86_version)
|
2015-09-25 00:52:15 +08:00
|
|
|
LIB_INCLUDE_DIR_x86 += -L ${YOCTO_SDK_INSTALL_DIR}/sysroots/i586-poky-elf/usr/${CROSS_COMPILE_TARGET_x86}/lib
|
|
|
|
TOOLCHAIN_CFLAGS_x86 = -I${YOCTO_SDK_INSTALL_DIR}/sysroots/i586-poky-elf/usr/${CROSS_COMPILE_TARGET_x86}/include
|
2015-05-13 12:44:22 +08:00
|
|
|
|
|
|
|
# arc
|
|
|
|
CROSS_COMPILE_TARGET_arc = arc-poky-elf
|
|
|
|
CROSS_COMPILE_arc_version = 4.8.3
|
2015-05-25 11:04:32 +08:00
|
|
|
CROSS_COMPILE_arc=${YOCTO_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-linux/usr/bin/$(CROSS_COMPILE_TARGET_arc)/$(CROSS_COMPILE_TARGET_arc)-
|
2015-05-13 12:44:22 +08:00
|
|
|
|
2015-09-25 00:52:15 +08:00
|
|
|
LIB_INCLUDE_DIR_arc = -L ${YOCTO_SDK_INSTALL_DIR}/sysroots/$(CROSS_COMPILE_TARGET_arc)/usr/lib/$(CROSS_COMPILE_TARGET_arc)/$(CROSS_COMPILE_arc_version)/em
|
2015-05-13 12:44:22 +08:00
|
|
|
|
2015-08-08 08:33:03 +08:00
|
|
|
ifneq ($(CONFIG_TOOLCHAIN_VARIANT),"")
|
|
|
|
CROSS_COMPILE = $(CROSS_COMPILE_$(subst $\",,$(CONFIG_TOOLCHAIN_VARIANT)))
|
|
|
|
LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(subst $\",,$(CONFIG_TOOLCHAIN_VARIANT)))
|
|
|
|
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(subst $\",,$(CONFIG_TOOLCHAIN_VARIANT)))
|
|
|
|
else
|
2015-06-01 22:34:57 +08:00
|
|
|
CROSS_COMPILE = $(CROSS_COMPILE_$(ARCH))
|
2015-05-13 12:44:22 +08:00
|
|
|
LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
|
2015-08-08 08:33:03 +08:00
|
|
|
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_TOOLCHAIN_VARIANT),"iamcu")
|
|
|
|
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
|
|
|
|
OUTPUT_FORMAT = elf32-iamcu
|
|
|
|
OUTPUT_ARCH = iamcu:intel
|
|
|
|
endif
|
|
|
|
|
2015-05-13 12:44:22 +08:00
|
|
|
|
2015-06-01 22:34:57 +08:00
|
|
|
QEMU_BIN_PATH ?= ${YOCTO_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-linux/usr/bin
|
|
|
|
QEMU = $(QEMU_BIN_PATH)/$(QEMU_$(SRCARCH))
|
2015-09-25 00:52:15 +08:00
|
|
|
QEMU_BIOS=${YOCTO_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-linux/usr/share/qemu
|
2015-06-01 22:34:57 +08:00
|
|
|
|
2015-05-17 20:55:21 +08:00
|
|
|
TOOLCHAIN_LIBS = gcc
|
|
|
|
|
2015-08-08 08:33:03 +08:00
|
|
|
export LIB_INCLUDE_DIR CROSS_COMPILE TOOLCHAIN_LIBS QEMU_BIN_PATH QEMU TOOLCHAIN_CFLAGS
|