2 # makefile for the assembler regression tests
5 #WORKDIR := ../../testwrk
8 TARGETS = 6502 6502x 65sc02 65c02
14 all: $(addprefix $(WORKDIR)/, $(addsuffix -opcodes.bin, $(TARGETS)))
17 .PHONY: all clean $(addprefix $(WORKDIR)/, $(addsuffix -opcodes.bin, $(TARGETS)))
23 $$(WORKDIR)/$(1)-opcodes.bin: $(1)-opcodes.s
24 @$$(BINDIR)/cl65 --cpu $(1) -t none -l $$(WORKDIR)/$(1)-opcodes.lst --obj-path $$(WORKDIR) -o $$@ $$<
25 @diff -q $(1)-opcodes.ref $$@ || (cat $$(WORKDIR)/$(1)-opcodes.lst ; exit 1)
26 @echo ca65 --cpu $(1) ok
29 $(foreach target,$(TARGETS),$(eval $(call build,$(target))))