summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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 $^ $@