diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-10-08 23:08:53 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-10-11 23:17:41 +1100 |
commit | 17f2783e4aa4534823e2dc33e77389ad498f2d24 (patch) | |
tree | 7d35ac04c022084fe516bbb95dd6e353b1e325e7 /examples | |
parent | 8e912a501a926f59f330f8a71c2ac1bd4af88a9e (diff) | |
download | micropython-17f2783e4aa4534823e2dc33e77389ad498f2d24.tar.gz micropython-17f2783e4aa4534823e2dc33e77389ad498f2d24.zip |
all: Use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS.
This avoids a surprise where an = can cancel out an earlier +=.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/embedding/Makefile | 4 | ||||
-rw-r--r-- | examples/embedding/Makefile.upylib | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/embedding/Makefile b/examples/embedding/Makefile index 7de1219b26..edaa577f57 100644 --- a/examples/embedding/Makefile +++ b/examples/embedding/Makefile @@ -1,6 +1,6 @@ MPTOP = ../.. -CFLAGS = -std=c99 -I. -I$(MPTOP) -DNO_QSTR -LDFLAGS = -L./build +CFLAGS += -std=c99 -I. -I$(MPTOP) -DNO_QSTR +LDFLAGS += -L./build hello-embed: hello-embed.o -lmicropython diff --git a/examples/embedding/Makefile.upylib b/examples/embedding/Makefile.upylib index a8e2b91d56..99ce94b7ad 100644 --- a/examples/embedding/Makefile.upylib +++ b/examples/embedding/Makefile.upylib @@ -20,7 +20,7 @@ INC += -I$(BUILD) # compiler settings CWARN = -Wall -Werror CWARN += -Wpointer-arith -Wuninitialized -CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) +CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) # Some systems (eg MacOS) need -fno-common so that mp_state_ctx is placed in the BSS. CFLAGS += -fno-common @@ -70,7 +70,7 @@ else # Use gcc syntax for map file LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref endif -LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA) +LDFLAGS += $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA) ifeq ($(MICROPY_FORCE_32BIT),1) # Note: you may need to install i386 versions of dependency packages, |