Merge pull request #855 from authmillenon/board_macro

make: Fix BOARD and CPU macros
This commit is contained in:
Oleg Hahm 2014-04-09 01:24:58 +02:00
commit 4fd851bccf

View File

@ -25,9 +25,9 @@ $(error This application does not run on following boards: $(BOARD_BLACKLIST))
endif endif
# if you want to publish the board into the sources as an uppercase #define # if you want to publish the board into the sources as an uppercase #define
BB = $(shell echo $(BOARD)|tr 'a-z' 'A-Z') BB = $(shell echo $(BOARD)|tr 'a-z' 'A-Z'|tr '-' '_')
CPUDEF = $(shell echo $(CPU)|tr 'a-z' 'A-Z') CPUDEF = $(shell echo $(CPU)|tr 'a-z' 'A-Z'|tr '-' '_')
CFLAGS += -DBOARD=$(BB) -DCPU_$(CPUDEF) CFLAGS += -DBOARD_$(BB) -DCPU_$(CPUDEF)
export CFLAGS export CFLAGS