Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
579B

  1. PROGNAME = ps2ctl
  2. AVRDUDEMCU ?= t45
  3. AVRDUDEARGS ?= -c usbtiny -P usb
  4. TARGETS = $(PROGNAME).bin os.sms
  5. BASEDIR = ../../..
  6. ZASM = $(BASEDIR)/emul/zasm/zasm
  7. KERNEL = $(BASEDIR)/kernel
  8. APPS = $(BASEDIR)/apps
  9. AVRA = $(BASEDIR)/emul/zasm/avra
  10. AVRINC = $(BASEDIR)/avr
  11. # Rules
  12. .PHONY: send all clean
  13. all: $(TARGETS)
  14. @echo Done!
  15. send: $(PROGNAME).bin
  16. avrdude $(AVRDUDEARGS) -p $(AVRDUDEMCU) -U flash:w:$(PROGNAME).bin
  17. $(PROGNAME).bin: $(PROGNAME).asm
  18. $(AVRA) $(AVRINC) < $(PROGNAME).asm > $@
  19. os.sms: glue.asm
  20. $(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
  21. clean:
  22. rm -f $(TARGETS)