From 2314635cf0ba379c3a6e8108eb0aebcafcb0e519 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Mon, 7 Dec 2015 12:15:33 +1300 Subject: [PATCH] Makefile.include: don't override DEFS Allow examples (such as usart-semihosting) to set DEFS for their own use, and _then_ add the target definitions. --- examples/lpc/lpc13xx/Makefile.include | 2 +- examples/lpc/lpc17xx/Makefile.include | 2 +- examples/lpc/lpc43xx/Makefile.include | 2 +- examples/stm32/f0/Makefile.include | 4 ++-- examples/stm32/f1/Makefile.include | 2 +- examples/stm32/f2/Makefile.include | 2 +- examples/stm32/f3/Makefile.include | 2 +- examples/stm32/f4/Makefile.include | 2 +- examples/stm32/l0/Makefile.include | 2 +- examples/stm32/l1/Makefile.include | 2 +- examples/tiva/lm3s/Makefile.include | 2 +- examples/tiva/lm4f/Makefile.include | 2 +- examples/vf6xx/colibri-vf61/Makefile.include | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/lpc/lpc13xx/Makefile.include b/examples/lpc/lpc13xx/Makefile.include index 594a20c..6371a21 100644 --- a/examples/lpc/lpc13xx/Makefile.include +++ b/examples/lpc/lpc13xx/Makefile.include @@ -19,7 +19,7 @@ ## LIBNAME = opencm3_lpc13xx -DEFS = -DLPC13XX +DEFS += -DLPC13XX FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd diff --git a/examples/lpc/lpc17xx/Makefile.include b/examples/lpc/lpc17xx/Makefile.include index e8c5d1b..d0c102a 100644 --- a/examples/lpc/lpc17xx/Makefile.include +++ b/examples/lpc/lpc17xx/Makefile.include @@ -20,7 +20,7 @@ LIBNAME = opencm3_lpc17xx -DEFS = -DLPC17XX +DEFS += -DLPC17XX FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd diff --git a/examples/lpc/lpc43xx/Makefile.include b/examples/lpc/lpc43xx/Makefile.include index 4089b1a..fd9218d 100644 --- a/examples/lpc/lpc43xx/Makefile.include +++ b/examples/lpc/lpc43xx/Makefile.include @@ -22,7 +22,7 @@ LIBNAME = opencm3_lpc43xx -DEFS = -DLPC43XX +DEFS += -DLPC43XX FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) diff --git a/examples/stm32/f0/Makefile.include b/examples/stm32/f0/Makefile.include index 8f4098c..cceb380 100644 --- a/examples/stm32/f0/Makefile.include +++ b/examples/stm32/f0/Makefile.include @@ -19,7 +19,7 @@ ## LIBNAME = opencm3_stm32f0 -DEFS = -DSTM32F0 +DEFS += -DSTM32F0 FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m0 $(FP_FLAGS) @@ -41,4 +41,4 @@ BMP_PORT ?= #STLINK_PORT ?= :4242 -include ../../../../Makefile.rules \ No newline at end of file +include ../../../../Makefile.rules diff --git a/examples/stm32/f1/Makefile.include b/examples/stm32/f1/Makefile.include index 379c8a5..cd5118c 100644 --- a/examples/stm32/f1/Makefile.include +++ b/examples/stm32/f1/Makefile.include @@ -19,7 +19,7 @@ ## LIBNAME = opencm3_stm32f1 -DEFS = -DSTM32F1 +DEFS += -DSTM32F1 FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd diff --git a/examples/stm32/f2/Makefile.include b/examples/stm32/f2/Makefile.include index cf6b9ae..cc7e4b7 100644 --- a/examples/stm32/f2/Makefile.include +++ b/examples/stm32/f2/Makefile.include @@ -20,7 +20,7 @@ ## LIBNAME = opencm3_stm32f2 -DEFS = -DSTM32F2 +DEFS += -DSTM32F2 FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd diff --git a/examples/stm32/f3/Makefile.include b/examples/stm32/f3/Makefile.include index cb6129d..d011965 100644 --- a/examples/stm32/f3/Makefile.include +++ b/examples/stm32/f3/Makefile.include @@ -20,7 +20,7 @@ ## LIBNAME = opencm3_stm32f3 -DEFS = -DSTM32F3 +DEFS += -DSTM32F3 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include index 0833f5d..6ea1368 100644 --- a/examples/stm32/f4/Makefile.include +++ b/examples/stm32/f4/Makefile.include @@ -20,7 +20,7 @@ ## LIBNAME = opencm3_stm32f4 -DEFS = -DSTM32F4 +DEFS += -DSTM32F4 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) diff --git a/examples/stm32/l0/Makefile.include b/examples/stm32/l0/Makefile.include index e57e0d9..eeb2680 100644 --- a/examples/stm32/l0/Makefile.include +++ b/examples/stm32/l0/Makefile.include @@ -19,7 +19,7 @@ ## LIBNAME = opencm3_stm32l0 -DEFS = -DSTM32L0 +DEFS += -DSTM32L0 FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m0plus $(FP_FLAGS) diff --git a/examples/stm32/l1/Makefile.include b/examples/stm32/l1/Makefile.include index 32e5de1..eb5a5f6 100644 --- a/examples/stm32/l1/Makefile.include +++ b/examples/stm32/l1/Makefile.include @@ -19,7 +19,7 @@ ## LIBNAME = opencm3_stm32l1 -DEFS = -DSTM32L1 +DEFS += -DSTM32L1 FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd diff --git a/examples/tiva/lm3s/Makefile.include b/examples/tiva/lm3s/Makefile.include index ff61105..c0f2c74 100644 --- a/examples/tiva/lm3s/Makefile.include +++ b/examples/tiva/lm3s/Makefile.include @@ -19,7 +19,7 @@ ## LIBNAME = opencm3_lm3s -DEFS = -DLM3S +DEFS += -DLM3S FP_FLAGS ?= -msoft-float ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) diff --git a/examples/tiva/lm4f/Makefile.include b/examples/tiva/lm4f/Makefile.include index de6b1af..cbe7b20 100644 --- a/examples/tiva/lm4f/Makefile.include +++ b/examples/tiva/lm4f/Makefile.include @@ -20,7 +20,7 @@ ## LIBNAME = opencm3_lm4f -DEFS = -DLM4F +DEFS += -DLM4F FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) diff --git a/examples/vf6xx/colibri-vf61/Makefile.include b/examples/vf6xx/colibri-vf61/Makefile.include index a9efe1e..31bece7 100644 --- a/examples/vf6xx/colibri-vf61/Makefile.include +++ b/examples/vf6xx/colibri-vf61/Makefile.include @@ -21,7 +21,7 @@ ## LIBNAME = opencm3_vf6xx -DEFS = -DVF6XX +DEFS += -DVF6XX FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS)