2019-07-19 15:45:13 -04:00
|
|
|
PROGNAME = ps2ctl
|
|
|
|
AVRDUDEMCU ?= t45
|
|
|
|
AVRDUDEARGS ?= -c usbtiny -P usb
|
2020-02-26 23:10:43 -05:00
|
|
|
TARGETS = $(PROGNAME).bin os.sms
|
2019-12-31 15:07:39 -05:00
|
|
|
BASEDIR = ../../..
|
|
|
|
ZASM = $(BASEDIR)/emul/zasm/zasm
|
|
|
|
KERNEL = $(BASEDIR)/kernel
|
|
|
|
APPS = $(BASEDIR)/apps
|
2020-02-26 23:10:43 -05:00
|
|
|
AVRA = $(BASEDIR)/emul/zasm/avra
|
|
|
|
AVRINC = $(BASEDIR)/avr
|
2019-07-19 15:45:13 -04:00
|
|
|
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
.PHONY: send all clean
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
@echo Done!
|
|
|
|
|
2020-02-26 23:10:43 -05:00
|
|
|
send: $(PROGNAME).bin
|
|
|
|
avrdude $(AVRDUDEARGS) -p $(AVRDUDEMCU) -U flash:w:$(PROGNAME).bin
|
2019-07-19 15:45:13 -04:00
|
|
|
|
2020-02-26 23:10:43 -05:00
|
|
|
$(PROGNAME).bin: $(PROGNAME).asm
|
|
|
|
$(AVRA) $(AVRINC) < $(PROGNAME).asm > $@
|
2019-07-19 15:45:13 -04:00
|
|
|
|
|
|
|
os.sms: glue.asm
|
2019-12-31 15:07:39 -05:00
|
|
|
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
|
2019-07-19 15:45:13 -04:00
|
|
|
|
|
|
|
clean:
|
2020-02-26 23:10:43 -05:00
|
|
|
rm -f $(TARGETS)
|