hw-rollerderby-scoreboard/Makefile

32 lines
443 B
Makefile
Raw Normal View History

2013-03-27 22:47:17 -06:00
PROG = main
2013-03-27 21:50:31 -06:00
CC = avr-gcc
CFLAGS += -mmcu=atmega328p
CFLAGS += -DF_CPU=16000000UL
2013-03-07 23:55:05 -07:00
CFLAGS += -Os
2013-03-27 21:50:31 -06:00
CFLAGS += -w
2013-03-07 23:55:05 -07:00
2013-03-27 21:50:31 -06:00
AVDFLAGS += -p m328p
AVDFLAGS += -c arduino
AVDFLAGS += -b 115200
AVDFLAGS += -P /dev/ttyACM0
upload: .upload
2013-03-27 22:47:17 -06:00
.upload: $(PROG).hex
2013-03-27 21:50:31 -06:00
avrdude $(AVDFLAGS) -U flash:w:$<
touch $@
2013-03-27 22:47:17 -06:00
$(PROG).hex: $(PROG)
2013-03-27 21:50:31 -06:00
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
2013-03-31 20:10:04 -06:00
main: main.o avr.o
2013-03-27 21:50:31 -06:00
clean:
2013-03-27 22:47:17 -06:00
rm -f $(PROG) *.hex .upload
2013-03-27 21:50:31 -06:00