Skip to content

Commit 2314635

Browse files
Andrew Chenkarlp
authored andcommitted
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.
1 parent 070e5bb commit 2314635

File tree

13 files changed

+14
-14
lines changed

13 files changed

+14
-14
lines changed

examples/lpc/lpc13xx/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##
2020

2121
LIBNAME = opencm3_lpc13xx
22-
DEFS = -DLPC13XX
22+
DEFS += -DLPC13XX
2323

2424
FP_FLAGS ?= -msoft-float
2525
ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd

examples/lpc/lpc17xx/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
LIBNAME = opencm3_lpc17xx
23-
DEFS = -DLPC17XX
23+
DEFS += -DLPC17XX
2424

2525
FP_FLAGS ?= -msoft-float
2626
ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd

examples/lpc/lpc43xx/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
LIBNAME = opencm3_lpc43xx
25-
DEFS = -DLPC43XX
25+
DEFS += -DLPC43XX
2626

2727
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
2828
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS)

examples/stm32/f0/Makefile.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##
2020

2121
LIBNAME = opencm3_stm32f0
22-
DEFS = -DSTM32F0
22+
DEFS += -DSTM32F0
2323

2424
FP_FLAGS ?= -msoft-float
2525
ARCH_FLAGS = -mthumb -mcpu=cortex-m0 $(FP_FLAGS)
@@ -41,4 +41,4 @@ BMP_PORT ?=
4141
#STLINK_PORT ?= :4242
4242

4343

44-
include ../../../../Makefile.rules
44+
include ../../../../Makefile.rules

examples/stm32/f1/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##
2020

2121
LIBNAME = opencm3_stm32f1
22-
DEFS = -DSTM32F1
22+
DEFS += -DSTM32F1
2323

2424
FP_FLAGS ?= -msoft-float
2525
ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd

examples/stm32/f2/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
##
2121

2222
LIBNAME = opencm3_stm32f2
23-
DEFS = -DSTM32F2
23+
DEFS += -DSTM32F2
2424

2525
FP_FLAGS ?= -msoft-float
2626
ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd

examples/stm32/f3/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
##
2121

2222
LIBNAME = opencm3_stm32f3
23-
DEFS = -DSTM32F3
23+
DEFS += -DSTM32F3
2424

2525
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
2626
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS)

examples/stm32/f4/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
##
2121

2222
LIBNAME = opencm3_stm32f4
23-
DEFS = -DSTM32F4
23+
DEFS += -DSTM32F4
2424

2525
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
2626
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS)

examples/stm32/l0/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##
2020

2121
LIBNAME = opencm3_stm32l0
22-
DEFS = -DSTM32L0
22+
DEFS += -DSTM32L0
2323

2424
FP_FLAGS ?= -msoft-float
2525
ARCH_FLAGS = -mthumb -mcpu=cortex-m0plus $(FP_FLAGS)

examples/stm32/l1/Makefile.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##
2020

2121
LIBNAME = opencm3_stm32l1
22-
DEFS = -DSTM32L1
22+
DEFS += -DSTM32L1
2323

2424
FP_FLAGS ?= -msoft-float
2525
ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd

0 commit comments

Comments
 (0)