CC=avr-gcc CFLAGS=-Os -DF_CPU=16000000UL -mmcu=atmega2560 all: blink.out USBPORT:=/dev/ttyACM0 %.out: %.c $(CC) $(CFLAGS) $< -o $@ %.hex: %.out avr-objcopy -O ihex -R .eeprom $< $@ install.%: %.hex avrdude -F -V -c arduino -C /etc/avrdude.conf -p ATmega2560 -P $(USBPORT) -b 57600 -U flash:w:$< -vvvv clean: rm -f *.hex *.out