summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2011-03-06 06:37:14 +0100
committerDavid Lamparter <equinox@diac24.net>2011-03-06 06:37:14 +0100
commit75ff498d410a42b4cce52409f2abcfa9e3856143 (patch)
treecbf465f82edf39e8097a9c1e70630f6df7df4ba7 /Makefile
parentfb92f1bb096bdf7bddb6bb66c931d4212fbc5588 (diff)
intermediate version
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: