Makefile 896 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ASM ?= avra
  2. AVRDUDE ?= avrdude
  3. AVRDUDE_ARCH ?= m8
  4. AVRDUDE_SPEED ?= 1
  5. PROGRAMMER ?= avrisp2
  6. PROGPORT ?= usb
  7. LFUSE = 0xE0
  8. HFUSE = 0xD9
  9. NAME = touchprobe
  10. HEX = $(NAME).S.hex
  11. all: $(HEX)
  12. $(HEX): $(NAME).S m8def.inc
  13. $(ASM) $(NAME).S
  14. -srec_cat $(HEX) -Intel -Output $(NAME).S.bin -Binary
  15. @echo
  16. @echo "Successfully built the firmware"
  17. install: all
  18. $(AVRDUDE) -B $(AVRDUDE_SPEED) -p $(AVRDUDE_ARCH) \
  19. -c $(PROGRAMMER) -P $(PROGPORT) -U flash:w:$(HEX)
  20. avrdude:
  21. $(AVRDUDE) -B $(AVRDUDE_SPEED) -p $(AVRDUDE_ARCH) \
  22. -c $(PROGRAMMER) -P $(PROGPORT) -t
  23. reset:
  24. $(AVRDUDE) -B $(AVRDUDE_SPEED) -p $(AVRDUDE_ARCH) \
  25. -c $(PROGRAMMER) -P $(PROGPORT) \
  26. -U signature:r:/dev/null:i -q -q
  27. writefuse:
  28. $(AVRDUDE) -B 10 -p $(AVRDUDE_ARCH) \
  29. -c $(PROGRAMMER) -P $(PROGPORT) -q -q \
  30. -U lfuse:w:$(LFUSE):m \
  31. -U hfuse:w:$(HFUSE):m
  32. clean:
  33. -rm -f *~ *.cof *.hex *.obj *.bin *.bak *.cache.* *.o