Fix path errors when including arm makefiles from another location than a CPU makefile

This commit is contained in:
Richard Weickelt 2018-02-02 15:29:35 +01:00 committed by Edvard Pettersen
parent b49477441c
commit e8251d786b
2 changed files with 7 additions and 3 deletions

View File

@ -262,7 +262,7 @@ CONTIKI_CPU_DIRS_CONCAT = ${addprefix $(CONTIKI_CPU)/, \
$(CONTIKI_CPU_DIRS)}
CONTIKI_ARCH_DIRS = ${addprefix $(CONTIKI)/, arch}
SOURCEDIRS = . $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) $(CONTIKI_ARCH_DIRS) \
SOURCEDIRS = $(CONTIKI) $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) $(CONTIKI_ARCH_DIRS) \
$(CONTIKI_CPU_DIRS_CONCAT) $(CONTIKIDIRS) $(MODULEDIRS) $(EXTERNALDIRS) ${dir $(target_makefile)}
vpath %.c $(SOURCEDIRS)

View File

@ -1,3 +1,6 @@
MAKEFILE := $(lastword $(MAKEFILE_LIST))
BASE_DIR := $(realpath $(dir $(MAKEFILE)))
CC = arm-none-eabi-gcc
CPP = arm-none-eabi-cpp
LD = arm-none-eabi-gcc
@ -27,8 +30,9 @@ else
endif
### Use CMSIS and the existing dbg-io from arch/cpu/arm/common
CONTIKI_ARM_DIRS += . common/dbg-io
CONTIKI_CPU_DIRS += $(addprefix ../arm/, $(CONTIKI_ARM_DIRS))
CONTIKI_ARM_DIRS += .
CONTIKI_ARM_DIRS += ../common/dbg-io
CONTIKI_CPU_DIRS += $(realpath $(addprefix $(BASE_DIR)/, $(CONTIKI_ARM_DIRS)))
### CPU-dependent cleanup files
CLEAN += *.elf *.bin *.lst *.hex *.i16hex