diff --git a/boards/cc2538dk/Makefile.include b/boards/cc2538dk/Makefile.include index cca186c348..bdb3e9e2b5 100644 --- a/boards/cc2538dk/Makefile.include +++ b/boards/cc2538dk/Makefile.include @@ -35,4 +35,4 @@ FLASHFILE ?= $(BINFILE) DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) RESET_FLAGS ?= $(BINDIR) -export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb +OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb diff --git a/boards/common/msb-430/Makefile.include b/boards/common/msb-430/Makefile.include index 4e1bf6426c..24db7f1355 100644 --- a/boards/common/msb-430/Makefile.include +++ b/boards/common/msb-430/Makefile.include @@ -20,5 +20,4 @@ DEBUGSERVER_FLAGS = $(MSPDEBUGFLAGS) gdb DEBUGGER = $(PREFIX)gdb DEBUGGER_FLAGS = --tui --ex="target remote localhost:2000" --ex "monitor reset halt" --ex load -ex "monitor reset halt" $(ELFFILE) -# export common msb-430 includes -export INCLUDES += -I$(RIOTBOARD)/common/msb-430/include +INCLUDES += -I$(RIOTBOARD)/common/msb-430/include diff --git a/boards/common/msba2/Makefile.include b/boards/common/msba2/Makefile.include index 8b5342698e..3216878da5 100644 --- a/boards/common/msba2/Makefile.include +++ b/boards/common/msba2/Makefile.include @@ -19,13 +19,13 @@ PORT_DARWIN ?= /dev/tty.usbserial-ARM TERMFLAGS += -tg -p "$(PORT)" include $(RIOTMAKE)/tools/serial.inc.mk -export CFLAGS_CPU = -mcpu=arm7tdmi-s -export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums -export CFLAGS_DBG ?= -ggdb -g3 -export CFLAGS_OPT ?= -Os +CFLAGS_CPU = -mcpu=arm7tdmi-s +CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums +CFLAGS_DBG ?= -ggdb -g3 +CFLAGS_OPT ?= -Os -export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) -export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) +CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) +ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) export LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU).ld export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -nostartfiles export LINKFLAGS += -Wl,--gc-sections diff --git a/boards/common/remote/Makefile.include b/boards/common/remote/Makefile.include index fd85d213aa..4d5c2a9944 100644 --- a/boards/common/remote/Makefile.include +++ b/boards/common/remote/Makefile.include @@ -23,10 +23,10 @@ endif OFLAGS = --gap-fill 0xff FLASHFILE ?= $(BINFILE) DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) -export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb +OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb # include common remote includes -export INCLUDES += -I$(RIOTBOARD)/common/remote/include +INCLUDES += -I$(RIOTBOARD)/common/remote/include # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/common/silabs/Makefile.include b/boards/common/silabs/Makefile.include index f62e5fec7f..b3880891b6 100644 --- a/boards/common/silabs/Makefile.include +++ b/boards/common/silabs/Makefile.include @@ -1,2 +1,2 @@ -export INCLUDES += -I$(RIOTBOARD)/common/silabs/include -export INCLUDES += -I$(RIOTBOARD)/common/silabs/drivers/include +INCLUDES += -I$(RIOTBOARD)/common/silabs/include +INCLUDES += -I$(RIOTBOARD)/common/silabs/drivers/include diff --git a/boards/common/wsn430/Makefile.include b/boards/common/wsn430/Makefile.include index 57881a1e99..8fa4aa992c 100644 --- a/boards/common/wsn430/Makefile.include +++ b/boards/common/wsn430/Makefile.include @@ -1,7 +1,7 @@ # include this module in the build USEMODULE += boards_common_wsn430 # use common wsn430 includes -export INCLUDES += -I$(RIOTBOARD)/common/wsn430/include +INCLUDES += -I$(RIOTBOARD)/common/wsn430/include # configure the serial interface PORT_LINUX ?= /dev/ttyUSB0 diff --git a/boards/hamilton/Makefile.include b/boards/hamilton/Makefile.include index b253623185..c88822cb9d 100644 --- a/boards/hamilton/Makefile.include +++ b/boards/hamilton/Makefile.include @@ -1,7 +1,7 @@ # debugger config export JLINK_DEVICE := atsamr21e18a -export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb -export OFLAGS := --gap-fill 0xff +OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb +OFLAGS := --gap-fill 0xff # Configure terminal, hamilton doesn't provide any UART, thus use RTT TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 19ad94aae1..8714775def 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -21,30 +21,30 @@ export CGANNOTATE ?= cg_annotate export GPROF ?= gprof # basic cflags: -export CFLAGS += -Wall -Wextra -pedantic +CFLAGS += -Wall -Wextra -pedantic # default std set to gnu99 of not overwritten by user ifeq (,$(filter -std=%, $(CFLAGS))) - export CFLAGS += -std=gnu99 + CFLAGS += -std=gnu99 endif ifeq ($(shell uname -m),x86_64) - export CFLAGS += -m32 + CFLAGS += -m32 endif ifneq (,$(filter -DDEVELHELP,$(CFLAGS))) - export CFLAGS += -fstack-protector-all + CFLAGS += -fstack-protector-all endif ifeq ($(shell uname -s),FreeBSD) ifeq ($(shell uname -m),amd64) - export CFLAGS += -m32 -DCOMPAT_32BIT -B/usr/lib32 + CFLAGS += -m32 -DCOMPAT_32BIT -B/usr/lib32 endif endif ifeq ($(shell uname -s),Darwin) - export CFLAGS += -Wno-deprecated-declarations + CFLAGS += -Wno-deprecated-declarations endif # unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ -export CXXUWFLAGS += -export CXXEXFLAGS += +CXXUWFLAGS += +CXXEXFLAGS += ifeq ($(shell uname -m),x86_64) export LINKFLAGS += -m32 @@ -59,7 +59,7 @@ else endif # clean up unused functions -export CFLAGS += -ffunction-sections -fdata-sections +CFLAGS += -ffunction-sections -fdata-sections ifeq ($(shell uname -s),Darwin) export LINKFLAGS += -Wl,-dead_strip else @@ -76,7 +76,7 @@ endif TERMFLAGS := $(PORT) $(TERMFLAGS) -export ASFLAGS = +ASFLAGS = ifeq ($(shell basename $(DEBUGGER)),lldb) DEBUGGER_FLAGS = -- $(ELFFILE) $(TERMFLAGS) else @@ -92,23 +92,23 @@ debug-valgrind-server: export VALGRIND_FLAGS ?= --vgdb=yes --vgdb-error=0 -v \ --read-var-info=yes term-cachegrind: export CACHEGRIND_FLAGS += --tool=cachegrind term-gprof: TERMPROG = GMON_OUT_PREFIX=gmon.out $(ELFFILE) -all-valgrind: export CFLAGS += -DHAVE_VALGRIND_H -g3 +all-valgrind: CFLAGS += -DHAVE_VALGRIND_H -g3 all-valgrind: export NATIVEINCLUDES += $(shell pkg-config valgrind --cflags) -all-debug: export CFLAGS += -g3 -all-cachegrind: export CFLAGS += -g3 -all-gprof: export CFLAGS += -pg +all-debug: CFLAGS += -g3 +all-cachegrind: CFLAGS += -g3 +all-gprof: CFLAGS += -pg all-gprof: export LINKFLAGS += -pg -all-asan: export CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g3 -all-asan: export CFLAGS += -DNATIVE_IN_CALLOC +all-asan: CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g3 +all-asan: CFLAGS += -DNATIVE_IN_CALLOC all-asan: export LINKFLAGS += -fsanitize=address -fno-omit-frame-pointer -g3 -export INCLUDES += $(NATIVEINCLUDES) +INCLUDES += $(NATIVEINCLUDES) -export CFLAGS += -DDEBUG_ASSERT_VERBOSE +CFLAGS += -DDEBUG_ASSERT_VERBOSE # workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 ifneq ($(shell gcc --version | head -1 | grep -E ' (4.6|4.7)'),) - export CFLAGS += -DHAVE_NO_BUILTIN_BSWAP16 + CFLAGS += -DHAVE_NO_BUILTIN_BSWAP16 endif # backward compatability with glibc <= 2.17 for native diff --git a/boards/openmote-b/Makefile.include b/boards/openmote-b/Makefile.include index d1c835b127..5f37a86536 100644 --- a/boards/openmote-b/Makefile.include +++ b/boards/openmote-b/Makefile.include @@ -26,7 +26,7 @@ else ifeq ($(PROGRAMMER),jlink) include $(RIOTMAKE)/tools/jlink.inc.mk endif -export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb +OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/boards/saml10-xpro/Makefile.include b/boards/saml10-xpro/Makefile.include index 34d32c3383..e33947745c 100644 --- a/boards/saml10-xpro/Makefile.include +++ b/boards/saml10-xpro/Makefile.include @@ -1,4 +1,4 @@ export CPU_FAM = saml10 -export CFLAGS += -D__SAML10E16A__ +CFLAGS += -D__SAML10E16A__ include $(RIOTBOARD)/common/saml1x/Makefile.include diff --git a/boards/saml11-xpro/Makefile.include b/boards/saml11-xpro/Makefile.include index 59e407b0e1..c24adbef10 100644 --- a/boards/saml11-xpro/Makefile.include +++ b/boards/saml11-xpro/Makefile.include @@ -1,4 +1,4 @@ export CPU_FAM = saml11 -export CFLAGS += -D__SAML11E16A__ +CFLAGS += -D__SAML11E16A__ include $(RIOTBOARD)/common/saml1x/Makefile.include diff --git a/boards/saml21-xpro/Makefile.include b/boards/saml21-xpro/Makefile.include index 4ccc713f7d..56e111043a 100644 --- a/boards/saml21-xpro/Makefile.include +++ b/boards/saml21-xpro/Makefile.include @@ -1,4 +1,4 @@ -export CFLAGS += -D__SAML21J18A__ +CFLAGS += -D__SAML21J18A__ # set edbg device type EDBG_DEVICE_TYPE = atmel_cm0p diff --git a/boards/slwstk6000b/Makefile.include b/boards/slwstk6000b/Makefile.include index fcb83ee567..7993d0d7ce 100644 --- a/boards/slwstk6000b/Makefile.include +++ b/boards/slwstk6000b/Makefile.include @@ -1,7 +1,7 @@ include $(RIOTBOARD)/slwstk6000b/module-info.mk # add module specific includes -export INCLUDES += -I$(RIOTBOARD)/slwstk6000b/modules/$(BOARD_MODULE)/include +INCLUDES += -I$(RIOTBOARD)/slwstk6000b/modules/$(BOARD_MODULE)/include # define the cpu used by SLWSTK6000B export CPU = efm32