aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b08c634..b6860f5 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,13 @@
CC = avr-gcc
CFLAGS = -Wall -std=c99 -mmcu=avr5 -O2
LD = avr-ld
-LDFLAGS =
+LDFLAGS = -T ld-script
OBJCOPY = avr-objcopy
OBJS = on.o
+a.ihx: a.out
+
send: a.ihx
avrdude -patmega328p -carduino -U flash:w:a.ihx:i -P/dev/ttyACM0 -v
touch send
@@ -19,8 +21,6 @@ clean:
.out.ihx:
$(OBJCOPY) $< $@ --output-target ihex
-a.ihx: a.out
-
a.out: $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@