17 lines
594 B
Makefile
17 lines
594 B
Makefile
ifndef GCCARMEMB_TOOLCHAIN_PATH
|
|
$(error GCCARMEMB_TOOLCHAIN_PATH is not set)
|
|
endif
|
|
|
|
CROSS_COMPILE = ${GCCARMEMB_TOOLCHAIN_PATH}/bin/arm-none-eabi-
|
|
|
|
TOOLCHAIN_LIBS = gcc
|
|
LIBGCC_DIR = $(shell dirname `$(CROSS_COMPILE)gcc ${KBUILD_CFLAGS} -print-libgcc-file-name`)
|
|
NEWLIB_DIR = ${GCCARMEMB_TOOLCHAIN_PATH}/arm-none-eabi/lib/`$(CROSS_COMPILE)gcc ${KBUILD_CFLAGS} -print-multi-directory`
|
|
|
|
LIB_INCLUDE_DIR += -L ${LIBGCC_DIR} -L ${NEWLIB_DIR}
|
|
TOOLCHAIN_CFLAGS = -I${GCCARMEMB_TOOLCHAIN_PATH}/arm-none-eabi/include
|
|
|
|
DTC ?= dtc
|
|
|
|
export CROSS_COMPILE TOOLCHAIN_LIBS TOOLCHAIN_CFLAGS LIB_INCLUDE_DIR DTC
|