Skip to content

Commit

Permalink
Do not re-create image file if no changes, and silence output if noth…
Browse files Browse the repository at this point in the history
…ing built
  • Loading branch information
danngreen committed Jul 26, 2024
1 parent b845a91 commit 9b08e29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)} && \
Expand All @@ -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:
Expand Down

0 comments on commit 9b08e29

Please sign in to comment.