diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9eba3af --- /dev/null +++ b/Makefile | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | CC = avr-gcc | ||
| 2 | CFLAGS = -O2 -Wall -Wextra -Werror -mmcu=atmega328p | ||
| 3 | OBJCOPY = avr-objcopy | ||
| 4 | |||
| 5 | all: | ||
| 6 | ${CC} ${CFLAGS} main.c | ||
| 7 | ${OBJCOPY} -j .text -j .data -O ihex a.out main.hex | ||
| 8 | rm -f a.out | ||
| 9 | |||
| 10 | flash: all | ||
| 11 | avrdude -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -U flash:w:main.hex:i | ||
