2019-06-29 12:54:57 +10:00
|
|
|
PROGNAME = ps2ctl
|
|
|
|
AVRDUDEMCU ?= t45
|
|
|
|
AVRDUDEARGS ?= -c usbtiny -P usb
|
2019-06-30 04:25:18 +10:00
|
|
|
TARGETS = $(PROGNAME).hex os.bin
|
2020-01-01 07:07:39 +11:00
|
|
|
BASEDIR = ../../..
|
|
|
|
ZASM = $(BASEDIR)/emul/zasm/zasm
|
|
|
|
KERNEL = $(BASEDIR)/kernel
|
|
|
|
APPS = $(BASEDIR)/apps
|
2019-06-29 12:54:57 +10:00
|
|
|
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
.PHONY: send all clean
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
@echo Done!
|
|
|
|
|
|
|
|
send: $(PROGNAME).hex
|
2020-01-01 07:07:39 +11:00
|
|
|
avrdude $(AVRDUDEARGS) -p $(AVRDUDEMCU) -U flash:w:$(PROGNAME).hex
|
2019-06-29 12:54:57 +10:00
|
|
|
|
|
|
|
$(PROGNAME).hex: $(PROGNAME).asm
|
2020-01-01 07:07:39 +11:00
|
|
|
avra -o $@ $(PROGNAME).asm
|
2019-06-29 12:54:57 +10:00
|
|
|
|
2019-06-30 04:25:18 +10:00
|
|
|
os.bin: glue.asm
|
2020-01-01 07:07:39 +11:00
|
|
|
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
|
2019-06-29 12:54:57 +10:00
|
|
|
|
2019-06-30 04:25:18 +10:00
|
|
|
clean:
|
|
|
|
rm -f $(TARGETS) *.eep.hex *.obj os.bin
|