]> git.sur5r.net Git - cc65/blob - test/assembler/Makefile
test/assembler: removed WORKDIR variable, as remote assembling does only work partly
[cc65] / test / assembler / Makefile
1
2 # makefile for the assembler regression tests
3
4 BINDIR = ../../bin
5
6 BASE_TARGETS  = 6502 6502x 65sc02 65c02
7 BASE_TARGETS += 4510 huc6280
8
9 OPCODE_TARGETS = $(BASE_TARGETS)
10 CPUDETECT_TARGETS = $(BASE_TARGETS)
11
12 CPUDETECT_TARGETS += 65816
13
14 # default target defined later
15 all:
16
17 # generate opcode targets and expand target list
18 define opcode
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
24 endef
25 $(foreach target,$(OPCODE_TARGETS),$(eval $(call opcode,$(target))))
26
27 # generate cpudetect targets and expand target list
28 define cpudetect
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
34 endef
35 $(foreach target,$(CPUDETECT_TARGETS),$(eval $(call cpudetect,$(target))))
36
37 # now that all targets have been generated, get to the manual ones
38 all: $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
39         @#
40
41 clean:
42         rm -f *.o *.bin *.lst
43
44 .PHONY: all clean $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
45