5 CFLAGS = -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(CLOCK)
6 LDFLAGS = -Os -Wl,--gc-sections -mmcu=$(MCU)
10 @echo " %.hex: Build firmware from %.c"
11 @echo " upload-%: Upload firmware to AVR"
14 avr-objcopy -O ihex $< $@
17 avr-gcc $(LDFLAGS) -o $@ $<
20 avr-gcc -c $(CFLAGS) -o $@ $<
23 avrdude -p$(MCU) -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:$<:i