mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #8822 from aabadie/pr/make_curly
make: replace curly braces with parenthesis
This commit is contained in:
commit
21a9958323
4
Makefile
4
Makefile
@ -20,11 +20,11 @@ docclean:
|
||||
|
||||
clean:
|
||||
@echo "Cleaning all build products for the current board"
|
||||
@find ./examples/ ./tests/ -maxdepth 2 -mindepth 2 -type f -name Makefile -execdir "${MAKE}" clean ';'
|
||||
@find ./examples/ ./tests/ -maxdepth 2 -mindepth 2 -type f -name Makefile -execdir "$(MAKE)" clean ';'
|
||||
|
||||
distclean: docclean
|
||||
@echo "Cleaning all build products"
|
||||
@find ./examples/ ./tests/ -maxdepth 2 -mindepth 2 -type f -name Makefile -execdir "${MAKE}" distclean ';'
|
||||
@find ./examples/ ./tests/ -maxdepth 2 -mindepth 2 -type f -name Makefile -execdir "$(MAKE)" distclean ';'
|
||||
|
||||
welcome:
|
||||
@echo "Welcome to RIOT - The friendly OS for IoT!"
|
||||
|
@ -3,24 +3,24 @@ ifeq (, $(__RIOTBUILD_FLAG))
|
||||
endif
|
||||
|
||||
unexport DIRS
|
||||
DIRS := $(sort $(abspath ${DIRS}))
|
||||
DIRS := $(sort $(abspath $(DIRS)))
|
||||
|
||||
MODULE ?= $(shell basename $(CURDIR))
|
||||
|
||||
.PHONY: all ${DIRS:%=ALL--%} ${DIRS:%=CLEAN--%}
|
||||
.PHONY: all $(DIRS:%=ALL--%) $(DIRS:%=CLEAN--%)
|
||||
|
||||
all: $(BINDIR)/$(MODULE).a ..nothing
|
||||
|
||||
..nothing:
|
||||
@:
|
||||
|
||||
clean:: ${DIRS:%=CLEAN--%}
|
||||
clean:: $(DIRS:%=CLEAN--%)
|
||||
|
||||
${DIRS:%=ALL--%}:
|
||||
$(QQ)"$(MAKE)" -C ${@:ALL--%=%}
|
||||
$(DIRS:%=ALL--%):
|
||||
$(QQ)"$(MAKE)" -C $(@:ALL--%=%)
|
||||
|
||||
${DIRS:%=CLEAN--%}:
|
||||
$(QQ)"$(MAKE)" -C ${@:CLEAN--%=%} clean
|
||||
$(DIRS:%=CLEAN--%):
|
||||
$(QQ)"$(MAKE)" -C $(@:CLEAN--%=%) clean
|
||||
|
||||
## submodules
|
||||
ifeq (1, $(SUBMODULES))
|
||||
@ -67,7 +67,7 @@ $(BINDIR)/$(MODULE)/:
|
||||
|
||||
$(BINDIR)/$(MODULE).a $(OBJ): | $(BINDIR)/$(MODULE)/
|
||||
|
||||
$(BINDIR)/$(MODULE).a: $(OBJ) | ${DIRS:%=ALL--%}
|
||||
$(BINDIR)/$(MODULE).a: $(OBJ) | $(DIRS:%=ALL--%)
|
||||
@# Recreate archive to cleanup deleted/non selected source files objects
|
||||
$(Q)$(RM) $@
|
||||
$(Q)$(AR) $(ARFLAGS) $@ $^
|
||||
|
@ -49,17 +49,17 @@ override PKGDIRBASE := $(abspath $(PKGDIRBASE))
|
||||
override DLCACHE_DIR := $(abspath $(DLCACHE_DIR))
|
||||
|
||||
# Ensure that all directories are set and don't contain spaces.
|
||||
ifneq (, $(filter-out 1, $(foreach v,${__DIRECTORY_VARIABLES},$(words ${${v}}))))
|
||||
ifneq (, $(filter-out 1, $(foreach v,$(__DIRECTORY_VARIABLES),$(words $($(v))))))
|
||||
$(info Aborting compilation for your safety.)
|
||||
$(info Related variables = ${__DIRECTORY_VARIABLES})
|
||||
$(info Related variables = $(__DIRECTORY_VARIABLES))
|
||||
$(error Make sure no path override is empty or contains spaces!)
|
||||
endif
|
||||
|
||||
# Use absolute paths in recusive "make" even if overriden on command line.
|
||||
MAKEOVERRIDES += $(foreach v,${__DIRECTORY_VARIABLES},${v}=${${v}})
|
||||
MAKEOVERRIDES += $(foreach v,$(__DIRECTORY_VARIABLES),$(v)=$($(v)))
|
||||
|
||||
# Path to the current directory relative to RIOTPROJECT
|
||||
BUILDRELPATH ?= ${PWD:${RIOTPROJECT}/%=%}/
|
||||
BUILDRELPATH ?= $(PWD:$(RIOTPROJECT)/%=%)/
|
||||
|
||||
# get host operating system
|
||||
OS := $(shell uname)
|
||||
@ -136,7 +136,7 @@ endif
|
||||
CFLAGS += -Wno-implicit-fallthrough
|
||||
CXXFLAGS += -Wno-implicit-fallthrough
|
||||
|
||||
ifneq (10,$(if ${RIOT_VERSION},1,0)$(if ${__RIOTBUILD_FLAG},1,0))
|
||||
ifneq (10,$(if $(RIOT_VERSION),1,0)$(if $(__RIOTBUILD_FLAG),1,0))
|
||||
|
||||
# Provide a shallow sanity check. You cannot call `make` in a module directory.
|
||||
export __RIOTBUILD_FLAG := RIOT
|
||||
@ -181,7 +181,7 @@ ifeq (,$(UNZIP_HERE))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (, ${APPLICATION})
|
||||
ifeq (, $(APPLICATION))
|
||||
$(error An application name must be specified as APPLICATION.)
|
||||
endif
|
||||
ifneq (0,$(shell test -d $(RIOTBOARD)/$(BOARD); echo $$?))
|
||||
@ -324,7 +324,7 @@ ifeq ($(BUILD_IN_DOCKER),1)
|
||||
link: ..in-docker-container
|
||||
else
|
||||
## make script for your application. Build RIOT-base here!
|
||||
link: ..compiler-check ..build-message $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=${BINDIR}/%.a) $(APPDEPS)
|
||||
link: ..compiler-check ..build-message $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS)
|
||||
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
|
||||
ifeq (,$(RIOTNOLINK))
|
||||
ifeq ($(BUILDOSXNATIVE),1)
|
||||
@ -340,11 +340,11 @@ endif # BUILD_IN_DOCKER
|
||||
..compiler-check:
|
||||
@command -v $(CC) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Compiler $(CC) is required but not found in PATH. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Compiler $(CC) is required but not found in PATH. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
|
||||
..build-message:
|
||||
@$(COLOR_ECHO) '${COLOR_GREEN}Building application "$(APPLICATION)" for "$(BOARD)" with MCU "$(MCU)".${COLOR_RESET}'
|
||||
@$(COLOR_ECHO) '$(COLOR_GREEN)Building application "$(APPLICATION)" for "$(BOARD)" with MCU "$(MCU)".$(COLOR_RESET)'
|
||||
@$(COLOR_ECHO)
|
||||
|
||||
# add extra include paths for packages in $(USEMODULE)
|
||||
@ -369,13 +369,13 @@ USEMODULE_INCLUDES_ = $(shell echo $(USEMODULE_INCLUDES) | tr ' ' '\n' | awk '!a
|
||||
|
||||
INCLUDES += $(USEMODULE_INCLUDES_:%=-I%)
|
||||
|
||||
.PHONY: pkg-prepare $(USEPKG:%=${BINDIR}/%.a)
|
||||
.PHONY: pkg-prepare $(USEPKG:%=$(BINDIR)/%.a)
|
||||
pkg-prepare:
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i prepare ; done
|
||||
|
||||
$(USEPKG:%=${BINDIR}/%.a): $(RIOTBUILD_CONFIG_HEADER_C) pkg-prepare
|
||||
@mkdir -p ${BINDIR}
|
||||
$(QQ)"$(MAKE)" -C $(RIOTPKG)/$(patsubst ${BINDIR}/%.a,%,$@)
|
||||
$(USEPKG:%=$(BINDIR)/%.a): $(RIOTBUILD_CONFIG_HEADER_C) pkg-prepare
|
||||
@mkdir -p $(BINDIR)
|
||||
$(QQ)"$(MAKE)" -C $(RIOTPKG)/$(patsubst $(BINDIR)/%.a,%,$@)
|
||||
|
||||
clean:
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i clean ; done
|
||||
@ -402,7 +402,7 @@ endif
|
||||
flash: $(BUILD_BEFORE_FLASH) $(FLASHDEPS)
|
||||
@command -v $(FLASHER) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Flash program $(FLASHER) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Flash program $(FLASHER) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(FLASHER) $(FFLAGS)
|
||||
|
||||
@ -414,7 +414,7 @@ preflash: $(BUILD_BEFORE_FLASH)
|
||||
term: $(filter flash, $(MAKECMDGOALS)) $(TERMDEPS)
|
||||
@command -v $(TERMPROG) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Terminal program $(TERMPROG) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Terminal program $(TERMPROG) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(TERMPROG) $(TERMFLAGS)
|
||||
|
||||
@ -427,28 +427,28 @@ doc:
|
||||
debug:
|
||||
@command -v $(DEBUGGER) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Debug program $(DEBUGGER) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Debug program $(DEBUGGER) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(DEBUGGER) $(DEBUGGER_FLAGS)
|
||||
|
||||
debug-server:
|
||||
@command -v $(DEBUGSERVER) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Debug server program $(DEBUGSERVER) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Debug server program $(DEBUGSERVER) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(DEBUGSERVER) $(DEBUGSERVER_FLAGS)
|
||||
|
||||
emulate:
|
||||
@command -v $(EMULATOR) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Emulation program $(EMULATOR) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Emulation program $(EMULATOR) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(EMULATOR) $(EMULATOR_FLAGS)
|
||||
|
||||
reset:
|
||||
@command -v $(RESET) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Reset program $(RESET) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Reset program $(RESET) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(RESET) $(RESET_FLAGS)
|
||||
|
||||
@ -458,7 +458,7 @@ OBJDUMPFLAGS ?= -S -D -h
|
||||
objdump:
|
||||
@command -v $(OBJDUMP) >/dev/null 2>&1 || \
|
||||
{ $(COLOR_ECHO) \
|
||||
'${COLOR_RED}Objdump program $(OBJDUMP) not found. Aborting.${COLOR_RESET}'; \
|
||||
'$(COLOR_RED)Objdump program $(OBJDUMP) not found. Aborting.$(COLOR_RESET)'; \
|
||||
exit 1; }
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $(ELFFILE) | less
|
||||
|
||||
@ -513,7 +513,7 @@ ifneq (, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
|
||||
# If there is a whitelist, then test if the board is whitelisted.
|
||||
ifneq (, $(BOARD_WHITELIST))
|
||||
ifeq (, $(filter $(BOARD_WHITELIST), $(BOARD)))
|
||||
$(shell $(COLOR_ECHO) "$(COLOR_RED)The selected BOARD=${BOARD} is not whitelisted:$(COLOR_RESET) ${BOARD_WHITELIST}" 1>&2)
|
||||
$(shell $(COLOR_ECHO) "$(COLOR_RED)The selected BOARD=$(BOARD) is not whitelisted:$(COLOR_RESET) $(BOARD_WHITELIST)" 1>&2)
|
||||
EXPECT_ERRORS := 1
|
||||
endif
|
||||
endif
|
||||
@ -521,7 +521,7 @@ ifneq (, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
|
||||
# If there is a blacklist, then test if the board is blacklisted.
|
||||
ifneq (, $(BOARD_BLACKLIST))
|
||||
ifneq (, $(filter $(BOARD_BLACKLIST), $(BOARD)))
|
||||
$(shell $(COLOR_ECHO) "$(COLOR_RED)The selected BOARD=${BOARD} is blacklisted:$(COLOR_RESET) ${BOARD_BLACKLIST}" 1>&2)
|
||||
$(shell $(COLOR_ECHO) "$(COLOR_RED)The selected BOARD=$(BOARD) is blacklisted:$(COLOR_RESET) $(BOARD_BLACKLIST)" 1>&2)
|
||||
EXPECT_ERRORS := 1
|
||||
endif
|
||||
endif
|
||||
@ -541,13 +541,13 @@ else # RIOT_VERSION
|
||||
export __RIOTBUILD_FLAG := RIOT
|
||||
|
||||
NUM_RIOT_VERSION := $(shell cd $(RIOTBASE) && git rev-parse --verify --short "$(RIOT_VERSION)" 2>/dev/null)
|
||||
ifeq (, ${NUM_RIOT_VERSION})
|
||||
ifeq (, $(NUM_RIOT_VERSION))
|
||||
$(error The supplied RIOT_VERSION=$(RIOT_VERSION) is invalid!)
|
||||
endif
|
||||
|
||||
all $(filter-out clean, ${MAKECMDGOALS}): ..delegate
|
||||
all $(filter-out clean, $(MAKECMDGOALS)): ..delegate
|
||||
ifneq (, $(filter clean, $(MAKECMDGOALS)))
|
||||
all $(filter-out clean, ${MAKECMDGOALS}): clean
|
||||
all $(filter-out clean, $(MAKECMDGOALS)): clean
|
||||
endif
|
||||
|
||||
clean:
|
||||
@ -559,9 +559,9 @@ else # RIOT_VERSION
|
||||
$(Q)cd $(RIOTBASE) && git archive --format=tar $(NUM_RIOT_VERSION) | ( cd $(@D) && tar x 1>&2 )
|
||||
|
||||
..delegate: $(BINDIR)/riot-version/$(NUM_RIOT_VERSION)/Makefile.include
|
||||
@$(COLOR_ECHO) '$(COLOR_GREEN)Using RIOT_VERSION=${NUM_RIOT_VERSION}$(COLOR_RESET)' 1>&2
|
||||
@$(COLOR_ECHO) '$(COLOR_GREEN)Using RIOT_VERSION=$(NUM_RIOT_VERSION)$(COLOR_RESET)' 1>&2
|
||||
@$(COLOR_ECHO)
|
||||
$(MAKE) RIOTBASE=$(<D) $(filter-out clean, ${MAKECMDGOALS})
|
||||
$(MAKE) RIOTBASE=$(<D) $(filter-out clean, $(MAKECMDGOALS))
|
||||
|
||||
endif
|
||||
|
||||
|
@ -12,7 +12,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
# setup the flash tool used
|
||||
ifeq ($(PROGRAMMER),jlink)
|
||||
# in case J-Link is attached to SWD pins, use a plain CPU memory model
|
||||
export JLINK_DEVICE := ${MKR_JLINK_DEVICE}
|
||||
export JLINK_DEVICE := $(MKR_JLINK_DEVICE)
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
else
|
||||
# by default, we use BOSSA to flash this board and take into account the
|
||||
|
@ -5,10 +5,10 @@ prefix=/usr/local
|
||||
all: lpc2k_pgm pseudoterm
|
||||
|
||||
SRC = lpc2k_pgm.c download.c uuencode.c ihex.c serial.c chipinfo.c boot_2xxx.c boot_23xx.c control_2xxx.c
|
||||
OBJS = ${addprefix obj/,${patsubst %.c,%.o,$(SRC)}}
|
||||
OBJS = $(addprefix obj/,$(patsubst %.c,%.o,$(SRC)))
|
||||
|
||||
PSEUDOTERM_SRC = pseudoterm.c serial.c control_2xxx.c
|
||||
PSEUDOTERM_OBJS = ${addprefix obj/,${patsubst %.c,%.o,$(PSEUDOTERM_SRC)}}
|
||||
PSEUDOTERM_OBJS = $(addprefix obj/,$(patsubst %.c,%.o,$(PSEUDOTERM_SRC)))
|
||||
|
||||
TARGETDIR = bin
|
||||
|
||||
|
@ -110,7 +110,7 @@ term-valgrind: export VALGRIND_FLAGS ?= \
|
||||
--fullpath-after=$(RIOTBASE)/ \
|
||||
--read-var-info=yes
|
||||
debug-valgrind-server: export VALGRIND_FLAGS ?= --vgdb=yes --vgdb-error=0 -v \
|
||||
--leak-check=full --track-origins=yes --fullpath-after=${RIOTBASE} \
|
||||
--leak-check=full --track-origins=yes --fullpath-after=$(RIOTBASE) \
|
||||
--read-var-info=yes
|
||||
term-cachegrind: export CACHEGRIND_FLAGS += --tool=cachegrind
|
||||
term-gprof: export TERMPROG = GMON_OUT_PREFIX=gmon.out $(ELFFILE)
|
||||
@ -167,8 +167,8 @@ debug-valgrind-server:
|
||||
$(VALGRIND) $(VALGRIND_FLAGS) $(ELFFILE) $(PORT)
|
||||
|
||||
debug-valgrind:
|
||||
$(eval VALGRIND_PID ?= $(shell pgrep -n memcheck-x86-li -u ${USER} | cut -d" " -f1))
|
||||
$(eval DEBUGGER_FLAGS := -ex "target remote | vgdb --pid=${VALGRIND_PID}" $(DEBUGGER_FLAGS))
|
||||
$(eval VALGRIND_PID ?= $(shell pgrep -n memcheck-x86-li -u $(USER) | cut -d" " -f1))
|
||||
$(eval DEBUGGER_FLAGS := -ex "target remote | vgdb --pid=$(VALGRIND_PID)" $(DEBUGGER_FLAGS))
|
||||
$(DEBUGGER) $(DEBUGGER_FLAGS)
|
||||
|
||||
term-cachegrind:
|
||||
|
@ -3,7 +3,7 @@ RIOTBASE=$(shell git rev-parse --show-toplevel)
|
||||
export STRIP_FROM_INC_PATH_LIST=$(shell \
|
||||
git ls-tree -dr --full-tree --name-only HEAD core drivers sys |\
|
||||
grep '/include$$' |\
|
||||
sed 's/.*/\"$(subst /,\/,${RIOTBASE})\/\0\"/')
|
||||
sed 's/.*/\"$(subst /,\/,$(RIOTBASE))\/\0\"/')
|
||||
|
||||
# use lessc (http://lesscss.org/#using-less) for compiling CSS, alternatively
|
||||
# fall back to lesscpy (https://github.com/lesscpy/lesscpy)
|
||||
|
@ -1,3 +1,3 @@
|
||||
DIRS += $(dir $(wildcard $(addsuffix /Makefile, ${USEMODULE})))
|
||||
DIRS += $(dir $(wildcard $(addsuffix /Makefile, $(USEMODULE))))
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -7,14 +7,14 @@ buildtest:
|
||||
@ \
|
||||
RESULT=true ; \
|
||||
for board in $(BOARDS); do \
|
||||
${COLOR_ECHO} -n "Building for $$board ... " ; \
|
||||
$(COLOR_ECHO) -n "Building for $$board ... " ; \
|
||||
BOARD=$${board} RIOT_CI_BUILD=1 RIOT_VERSION_OVERRIDE=buildtest \
|
||||
$(MAKE) clean all -j $(NPROC) >/dev/null 2>&1; \
|
||||
RES=$$? ; \
|
||||
if [ $$RES -eq 0 ]; then \
|
||||
${COLOR_ECHO} "$(COLOR_GREEN)success.${COLOR_RESET}" ; \
|
||||
$(COLOR_ECHO) "$(COLOR_GREEN)success.$(COLOR_RESET)" ; \
|
||||
else \
|
||||
${COLOR_ECHO} "$(COLOR_RED)failed!${COLOR_RESET}" ; \
|
||||
$(COLOR_ECHO) "$(COLOR_RED)failed!$(COLOR_RESET)" ; \
|
||||
RESULT=false ; \
|
||||
fi ; \
|
||||
$(MAKE) clean-intermediates >/dev/null 2>&1 || true; \
|
||||
|
@ -51,7 +51,7 @@ CXXUWFLAGS += -std=%
|
||||
ifeq ($(LTO),1)
|
||||
$(warning Building with Link-Time-Optimizations is currently an experimental feature. Expect broken binaries.)
|
||||
LTOFLAGS = -flto
|
||||
LINKFLAGS += ${LTOFLAGS}
|
||||
LINKFLAGS += $(LTOFLAGS)
|
||||
endif
|
||||
|
||||
# Forbid common symbols to prevent accidental aliasing.
|
||||
|
@ -87,7 +87,7 @@ DOCKER_OVERRIDE_CMDLINE := $(strip $(DOCKER_OVERRIDE_CMDLINE))
|
||||
# The `flash`, `term`, `debugserver` etc. targets usually require access to
|
||||
# hardware which may not be reachable from inside the container.
|
||||
..in-docker-container:
|
||||
@$(COLOR_ECHO) '${COLOR_GREEN}Launching build container using image "$(DOCKER_IMAGE)".${COLOR_RESET}'
|
||||
@$(COLOR_ECHO) '$(COLOR_GREEN)Launching build container using image "$(DOCKER_IMAGE)".$(COLOR_RESET)'
|
||||
docker run $(DOCKER_FLAGS) -t -u "$$(id -u)" \
|
||||
-v '$(RIOTBASE):$(DOCKER_BUILD_ROOT)/riotbase' \
|
||||
-v '$(RIOTCPU):$(DOCKER_BUILD_ROOT)/riotcpu' \
|
||||
|
@ -8,7 +8,7 @@ FEATURES_OPTIONAL_GLOBAL := $(FEATURES_OPTIONAL)
|
||||
DISABLE_MODULE_GLOBAL := $(DISABLE_MODULE_GLOBAL)
|
||||
|
||||
define board_missing_features
|
||||
BOARD := ${1}
|
||||
BOARD := $(1)
|
||||
USEMODULE := $(USEMODULE_GLOBAL)
|
||||
USEPKG := $(USEPKG_GLOBAL)
|
||||
DISABLE_MODULE := $(DISABLE_MODULE_GLOBAL)
|
||||
@ -16,21 +16,21 @@ define board_missing_features
|
||||
FEATURES_OPTIONAL := $(FEATURES_OPTIONAL_GLOBAL)
|
||||
FEATURES_MISSING :=
|
||||
FEATURES_PROVIDED :=
|
||||
include $${RIOTBOARD}/${1}/Makefile.features
|
||||
include $$(RIOTBOARD)/$(1)/Makefile.features
|
||||
ifdef BUILDTEST_MCU_GROUP
|
||||
ifneq ($(BUILDTEST_MCU_GROUP), $$(FEATURES_MCU_GROUP))
|
||||
BOARDS_FEATURES_MISSING += "${1} ${BUILDTEST_MCU_GROUP}"
|
||||
BOARDS_WITH_MISSING_FEATURES += ${1}
|
||||
BOARDS_FEATURES_MISSING += "$(1) $(BUILDTEST_MCU_GROUP)"
|
||||
BOARDS_WITH_MISSING_FEATURES += $(1)
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(RIOTBASE)/Makefile.dep
|
||||
|
||||
FEATURES_MISSING := $$(sort $$(filter-out $$(FEATURES_PROVIDED), $$(FEATURES_REQUIRED)))
|
||||
ifneq (, $${FEATURES_MISSING})
|
||||
BOARDS_FEATURES_MISSING += "${1} $${FEATURES_MISSING}"
|
||||
ifneq (, $$(FEATURES_MISSING))
|
||||
BOARDS_FEATURES_MISSING += "$(1) $$(FEATURES_MISSING)"
|
||||
ifneq (, $$(filter-out $$(FEATURES_OPTIONAL), $$(FEATURES_MISSING)))
|
||||
BOARDS_WITH_MISSING_FEATURES += ${1}
|
||||
BOARDS_WITH_MISSING_FEATURES += $(1)
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
@ -47,14 +47,14 @@ BOARDS := $(filter-out $(BOARDS_WITH_MISSING_FEATURES), $(BOARDS))
|
||||
info-buildsizes: SHELL=bash
|
||||
info-buildsizes:
|
||||
@echo -e " text\t data\t bss\t dec\tboard"; \
|
||||
for board in ${BOARDS}; do \
|
||||
for board in $(BOARDS); do \
|
||||
echo "$$(BOARD=$${board} $(MAKE) --no-print-directory info-buildsize 2>/dev/null | tail -n-1 | cut -f-4)" "$${board}"; \
|
||||
done;
|
||||
|
||||
info-buildsizes-diff: SHELL=bash
|
||||
info-buildsizes-diff:
|
||||
@echo -e "text\tdata\tbss\tdec\tBOARD/BINDIRBASE\n"; \
|
||||
for board in ${BOARDS}; do \
|
||||
for board in $(BOARDS); do \
|
||||
for BINDIRBASE in $${OLDBIN} $${NEWBIN}; do \
|
||||
BINDIRBASE=$${BINDIRBASE} BOARD=$${board} $(MAKE) info-buildsize --no-print-directory 2>/dev/null | tail -n-1 | cut -f-4; \
|
||||
done | \
|
||||
@ -62,16 +62,16 @@ info-buildsizes-diff:
|
||||
for I in 0 1 2 3; do \
|
||||
if [[ -n "$${NEW[I]}" && -n "$${OLD[I]}" ]]; then \
|
||||
DIFF=$$(($${NEW[I]} - $${OLD[I]})); \
|
||||
if [[ "$${DIFF}" -gt 0 ]]; then $(COLOR_ECHO) -n "${COLOR_RED}"; fi; \
|
||||
if [[ "$${DIFF}" -lt 0 ]]; then $(COLOR_ECHO) -n "${COLOR_GREEN}"; fi; \
|
||||
if [[ "$${DIFF}" -gt 0 ]]; then $(COLOR_ECHO) -n "$(COLOR_RED)"; fi; \
|
||||
if [[ "$${DIFF}" -lt 0 ]]; then $(COLOR_ECHO) -n "$(COLOR_GREEN)"; fi; \
|
||||
else \
|
||||
DIFF="${COLOR_RED}ERR"; \
|
||||
DIFF="$(COLOR_RED)ERR"; \
|
||||
fi; \
|
||||
echo -ne "$${DIFF}\t${COLOR_RESET}"; \
|
||||
echo -ne "$${DIFF}\t$(COLOR_RESET)"; \
|
||||
done; \
|
||||
echo "$${board}"; \
|
||||
for I in 0 1 2 3; do echo -ne "$${OLD[I]-${COLOR_RED}ERR${COLOR_RESET}}\t"; done; echo -e "$${OLDBIN}"; \
|
||||
for I in 0 1 2 3; do echo -ne "$${NEW[I]-${COLOR_RED}ERR${COLOR_RESET}}\t"; done; echo -e "$${NEWBIN}\n"; \
|
||||
for I in 0 1 2 3; do echo -ne "$${OLD[I]-$(COLOR_RED)ERR$(COLOR_RESET)}\t"; done; echo -e "$${OLDBIN}"; \
|
||||
for I in 0 1 2 3; do echo -ne "$${NEW[I]-$(COLOR_RED)ERR$(COLOR_RESET)}\t"; done; echo -e "$${NEWBIN}\n"; \
|
||||
done; \
|
||||
done;
|
||||
|
||||
|
@ -19,10 +19,10 @@ ifneq (, $(filter buildtest info-concurrency, $(MAKECMDGOALS)))
|
||||
NPROC := $(shell echo $$(($(NPROC) + 1)))
|
||||
|
||||
ifneq (, $(NPROC_MAX))
|
||||
NPROC := $(shell if [ ${NPROC} -gt $(NPROC_MAX) ]; then echo $(NPROC_MAX); else echo ${NPROC}; fi)
|
||||
NPROC := $(shell if [ $(NPROC) -gt $(NPROC_MAX) ]; then echo $(NPROC_MAX); else echo $(NPROC); fi)
|
||||
endif
|
||||
ifneq (, $(NPROC_MIN))
|
||||
NPROC := $(shell if [ ${NPROC} -lt $(NPROC_MIN) ]; then echo $(NPROC_MIN); else echo ${NPROC}; fi)
|
||||
NPROC := $(shell if [ $(NPROC) -lt $(NPROC_MIN) ]; then echo $(NPROC_MIN); else echo $(NPROC); fi)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -3,7 +3,7 @@
|
||||
info-features-provided info-features-required
|
||||
|
||||
info-objsize:
|
||||
@case "${SORTROW}" in \
|
||||
@case "$(SORTROW)" in \
|
||||
text) SORTROW=1 ;; \
|
||||
data) SORTROW=2 ;; \
|
||||
bss) SORTROW=3 ;; \
|
||||
|
@ -23,7 +23,7 @@ endif
|
||||
|
||||
mcuboot: mcuboot-create-key link
|
||||
@$(COLOR_ECHO)
|
||||
@$(COLOR_ECHO) '${COLOR_PURPLE}Re-linking for MCUBoot at $(MCUBOOT_SLOT0_SIZE)...${COLOR_RESET}'
|
||||
@$(COLOR_ECHO) '$(COLOR_PURPLE)Re-linking for MCUBoot at $(MCUBOOT_SLOT0_SIZE)...$(COLOR_RESET)'
|
||||
@$(COLOR_ECHO)
|
||||
$(Q)$(_LINK) $(LINKFLAGPREFIX)--defsym=offset="$$(($(MCUBOOT_SLOT0_SIZE) + $(IMAGE_HDR_SIZE)))" \
|
||||
$(LINKFLAGPREFIX)--defsym=length="$$(($(MCUBOOT_SLOT1_SIZE) - $(IMAGE_HDR_SIZE)))" \
|
||||
@ -32,8 +32,8 @@ mcuboot: mcuboot-create-key link
|
||||
$(IMGTOOL) sign --key $(MCUBOOT_KEYFILE) --version $(IMAGE_VERSION) --align \
|
||||
$(MCUBOOT_IMAGE_ALIGN) -H $(IMAGE_HDR_SIZE) $(BINFILE) $(SIGN_BINFILE)
|
||||
@$(COLOR_ECHO)
|
||||
@$(COLOR_ECHO) '${COLOR_PURPLE}Signed with $(MCUBOOT_KEYFILE) for version $(IMAGE_VERSION)\
|
||||
${COLOR_RESET}'
|
||||
@$(COLOR_ECHO) '$(COLOR_PURPLE)Signed with $(MCUBOOT_KEYFILE) for version $(IMAGE_VERSION)\
|
||||
$(COLOR_RESET)'
|
||||
@$(COLOR_ECHO)
|
||||
|
||||
$(MCUBOOT_BIN):
|
||||
|
@ -125,6 +125,6 @@ ifneq (,$(filter nanocoap,$(USEMODULE)))
|
||||
DIRS += net/application_layer/nanocoap
|
||||
endif
|
||||
|
||||
DIRS += $(dir $(wildcard $(addsuffix /Makefile, ${USEMODULE})))
|
||||
DIRS += $(dir $(wildcard $(addsuffix /Makefile, $(USEMODULE))))
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,7 +1,7 @@
|
||||
ifeq (, ${RIOT_CHACHA_PRNG_DEFAULT})
|
||||
ifeq (, $(RIOT_CHACHA_PRNG_DEFAULT))
|
||||
RIOT_CHACHA_PRNG_DEFAULT := $(shell head -c 64 /dev/urandom | hexdump -e '"0x%4xull,"')
|
||||
endif
|
||||
|
||||
CFLAGS += -DRIOT_CHACHA_PRNG_DEFAULT="${RIOT_CHACHA_PRNG_DEFAULT}"
|
||||
CFLAGS += -DRIOT_CHACHA_PRNG_DEFAULT="$(RIOT_CHACHA_PRNG_DEFAULT)"
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,3 +1,3 @@
|
||||
DIRS += $(dir $(wildcard $(addsuffix /Makefile, ${USEMODULE})))
|
||||
DIRS += $(dir $(wildcard $(addsuffix /Makefile, $(USEMODULE))))
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -3,6 +3,6 @@ include ../Makefile.tests_common
|
||||
USEMODULE += dsp0401
|
||||
|
||||
LOOPS ?= 3
|
||||
CFLAGS += -DLOOPS=${LOOPS}
|
||||
CFLAGS += -DLOOPS=$(LOOPS)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
@ -13,7 +13,7 @@ USEMODULE += xtimer
|
||||
DRIVER ?= sx1276
|
||||
|
||||
# use SX1276 by default
|
||||
USEMODULE += ${DRIVER}
|
||||
USEMODULE += $(DRIVER)
|
||||
|
||||
FEATURES_REQUIRED ?= periph_spi
|
||||
FEATURES_REQUIRED ?= periph_gpio
|
||||
|
Loading…
Reference in New Issue
Block a user