Skip to content

Commit

Permalink
feat(Build): Add Compiler Flag for Checking Target Micro (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter authored Feb 12, 2024
1 parent 24967ab commit f5bd0ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Libraries/CMSIS/Device/Maxim/GCC/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ ifneq "$(TARGET)" ""
CFLAGS+=-DTARGET=$(TARGET)
endif

ifneq "$(TARGET_UC)" ""
# Define a flag that the pre-processor can actually work with
# (i.e. #ifdef MAX78000 ...)
# TARGET_UC typically comes from the project core Makefile
CFLAGS += -D$(TARGET_UC)
endif

ifneq "$(TARGET_REV)" ""
CFLAGS+=-DTARGET_REV=$(TARGET_REV)
endif
Expand Down
7 changes: 7 additions & 0 deletions Libraries/CMSIS/Device/Maxim/GCC/gcc_riscv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ ifneq "$(TARGET)" ""
CFLAGS+=-DTARGET=$(TARGET)
endif

ifneq "$(TARGET_UC)" ""
# Define a flag that the pre-processor can actually work with
# (i.e. #ifdef MAX78000 ...)
# TARGET_UC typically comes from the project core Makefile
CFLAGS += -D$(TARGET_UC)
endif

ifneq "$(TARGET_REV)" ""
CFLAGS+=-DTARGET_REV=$(TARGET_REV)
endif
Expand Down

0 comments on commit f5bd0ae

Please sign in to comment.