]> git.sur5r.net Git - cc65/blob - test/misc/Makefile
43cb6f5769db2c79d6842bc5abb7a783678154ed
[cc65] / test / misc / Makefile
1
2 # makefile for the remaining tests that need special care in one way or another
3
4 ifneq ($(shell echo),)
5   CMD_EXE = 1
6 endif
7
8 CC65FLAGS = -t sim6502
9 SIM65FLAGS = -x 200000000
10
11 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
12 SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
13
14 ifdef CMD_EXE
15 RM := del /f
16 else
17 RM := rm -f
18 endif
19
20 WORKDIR := ./../../testwrk
21
22 DIFF := $(WORKDIR)/bdiff
23
24 .PHONY: all clean
25
26 TESTS := $(patsubst %.c,%.prg,$(wildcard *.c))
27 TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))
28 TESTS += $(patsubst %.c,%.os.prg,$(wildcard *.c))
29 TESTS += $(patsubst %.c,%.osi.prg,$(wildcard *.c))
30 TESTS += $(patsubst %.c,%.osir.prg,$(wildcard *.c))
31 TESTS += $(patsubst %.c,%.oi.prg,$(wildcard *.c))
32 TESTS += $(patsubst %.c,%.oir.prg,$(wildcard *.c))
33 TESTS += $(patsubst %.c,%.or.prg,$(wildcard *.c))
34
35 all: $(TESTS)
36
37 # should compile, but then hangs in an endless loop
38 endless%prg: endless.c
39         $(CL65) $(CC65FLAGS) $< -o $@
40         ! $(SIM65) $(SIM65FLAGS) $@
41
42 # these need reference data that cant be generated by a host compiled program
43 # in a useful way
44 limits%prg: limits.c
45         $(CL65) $(CC65FLAGS) $< -o $@
46         $(SIM65) $(SIM65FLAGS) $@ > limits.out
47         $(DIFF) limits.out limits.ref
48
49 # the rest are tests that fail currently for one reason or another
50 fields%prg: fields.c
51         @echo "FIXME: " $@ "will currently fail"
52         $(CL65) $(CC65FLAGS) $< -o $@
53         -$(SIM65) $(SIM65FLAGS) $@
54 sitest%prg: sitest.c
55         @echo "FIXME: " $@ "will currently fail"
56         -$(CL65) $(CC65FLAGS) $< -o $@
57         -$(SIM65) $(SIM65FLAGS) $@
58
59 clean:
60         @$(RM) *.o
61         @$(RM) *.prg
62         @$(RM) *.out
63