2 # makefile for the regression tests that generate output which has to be
3 # compared with reference output
6 SIM65FLAGS = -x 200000000
8 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
9 SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
14 CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow
18 REFS := $(patsubst %.c,%.ref,$(wildcard *.c))
20 TESTS := $(patsubst %.c,%.prg,$(wildcard *.c))
21 TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))
22 TESTS += $(patsubst %.c,%.os.prg,$(wildcard *.c))
23 TESTS += $(patsubst %.c,%.osi.prg,$(wildcard *.c))
24 TESTS += $(patsubst %.c,%.osir.prg,$(wildcard *.c))
25 TESTS += $(patsubst %.c,%.oi.prg,$(wildcard *.c))
26 TESTS += $(patsubst %.c,%.oir.prg,$(wildcard *.c))
27 TESTS += $(patsubst %.c,%.or.prg,$(wildcard *.c))
32 $(CC) $(CFLAGS) $< -o $*.host
36 $(CL65) $(CC65FLAGS) $< -o $@
37 $(SIM65) $(SIM65FLAGS) $@ > $*.out
41 $(CL65) $(CC65FLAGS) $< -o $@
42 $(SIM65) $(SIM65FLAGS) $@ > $*.out
46 $(CL65) $(CC65FLAGS) $< -o $@
47 $(SIM65) $(SIM65FLAGS) $@ > $*.out
51 $(CL65) $(CC65FLAGS) $< -o $@
52 $(SIM65) $(SIM65FLAGS) $@ > $*.out
56 $(CL65) $(CC65FLAGS) $< -o $@
57 $(SIM65) $(SIM65FLAGS) $@ > $*.out
61 $(CL65) $(CC65FLAGS) $< -o $@
62 $(SIM65) $(SIM65FLAGS) $@ > $*.out
66 $(CL65) $(CC65FLAGS) $< -o $@
67 $(SIM65) $(SIM65FLAGS) $@ > $*.out
71 $(CL65) $(CC65FLAGS) $< -o $@
72 $(SIM65) $(SIM65FLAGS) $@ > $*.out