2 # makefile for the remaining tests that need special care in one way or another
12 DEL = del /f $(subst /,\,$1)
20 CC65FLAGS := -t sim6502
21 SIM65FLAGS := -x 200000000
23 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
24 SIM65 := $(if $(wildcard ../../bin/sim65*),..$S..$Sbin$Ssim65,sim65)
26 WORKDIR := ..$S..$Stestwrk
27 DIFF := $(WORKDIR)/bdiff
31 SOURCES := $(wildcard *.c)
32 TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=$(WORKDIR)/%$(option)prg))
36 # should compile, but then hangs in an endless loop
37 $(WORKDIR)/endless%prg: endless.c
38 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
39 $(NOT) $(SIM65) $(SIM65FLAGS) $@
41 # these need reference data that can't be generated by a host-compiled program,
43 $(WORKDIR)/limits%prg: limits.c
44 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
45 $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/limits.out
46 $(DIFF) $(WORKDIR)/limits.out limits.ref
48 # the rest are tests that fail currently for one reason or another
49 $(WORKDIR)/fields%prg: fields.c
50 @echo "FIXME: " $@ "currently will fail."
51 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
52 -$(SIM65) $(SIM65FLAGS) $@
53 $(WORKDIR)/sitest%prg: sitest.c
54 @echo "FIXME: " $@ "currently will fail."
55 -$(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
56 # -$(SIM65) $(SIM65FLAGS) $@
57 $(WORKDIR)/cc65141011%prg: cc65141011.c
58 @echo "FIXME: " $@ "currently can fail."
59 $(CL65) $(subst .,,$(*:.o%=-O%)) $(CC65FLAGS) $< -o $@
60 -$(SIM65) $(SIM65FLAGS) $@
63 $M@$(call DEL,$(TESTS))
64 $M@$(call DEL,$(SOURCES:.c=.o))
65 $M@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))