Skip to content

Commit

Permalink
makes: add global defines __TARGET and __CPU
Browse files Browse the repository at this point in the history
Adds globally visible defines pointing to TARGET architecture
and CPU. The definitions are derived from TARGET_FAMILY and
TARGET_SUBFAMILY.

JIRA: RTOS-519
  • Loading branch information
gerard5 committed Jul 12, 2023
1 parent 927d782 commit bee0184
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ $(info cleaning targets, make parallelism disabled)
.NOTPARALLEL:
endif

# Distribute the __TARGET and __CPU defines
CFLAGS += -D__TARGET_$(call uppercase,$(TARGET_FAMILY))
CXXFLAGS += -D__TARGET_$(call uppercase,$(TARGET_FAMILY))

CFLAGS += -D__CPU_$(call uppercase,$(TARGET_SUBFAMILY))
CXXFLAGS += -D__CPU_$(call uppercase,$(TARGET_SUBFAMILY))

# generic CFLAGS/LDFLAGS
LDFLAGS += -L$(PREFIX_A)

Expand Down

0 comments on commit bee0184

Please sign in to comment.