From bea54255a3217229764cd35aca4387ac76531692 Mon Sep 17 00:00:00 2001 From: henryk Date: Sun, 9 Mar 2008 06:58:44 +0000 Subject: Add size printouts before and after compilation git-svn-id: https://svn.openpcd.org:2342/trunk@446 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'openpicc/Makefile') diff --git a/openpicc/Makefile b/openpicc/Makefile index f0721c2..927aa22 100644 --- a/openpicc/Makefile +++ b/openpicc/Makefile @@ -120,6 +120,8 @@ ARM_OBJ = $(ARM_SRC:.c=.o) FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o) DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o) +all: old-size openpicc.bin print-size + openpicc.bin : openpicc.elf $(OBJCOPY) openpicc.elf -O binary openpicc.bin @@ -146,10 +148,18 @@ clean : find -name '*.o' -exec rm \{\} \; rm -f openpicc.bin openpicc.elf openpicc.map openpicc.asm config/compile.h rm -rf $(DEPDIR) + rm -f old-size new-size -.PHONY: config/compile.h +.PHONY: config/compile.h print-size old-size all config/compile.h: scripts/mkcompile_h > config/compile.h application/cmd.o: config/compile.h +old-size: + arm-elf-size -B openpicc.elf > old-size || true + +print-size: openpicc.elf + arm-elf-size -B $< > new-size + ((diff -u old-size new-size 2> /dev/null && cat new-size) || true) | egrep "(text|elf)" + -include $(DEPDIR)/*.P -- cgit v1.2.3