summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2020-12-21 16:40:46 +0100
committerjaseg <git@jaseg.de>2020-12-21 16:40:46 +0100
commitddd40092f539385ff030669814b93bdc948e18d6 (patch)
tree8610f91364e38e3b2613dbb5fbcc11ec2272eecf
parent7b85ba8d4fb34e76d34a2d581e89e856aa471cf5 (diff)
downloadminikbd-ddd40092f539385ff030669814b93bdc948e18d6.tar.gz
minikbd-ddd40092f539385ff030669814b93bdc948e18d6.tar.bz2
minikbd-ddd40092f539385ff030669814b93bdc948e18d6.zip
Makefile: Update size overview gen
-rw-r--r--fw/Makefile12
1 files changed, 8 insertions, 4 deletions
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 >$@