]> git.sur5r.net Git - cc65/blob - test/ref/Makefile
fixed up the rest of the tests, added rudimentary makefile(s)
[cc65] / test / ref / Makefile
1
2 # makefile for the regression tests that generate output which has to be
3 # compared with reference output
4
5 CC65FLAGS = -t sim6502
6 SIM65FLAGS = -x 200000000
7
8 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
9 SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
10
11 RM := rm -f
12
13 .PHONY: all
14
15 TESTS := $(patsubst %.c,%.prg,$(wildcard *.c))
16 TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))
17 TESTS += $(patsubst %.c,%.os.prg,$(wildcard *.c))
18 TESTS += $(patsubst %.c,%.osi.prg,$(wildcard *.c))
19 TESTS += $(patsubst %.c,%.osir.prg,$(wildcard *.c))
20 TESTS += $(patsubst %.c,%.oi.prg,$(wildcard *.c))
21 TESTS += $(patsubst %.c,%.oir.prg,$(wildcard *.c))
22 TESTS += $(patsubst %.c,%.or.prg,$(wildcard *.c))
23
24 all: $(TESTS)
25
26 %.prg: %.c
27         $(CL65) $(CC65FLAGS) $< -o $@
28         $(SIM65) $(SIM65FLAGS) $@ > $*.out
29
30 %.o.prg: %.c
31         $(CL65) $(CC65FLAGS) $< -o $@
32         $(SIM65) $(SIM65FLAGS) $@ > $*.out
33
34 %.os.prg: %.c
35         $(CL65) $(CC65FLAGS) $< -o $@
36         $(SIM65) $(SIM65FLAGS) $@ > $*.out
37
38 %.osi.prg: %.c
39         $(CL65) $(CC65FLAGS) $< -o $@
40         $(SIM65) $(SIM65FLAGS) $@ > $*.out
41
42 %.osir.prg: %.c
43         $(CL65) $(CC65FLAGS) $< -o $@
44         $(SIM65) $(SIM65FLAGS) $@ > $*.out
45
46 %.oi.prg: %.c
47         $(CL65) $(CC65FLAGS) $< -o $@
48         $(SIM65) $(SIM65FLAGS) $@ > $*.out
49
50 %.oir.prg: %.c
51         $(CL65) $(CC65FLAGS) $< -o $@
52         $(SIM65) $(SIM65FLAGS) $@ > $*.out
53
54 %.or.prg: %.c
55         $(CL65) $(CC65FLAGS) $< -o $@
56         $(SIM65) $(SIM65FLAGS) $@ > $*.out
57
58 clean:
59         @$(RM) *.o
60         @$(RM) *.prg
61         @$(RM) *.out
62         @$(RM) *.ref