From ddd40092f539385ff030669814b93bdc948e18d6 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 21 Dec 2020 16:40:46 +0100 Subject: Makefile: Update size overview gen --- fw/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'fw') diff --git a/fw/Makefile b/fw/Makefile index b8f3ad4..d4c4678 100644 --- a/fw/Makefile +++ b/fw/Makefile @@ -130,9 +130,11 @@ all: binsize .PHONY: binsize binsize: $(BUILDDIR)/$(BINARY) $(BUILDDIR)/$(BINARY:.elf=-symbol-sizes.pdf) - $(LD) -T$(LDSCRIPT) $(LDFLAGS) -Wl,--print-memory-usage -o /dev/null $(OBJS) $(LIBS) + @echo + @$(LD) -T$(LDSCRIPT) $(LDFLAGS) -Wl,--print-memory-usage -o /dev/null $(OBJS) $(LIBS) @echo @echo "▐▬▬▬▌ SyMbOL sIzE HiGhScORe LiSt ▐▬▬▬▌" + @echo $(NM) --print-size --size-sort --radix=d $< | tail -n 20 $(BUILDDIR)/generated: ; mkdir -p $@ @@ -141,11 +143,13 @@ $(BUILDDIR)/generated: ; mkdir -p $@ $(BUILDDIR)/$(BINARY) $(BUILDDIR)/$(BINARY:.elf=.map) &: $(OBJS) $(LD) -T$(LDSCRIPT) $(LDFLAGS) -o $@ -Wl,-Map=$(BUILDDIR)/$(BINARY:.elf=.map) $^ $(LIBS) -build/$(BINARY:.elf=-symbol-sizes.dot): $(OBJS) - $(PYTHON3) tools/linkmem.py $(LINKMEM_FLAGS) $(LD) -T$(LDSCRIPT) $(LDFLAGS) $^ $(LIBS) > $@ +FORCE: + +build/$(BINARY:.elf=-symbol-sizes.dot): $(OBJS) FORCE + @$(PYTHON3) tools/linkmem.py $(LINKMEM_FLAGS) $(LD) -T$(LDSCRIPT) $(LDFLAGS) $(OBJS) $(LIBS) > $@ %.pdf: %.dot - $(DOT) -T pdf $< -o $@ + @$(DOT) -T pdf $< -o $@ %.dot: %.elf r2 -a arm -qc 'aa;agRd' $< 2>/dev/null >$@ -- cgit