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
@@ -29,7 +29,7 @@ GDB = $(PREFIX)-gdb
|
||||
FLASH = $(shell which st-flash)
|
||||
|
||||
TOOLCHAIN_DIR ?= ../../../../../libopencm3
|
||||
ifeq ($(wildcard ../../../../../libopencm3/lib/libopencm3_stm32f3.a),)
|
||||
ifeq ($(wildcard $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f3.a),)
|
||||
ifneq ($(strip $(shell which $(CC))),)
|
||||
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user