summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 642202a..581165c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ AVRDUDE=avrdude
ACC=avr-gcc
AOBJCOPY=avr-objcopy
ALD=avr-ld
+ASIZE=avr-size
CFLAGS=-Wall -Wextra -Wno-unused-parameter -pedantic -std=c99
ifdef PIN
DPIN=-DPIN=\"$(PIN)\"
@@ -23,7 +24,8 @@ love: kbc.flash
$(AOBJCOPY) -j .eeprom -O binary $^ $@
%.ld.o: %.o
- $(ACC) $(ACFLAGS) $(ALDFLAGS) -o $@ $<
+ $(ACC) $(ACFLAGS) $(ALDFLAGS) -Wl,-Map,$(patsubst %.ld.o,%.map,$@) -o $@ $<
+ @$(ASIZE) $@
%.o: %.c
$(ACC) $(ACFLAGS) -c -o $@ $<
@@ -35,4 +37,5 @@ clean:
rm -f *.flash *.eeprom *.o
.PHONY: love flash clean
+.SECONDARY: