mk rules: Improve behaviour when DEVICE is set to family. Improved Warning
The warning now uses family instead of subfamily, which is available sooner.
This commit is contained in:
parent
60ca09c61e
commit
6aeb55c5d7
@ -60,7 +60,7 @@ else
|
|||||||
ifneq (,$(wildcard $(OPENCM3_DIR)/lib/libopencm3_$(genlink_subfamily).a))
|
ifneq (,$(wildcard $(OPENCM3_DIR)/lib/libopencm3_$(genlink_subfamily).a))
|
||||||
LDLIBS += -lopencm3_$(genlink_subfamily)
|
LDLIBS += -lopencm3_$(genlink_subfamily)
|
||||||
else
|
else
|
||||||
$(warning $(OPENCM3_DIR)/lib/libopencm3_$(genlink_subfamily).a library variant for the selected device does not exist.)
|
$(warning $(OPENCM3_DIR)/lib/libopencm3_$(genlink_family).a library variant for the selected device does not exist.)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
PAT = tolower(PAT);
|
PAT = tolower(PAT);
|
||||||
|
family = PAT;
|
||||||
}
|
}
|
||||||
!/^#/{
|
!/^#/{
|
||||||
#remove cr on windows
|
#remove cr on windows
|
||||||
@ -35,6 +36,8 @@ BEGIN {
|
|||||||
tolower(tmp);
|
tolower(tmp);
|
||||||
|
|
||||||
if (PAT ~ tmp) {
|
if (PAT ~ tmp) {
|
||||||
|
if ("CPPFLAGS" == MODE)
|
||||||
|
printf "-D%s ",toupper(PAT);
|
||||||
if ($2 != "+")
|
if ($2 != "+")
|
||||||
PAT=$2;
|
PAT=$2;
|
||||||
for (i = 3; i <= NF; i = i + 1) {
|
for (i = 3; i <= NF; i = i + 1) {
|
||||||
@ -67,9 +70,7 @@ BEGIN {
|
|||||||
else{
|
else{
|
||||||
subfamily = family;
|
subfamily = family;
|
||||||
family = PAT;
|
family = PAT;
|
||||||
if ("CPPFLAGS" == MODE)
|
if("DEFS" == MODE)
|
||||||
printf "-D%s ",toupper(PAT);
|
|
||||||
else if("DEFS" == MODE)
|
|
||||||
printf "-D%s ",toupper(PAT);
|
printf "-D%s ",toupper(PAT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user