target = retrorevd_kim1_6502asm_vc3-2022.zip
objects = star.bin

default: all

all: $(target)

%.bin: %.a65
	vasm6502_oldstyle -dotdir $< -o $@ -L $(basename $<).lst -Fbin -quiet -esc

%.hex: $(objects)
	srec_cat  $< -binary -offset 0x80 -output $@ -Intel -address-length=2

%.zip: $(objects) Makefile file_id.diz *.a65 *.png *.bin $(basename ${objects}).hex
	zip $(target) $^

clean:
	@rm -f *.lst *.img *.com *.bin *.obj *.hex *.zip

.PHONY: clean debug test
.PRECIOUS: %.hex
