# Makefile for urchlay_atari_asm_vc3-2022 competition entry.
# See file_id.diz for details.

TARGETS=xmasxl.xex xmas800.xex xmas1200.xex

all: $(TARGETS)

xmasxl.xex: xmasstar.s xex.inc
	cl65 -g -l $<.list -t none -o $@ $<

xmas800.xex: xmasstar.s xex.inc
	cl65 --asm-define kgetch=0xf6e2 -g -l $<.list -t none -o $@ $<

xmas1200.xex: xmasstar.s xex.inc
	cl65 --asm-define kgetch=0xf242 -g -l $<.list -t none -o $@ $<

%.xex: %.s
	cl65 -g -l $<.list -t none -g -o $@ $<

test: xmasxl.xex
	atari800 $<

realtest: xmas800.xex
	atariserver $<

dostest: xmas800.xex
	atariserver ~/oldhome/dos_20s.atr $<

clean:
	rm -f *.o *.list

distclean: clean
	rm -f $(TARGETS)

.PHONY: all test realtest dostest clean distclean
