2 # makefile for the regression tests that generate output which has to be
3 # compared with reference output
10 SIM65FLAGS = -x 200000000
12 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
13 SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
23 CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow
27 REFS := $(patsubst %.c,%.ref,$(wildcard *.c))
29 TESTS := $(patsubst %.c,%.prg,$(wildcard *.c))
30 TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))
31 TESTS += $(patsubst %.c,%.os.prg,$(wildcard *.c))
32 TESTS += $(patsubst %.c,%.osi.prg,$(wildcard *.c))
33 TESTS += $(patsubst %.c,%.osir.prg,$(wildcard *.c))
34 TESTS += $(patsubst %.c,%.oi.prg,$(wildcard *.c))
35 TESTS += $(patsubst %.c,%.oir.prg,$(wildcard *.c))
36 TESTS += $(patsubst %.c,%.or.prg,$(wildcard *.c))
41 $(CC) $(CFLAGS) $< -o $*.host
45 $(CL65) $(CC65FLAGS) $< -o $@
46 $(SIM65) $(SIM65FLAGS) $@ > $*.out
50 $(CL65) $(CC65FLAGS) $< -o $@
51 $(SIM65) $(SIM65FLAGS) $@ > $*.out
55 $(CL65) $(CC65FLAGS) $< -o $@
56 $(SIM65) $(SIM65FLAGS) $@ > $*.out
60 $(CL65) $(CC65FLAGS) $< -o $@
61 $(SIM65) $(SIM65FLAGS) $@ > $*.out
65 $(CL65) $(CC65FLAGS) $< -o $@
66 $(SIM65) $(SIM65FLAGS) $@ > $*.out
70 $(CL65) $(CC65FLAGS) $< -o $@
71 $(SIM65) $(SIM65FLAGS) $@ > $*.out
75 $(CL65) $(CC65FLAGS) $< -o $@
76 $(SIM65) $(SIM65FLAGS) $@ > $*.out
80 $(CL65) $(CC65FLAGS) $< -o $@
81 $(SIM65) $(SIM65FLAGS) $@ > $*.out