build: Include a summary of text/data/bss sizes.

This commit is contained in:
Solomon Peachy 2013-08-04 08:47:31 -04:00
parent df82d67764
commit b56572dfa2
2 changed files with 7 additions and 3 deletions

View File

@ -4,12 +4,14 @@
include Makefile.common
# Now for the image definition
IMAGE = $(MCU)-main.bin
IMAGE = $(MCU)-main
all: .toolchain version $(IMAGE)
all: .toolchain version $(IMAGE).bin
.PHONY: clean distclean version dep
.PRECIOUS: %.elf
# Include library target
include libs/$(MCU).mk
include src/build.mk
@ -45,12 +47,13 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h
-Wl,--no-whole-archive $(LIBRARIES) \
-Wl,--build-id=none \
-flto=$(JLEVEL)
$(Q)$(SIZE) $@
# -Wl,-allow-multiple-definition
# Cleaning up..
clean:
@$(E) " CLEAN "
$(Q)${RM} -f $(SRC_OBJS) libs/*.o src/*.a $(MCU).ld
$(Q)${RM} -f $(SRC_OBJS) libs/*.a libs/*.o src/*.a $(MCU).ld $(IMAGE).bin $(IMAGE).elf
distclean: clean
@$(E) " DISTCLEAN"

View File

@ -15,6 +15,7 @@ OBJCOPY=$(CROSS_COMPILE)objcopy
AR=$(CROSS_COMPILE)ar
AS=$(CROSS_COMPILE)as
GDB=$(CROSS_COMPILE)gdb
SIZE=$(CROSS_COMPILE)size
RM=rm
ECHO=echo
HOSTCC ?= gcc