mirror of
https://github.com/cc65/cc65.git
synced 2025-01-02 09:34:22 +00:00
60 lines
1.3 KiB
Makefile
60 lines
1.3 KiB
Makefile
|
|
# makefile for the regression tests that return an error code on failure
|
|
|
|
CC65FLAGS = -t sim6502
|
|
SIM65FLAGS = -x 200000000
|
|
|
|
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)
|
|
SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65)
|
|
|
|
RM := rm -f
|
|
|
|
.PHONY: all
|
|
|
|
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) $@
|
|
|
|
%.o.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
%.os.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
%.osi.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
%.osir.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
%.oi.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
%.oir.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
%.or.prg: %.c
|
|
$(CL65) $(CC65FLAGS) $< -o $@
|
|
$(SIM65) $(SIM65FLAGS) $@
|
|
|
|
clean:
|
|
@$(RM) *.o
|
|
@$(RM) *.prg
|