2 # makefile for the remaining tests that need special care in one way or another
8 CC65FLAGS := -t sim6502
9 SIM65FLAGS := -x 200000000
11 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
12 SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
20 WORKDIR := ../../testwrk
22 DIFF := $(WORKDIR)/bdiff
26 SOURCES := $(wildcard *.c)
27 TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=$(WORKDIR)/%$(option)prg))
31 # should compile, but then hangs in an endless loop
32 $(WORKDIR)/endless%prg: endless.c
33 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
34 ! $(SIM65) $(SIM65FLAGS) $@
36 # these need reference data that can't be generated by a host-compiled program,
38 $(WORKDIR)/limits%prg: limits.c
39 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
40 $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/limits.out
41 $(DIFF) $(WORKDIR)/limits.out limits.ref
43 # the rest are tests that fail currently for one reason or another
44 $(WORKDIR)/fields%prg: fields.c
45 @echo "FIXME: " $@ "currently will fail."
46 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
47 -$(SIM65) $(SIM65FLAGS) $@
48 $(WORKDIR)/sitest%prg: sitest.c
49 @echo "FIXME: " $@ "currently will fail."
50 -$(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
51 # -$(SIM65) $(SIM65FLAGS) $@
55 @$(RM) $(SOURCES:.c=.o)
56 @$(RM) $(SOURCES:%.c=$(WORKDIR)/%.out)