1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: do not locally export compilation variables

These are already exported by `makefiles/vars.inc.mk`.
It is a prerequisite to allow handling compilation without global exports.
This commit is contained in:
Gaëtan Harter 2019-08-27 16:06:41 +02:00
parent 34f69245c3
commit ef542ef92c
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
13 changed files with 39 additions and 40 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
export CPU_FAM = saml10
export CFLAGS += -D__SAML10E16A__
CFLAGS += -D__SAML10E16A__
include $(RIOTBOARD)/common/saml1x/Makefile.include

View File

@ -1,4 +1,4 @@
export CPU_FAM = saml11
export CFLAGS += -D__SAML11E16A__
CFLAGS += -D__SAML11E16A__
include $(RIOTBOARD)/common/saml1x/Makefile.include

View File

@ -1,4 +1,4 @@
export CFLAGS += -D__SAML21J18A__
CFLAGS += -D__SAML21J18A__
# set edbg device type
EDBG_DEVICE_TYPE = atmel_cm0p

View File

@ -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