Make the STM32 Makefile.includes usable from outside the examples tree
The Makefile.includes contain a hardcoded ../../../../../libopencm3 path for the TOOLCHAIN_DIR variable. They also contained another copy of this hardcoded path, that is now generated from $TOOLCHAIN_DIR. This allows to have a symbolic link to a Makefile.include in an out-of-tree project and reuse the Makefile infrastructure.
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
c0791cd4a7
commit
3efd9f8675
@@ -28,7 +28,7 @@ OBJDUMP = $(PREFIX)-objdump
|
||||
GDB = $(PREFIX)-gdb
|
||||
|
||||
TOOLCHAIN_DIR ?= ../../../../../libopencm3
|
||||
ifeq ($(wildcard ../../../../../libopencm3/lib/libopencm3_stm32f2.a),)
|
||||
ifeq ($(wildcard $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a),)
|
||||
ifneq ($(strip $(shell which $(CC))),)
|
||||
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user