1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-04 13:29:35 +00:00
cc65/test/val/Makefile

68 lines
1.4 KiB
Makefile
Raw Normal View History

2014-11-22 16:02:46 +00:00
# makefile for the regression tests that return an error code on failure
2014-11-23 11:18:19 +00:00
ifneq ($(shell echo),)
CMD_EXE = 1
endif
2014-11-22 16:02:46 +00:00
CC65FLAGS = -t sim6502
SIM65FLAGS = -x 200000000
2014-11-22 16:02:46 +00:00
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
2014-11-23 11:18:19 +00:00
ifdef CMD_EXE
RM := del /f
else
2014-11-22 16:02:46 +00:00
RM := rm -f
2014-11-23 11:18:19 +00:00
endif
2014-11-22 16:02:46 +00:00
2014-11-23 11:18:19 +00:00
.PHONY: all clean
2014-11-22 16:02:46 +00:00
TESTS := $(patsubst %.c,%.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.os.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.osi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.osir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.oi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.oir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,%.or.prg,$(wildcard *.c))
all: $(TESTS)
%.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.o.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.os.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.osi.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.osir.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.oi.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.oir.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
%.or.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@
2014-11-22 16:02:46 +00:00
clean:
@$(RM) *.o
@$(RM) *.prg