Makefile 541 B

1234567891011121314151617181920212223242526
  1. DEVICE := atmega32
  2. SRC := src/light_ws2812.c src/main.c
  3. TARGET := wardrobeLedController.elf
  4. INCLUDE := -I inc
  5. F_CPU := 16000000
  6. AVRDUDE := avrdude
  7. PROGRAMMER := avrispmkII
  8. CC := avr-gcc
  9. diag:
  10. echo $(ASM_SRC)
  11. echo $(ASMFLAGS)
  12. all: $(TARGET)
  13. $(TARGET): Makefile $(SRC)
  14. $(CC) $(INCLUDE) -mmcu=$(DEVICE) -O3 -D F_CPU=$(F_CPU) $(SRC) -o $@
  15. flash: all
  16. $(AVRDUDE) -c $(PROGRAMMER) -p $(DEVICE) -U flash:w:$(TARGET):e
  17. fuse:
  18. $(AVRDUDE) -c $(PROGRAMMER) -p $(DEVICE) -U lfuse:w:0xff:m -U hfuse:w:0xd9:m