2019-07-19 15:45:13 -04:00
|
|
|
PROGNAME = ps2ctl
|
|
|
|
AVRDUDEMCU ?= t45
|
|
|
|
AVRDUDEARGS ?= -c usbtiny -P usb
|
|
|
|
TARGETS = $(PROGNAME).hex os.sms
|
2019-12-31 15:07:39 -05:00
|
|
|
BASEDIR = ../../..
|
|
|
|
ZASM = $(BASEDIR)/emul/zasm/zasm
|
|
|
|
KERNEL = $(BASEDIR)/kernel
|
|
|
|
APPS = $(BASEDIR)/apps
|
2019-07-19 15:45:13 -04:00
|
|
|
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
.PHONY: send all clean
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
@echo Done!
|
|
|
|
|
|
|
|
send: $(PROGNAME).hex
|
2019-12-31 15:07:39 -05:00
|
|
|
avrdude $(AVRDUDEARGS) -p $(AVRDUDEMCU) -U flash:w:$(PROGNAME).hex
|
2019-07-19 15:45:13 -04:00
|
|
|
|
|
|
|
$(PROGNAME).hex: $(PROGNAME).asm
|
2019-12-31 15:07:39 -05:00
|
|
|
avra -o $@ $(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:
|
|
|
|
rm -f $(TARGETS) *.eep.hex *.obj os.bin
|