]> git.sur5r.net Git - cc65/blob - test/misc/Makefile
use own naive bdiff tool instead of diff/fc
[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 DIFF := ./../bdiff
21
22 .PHONY: all clean
23
24 TESTS := $(patsubst %.c,%.prg,$(wildcard *.c))
25 TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))
26 TESTS += $(patsubst %.c,%.os.prg,$(wildcard *.c))
27 TESTS += $(patsubst %.c,%.osi.prg,$(wildcard *.c))
28 TESTS += $(patsubst %.c,%.osir.prg,$(wildcard *.c))
29 TESTS += $(patsubst %.c,%.oi.prg,$(wildcard *.c))
30 TESTS += $(patsubst %.c,%.oir.prg,$(wildcard *.c))
31 TESTS += $(patsubst %.c,%.or.prg,$(wildcard *.c))
32
33 all: $(TESTS)
34
35 # should compile, but then hangs in an endless loop
36 endless%prg: endless.c
37         $(CL65) $(CC65FLAGS) $< -o $@
38         ! $(SIM65) $(SIM65FLAGS) $@
39
40 # these need reference data that cant be generated by a host compiled program
41 # in a useful way
42 limits%prg: limits.c
43         $(CL65) $(CC65FLAGS) $< -o $@
44         $(SIM65) $(SIM65FLAGS) $@ > limits.out
45         $(DIFF) limits.out limits.ref
46
47 # the rest are tests that fail currently for one reason or another
48 fields%prg: fields.c
49         @echo "FIXME: " $@ "will currently fail"
50         $(CL65) $(CC65FLAGS) $< -o $@
51         -$(SIM65) $(SIM65FLAGS) $@
52 sitest%prg: sitest.c
53         @echo "FIXME: " $@ "will currently fail"
54         -$(CL65) $(CC65FLAGS) $< -o $@
55         -$(SIM65) $(SIM65FLAGS) $@
56
57 clean:
58         @$(RM) *.o
59         @$(RM) *.prg
60         @$(RM) *.out
61