mirror of https://github.com/rusefi/bldc.git
[Makefile][Hw] Look for `no_limits` tag
This commit is contained in:
parent
f569432d2e
commit
f926673417
5
Makefile
5
Makefile
|
@ -124,13 +124,16 @@ $(TOOLS_DIR):
|
||||||
# $(1) = Canonical board name all in lower case (e.g. 100_250)
|
# $(1) = Canonical board name all in lower case (e.g. 100_250)
|
||||||
# $(2) = Target hardware directory
|
# $(2) = Target hardware directory
|
||||||
define FIND_TARGET_C_CODE
|
define FIND_TARGET_C_CODE
|
||||||
|
# Remove `_no_limits`
|
||||||
|
$(eval ROOT_TARGET_NAME = $(subst _no_limits,,$(1)))
|
||||||
|
|
||||||
# Look for `*_core.c` file
|
# Look for `*_core.c` file
|
||||||
ifneq ("$(wildcard $(2)/hw_*_core.c)","")
|
ifneq ("$(wildcard $(2)/hw_*_core.c)","")
|
||||||
# Good luck, there it is!
|
# Good luck, there it is!
|
||||||
HW_SRC_FILE = $(wildcard $(2)/hw_*_core.c)
|
HW_SRC_FILE = $(wildcard $(2)/hw_*_core.c)
|
||||||
else
|
else
|
||||||
# There isn't one, so let's hope for the sister `.c` file
|
# There isn't one, so let's hope for the sister `.c` file
|
||||||
HW_SRC_FILE = $(2)/hw_$(1).c
|
HW_SRC_FILE = $(2)/hw_$(ROOT_TARGET_NAME).c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in New Issue