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