2 # makefile for the assembler regression tests
6 BASE_TARGETS = 6502 6502x 65sc02 65c02
7 BASE_TARGETS += 4510 huc6280
9 OPCODE_TARGETS = $(BASE_TARGETS)
10 CPUDETECT_TARGETS = $(BASE_TARGETS)
12 CPUDETECT_TARGETS += 65816
14 # default target defined later
17 # generate opcode targets and expand target list
19 OPCODE_TARGETLIST += $(1)-opcodes.bin
20 $(1)-opcodes.bin: $(1)-opcodes.s
21 @$$(BINDIR)/cl65 --cpu $(1) -t none -l $(1)-opcodes.lst -o $$@ $$<
22 @diff -q $(1)-opcodes.ref $$@ || (cat $(1)-opcodes.lst ; exit 1)
23 @echo ca65 --cpu $(1) opcodes ok
25 $(foreach target,$(OPCODE_TARGETS),$(eval $(call opcode,$(target))))
27 # generate cpudetect targets and expand target list
29 CPUDETECT_TARGETLIST += $(1)-cpudetect.bin
30 $(1)-cpudetect.bin: cpudetect.s
31 @$$(BINDIR)/cl65 --cpu $(1) -t none -l $(1)-cpudetect.lst -o $$@ $$<
32 @diff -q $(1)-cpudetect.ref $$@ || (cat $(1)-cpudetect.lst ; exit 1)
33 @echo ca65 --cpu $(1) cpudetect ok
35 $(foreach target,$(CPUDETECT_TARGETS),$(eval $(call cpudetect,$(target))))
37 # now that all targets have been generated, get to the manual ones
38 all: $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
44 .PHONY: all clean $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)