summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2012-04-01 00:22:16 +0200
committerDavid Lamparter <equinox@diac24.net>2012-04-01 00:22:16 +0200
commit0a60a76afcf938c6885395fb16b6c168179921e5 (patch)
tree868d844830a6e7e588dde90faf144b78366b50c8 /Makefile
parent75a61c57fb0402f777bfa828dd71818a97ed54a4 (diff)
adapted to ATtiny26 / sublab setup
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..38b4e72
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+.PHONY: love flash
+love: sublab77.ihex
+
+CFLAGS=-Wall -Wextra -pedantic -std=c99 -Os -DF_CPU=1000000 -mmcu=attiny26
+
+%.o: %.c
+ avr-gcc $(CFLAGS) -c -o $@ $<
+ifdef WHOPR
+sublab77.elf: main.c
+ avr-gcc $(CFLAGS) -DWHOPR -o $@ $^
+ avr-size $@
+else
+sublab77.elf: clock.o dcf77.o lcd.o main.o timebase.o
+ avr-gcc -Os -mmcu=attiny26 -o $@ $^
+ avr-size $@
+endif
+
+sublab77.ihex: sublab77.elf
+ objcopy -Oihex $^ $@