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

master
Solomon Peachy 9 years ago
parent df82d67764
commit b56572dfa2
  1. 9
      Makefile
  2. 1
      Makefile.common

@ -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"

@ -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

Loading…
Cancel
Save