summaryrefslogtreecommitdiffstats
path: root/sw-avr/rom-loader/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sw-avr/rom-loader/makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw-avr/rom-loader/makefile b/sw-avr/rom-loader/makefile
new file mode 100644
index 0000000..e68174f
--- /dev/null
+++ b/sw-avr/rom-loader/makefile
@@ -0,0 +1,17 @@
+CC=avr-gcc
+CARGS=-Wall -mmcu=atmega328p -D__AVR_ATmega328p__ -Os -I.
+
+SOURCES=main.c
+
+.PHONY: all flash clean
+all: rom-loader.bin
+
+flash: rom-loader.bin
+ avrdude -c usbasp -p atmega328p
+
+clean:
+ rm rom-loader.bin
+
+rom-loader.bin: $(SOURCES)
+ $(CC) $(CARGS) $< -o $@
+