]> git.sur5r.net Git - cc65/blob - test/assembler/Makefile
Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase
[cc65] / test / assembler / Makefile
1
2 # makefile for the assembler regression tests
3
4 BINDIR = ../../bin
5 #WORKDIR := ../../testwrk
6 WORKDIR := .
7
8 BASE_TARGETS  = 6502 6502x 65sc02 65c02
9 BASE_TARGETS += 4510 huc6280
10
11 OPCODE_TARGETS = $(BASE_TARGETS)
12 CPUDETECT_TARGETS = $(BASE_TARGETS)
13
14 CPUDETECT_TARGETS += 65816
15
16 # default target defined later
17 all:
18
19 # generate opcode targets and expand target list
20 define opcode
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
26 endef
27 $(foreach target,$(OPCODE_TARGETS),$(eval $(call opcode,$(target))))
28
29 # generate cpudetect targets and expand target list
30 define cpudetect
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
36 endef
37 $(foreach target,$(CPUDETECT_TARGETS),$(eval $(call cpudetect,$(target))))
38
39 # now that all targets have been generated, get to the manual ones
40 all: $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
41         @#
42
43 clean:
44         rm -f *.o *.bin *.lst
45
46 .PHONY: all clean $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
47