====== UPPERCASE ====== [FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z - . [TO] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _ UPPERCASE = $(strip $(eval __tmp := $1) \ $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \ $(eval __tmp := \ $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\ $(__tmp)))) \ $(__tmp)) BOARD_CFLAGS += -DBOARD_$(call UPPERCASE,$(BOARD)) BOARD_ASMFLAGS += -DBOARD_$(call UPPERCASE,$(BOARD))