diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-05-19 17:12:28 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-05-19 17:12:28 -0400 |
commit | 64b8d034d0ba426ca5d2ef8a86d4611f0eb05ebf (patch) | |
tree | 081695d73fdb3f04b8cabd348d65b0cf71b74b8d /Makefile |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b08c634 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +.POSIX: +.SUFFIXES: .ihx .out + +CC = avr-gcc +CFLAGS = -Wall -std=c99 -mmcu=avr5 -O2 +LD = avr-ld +LDFLAGS = +OBJCOPY = avr-objcopy + +OBJS = on.o + +send: a.ihx + avrdude -patmega328p -carduino -U flash:w:a.ihx:i -P/dev/ttyACM0 -v + touch send + +clean: + rm -f $(OBJS) a.out a.ihx send + +.out.ihx: + $(OBJCOPY) $< $@ --output-target ihex + +a.ihx: a.out + +a.out: $(OBJS) + $(LD) $(LDFLAGS) $(OBJS) -o $@ + +on.o: on.c |