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