File tree Expand file tree Collapse file tree
dist/tools/riotboot_gen_hdr Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11RIOTBASE := ../../..
2+ BUILD_DIR ?= $(RIOTBASE ) /build
3+ GENHDR_BINDIR := $(BUILD_DIR ) /genhdr
24RIOT_INCLUDE := $(RIOTBASE ) /sys/include
35RIOT_CORE_INC := $(RIOTBASE ) /core/include
46NATIVE_INCLUDE := $(RIOTBASE ) /cpu/native/include
2628 Q =
2729endif
2830
29- all : bin /genhdr
31+ all : $( GENHDR_BINDIR ) /genhdr
3032
31- bin / :
32- $(Q ) mkdir -p bin
33+ $( GENHDR_BINDIR ) / :
34+ $(Q ) mkdir -p " $@ "
3335
34- bin /genhdr : $(GENHDR_HDR ) $(GENHDR_SRC ) Makefile | bin /
36+ $( GENHDR_BINDIR ) /genhdr : $(GENHDR_HDR ) $(GENHDR_SRC ) Makefile | $( GENHDR_BINDIR ) /
3537 $(Q )$(CC ) $(CFLAGS ) -I$(RIOT_INCLUDE ) -I$(RIOT_CORE_INC ) \
3638 -I$(NATIVE_INCLUDE ) $(GENHDR_SRC ) -o $@
3739
3840clean :
39- $(Q ) rm -rf bin/
41+ $(Q ) rm -rf $( GENHDR_BINDIR )
4042
4143distclean : clean
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ RIOTBOOT_DIR = $(RIOTBASE)/bootloaders/riotboot
77RIOTBOOT ?= $(RIOTBOOT_DIR ) /bin/$(BOARD ) /riotboot.elf
88CFLAGS += -I$(BINDIR ) /riotbuild
99
10- HEADER_TOOL_DIR = $(RIOTBASE ) /dist/tools /riotboot_gen_hdr
11- HEADER_TOOL ?= $(HEADER_TOOL_DIR ) /bin /genhdr
10+ HEADER_TOOL_DIR = $(RIOTTOOLS ) /riotboot_gen_hdr
11+ HEADER_TOOL ?= $(BUILD_DIR ) /genhdr /genhdr
1212BINDIR_RIOTBOOT = $(BINDIR ) /riotboot_files
1313
1414$(BINDIR_RIOTBOOT ) : $(CLEAN )
@@ -58,6 +58,7 @@ $(HEADER_TOOL): FORCE
5858 $(Q ) /usr/bin/env -i \
5959 QUIET=$(QUIET ) \
6060 PATH=" $( PATH) " \
61+ BUILD_DIR=" $( BUILD_DIR) " \
6162 $(MAKE ) --no-print-directory -C $(HEADER_TOOL_DIR ) all
6263
6364# Generate RIOT header and keep the original binary file
You can’t perform that action at this time.
0 commit comments