From 90f609fa9924105d92aa5253fd9bec092a9e0455 Mon Sep 17 00:00:00 2001 From: blckmn Date: Fri, 7 Jan 2022 14:58:56 +1100 Subject: [PATCH 1/2] Makefile changes to support RELEASE=yes to simplify naming, and also remove the production of the bin file by default. Bin files can still be made using: make bin TARGET=xxx --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 868bd8dd2d..1c6e9c428b 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,8 @@ SERIAL_DEVICE ?= $(firstword $(wildcard /dev/ttyACM*) $(firstword $(wildcard / # Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override. FLASH_SIZE ?= +# Release file naming +RELEASE ?= no ############################################################################### # Things that need to be maintained as the source changes @@ -304,8 +306,11 @@ CPPCHECK = cppcheck $(CSOURCES) --enable=all --platform=unix64 \ $(addprefix -I,$(INCLUDE_DIRS)) \ -I/usr/include -I/usr/include/linux - +ifeq ($(RELEASE),yes) +TARGET_BASENAME = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET) +else TARGET_BASENAME = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET)_$(REVISION) +endif # # Things we will build @@ -486,7 +491,7 @@ targets-group-rest: $(GROUP_OTHER_TARGETS) $(VALID_TARGETS): $(V0) @echo "Building $@" && \ - $(MAKE) binary hex TARGET=$@ && \ + $(MAKE) hex TARGET=$@ && \ echo "Building $@ succeeded." $(NOBUILD_TARGETS): From eb3209ec45c8555af02c9dc426afb3ffba11ba72 Mon Sep 17 00:00:00 2001 From: blckmn Date: Fri, 7 Jan 2022 15:00:57 +1100 Subject: [PATCH 2/2] Additional comment clarity. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c6e9c428b..62dd6df623 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ SERIAL_DEVICE ?= $(firstword $(wildcard /dev/ttyACM*) $(firstword $(wildcard / # Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override. FLASH_SIZE ?= -# Release file naming +# Release file naming (no revision to be present if this is 'yes') RELEASE ?= no ###############################################################################