From 9b08e292f136042bd83cb29571e67d53af619f66 Mon Sep 17 00:00:00 2001 From: Dan Green Date: Fri, 26 Jul 2024 09:49:02 -0700 Subject: [PATCH] Do not re-create image file if no changes, and silence output if nothing built --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 37b8f24..6d2bbdd 100644 --- a/Makefile +++ b/Makefile @@ -120,8 +120,8 @@ DEPS = $(addprefix $(OBJDIR)/, $(addsuffix .d, $(basename $(SOURCES)))) BUILDDIR = build OBJDIR = $(BUILDDIR)/obj/obj -all: image -all: Makefile $(ELF) $(UIMAGENAME) +all: Makefile $(ELF) $(UIMAGENAME) image + @: $(OBJDIR)/%.o: %.s @@ -150,10 +150,12 @@ $(HEX): $(ELF) @$(OBJCPY) --output-target=ihex $< $@ @$(SZ) $(SZOPTS) $(ELF) -image: $(BIN) +$(BUILDDIR)/$(BINARYNAME).stm32: $(BIN) python3 fsbl_header.py $(BUILDDIR)/$(BINARYNAME).bin $(BUILDDIR)/$(BINARYNAME).stm32 @ls -l $(BUILDDIR)/$(BINARYNAME).stm32 +image: $(BUILDDIR)/$(BINARYNAME).stm32 + load: image @read -p "What is the disk device stem (Enter for $(SD_DISK_STEM)): " DISKSTEM && \ DISKSTEM=$${DISKSTEM:-$(SD_DISK_STEM)} && \ @@ -171,7 +173,7 @@ ifneq "$(MAKECMDGOALS)" "clean" endif .PRECIOUS: $(DEPS) $(OBJECTS) $(ELF) -.PHONY: all clean +.PHONY: all clean image load .PHONY: compile_commands compile_commands: