1 # Regression test specification for the mos6502 target running with sim65
3 # simulation timeout in cycles
4 SIM_CYCLES
= 1000000000
7 EMU
= $(WINE
) sim65
-c
-v
-x
$(SIM_CYCLES
)
8 MAKEBIN
= $(top_builddir
)/bin
/makebin
$(EXEEXT
)
10 AS
= $(SDCC_BIN_PATH
)/sdas6500
$(EXEEXT
)
12 AS
= $(WINE
) $(top_builddir
)/bin
/sdas6500
$(EXEEXT
)
14 SDCCFLAGS
+= --nostdinc
-I
$(top_srcdir
)
15 LINKFLAGS
+= --nostdlib
-L
$(top_builddir
)/device
/lib
/build
/mos6502
20 SDCCFLAGS
+= -I
$(top_srcdir
)
23 SDCCFLAGS
+= -mmos6502
--less-pedantic
--code-loc
0x200 --xram-loc
0xc000
24 LINKFLAGS
+= mos6502.lib
29 # otherwise `make` deletes testfwk.rel and `make -j` will fail
30 .PRECIOUS
: $(PORT_CASES_DIR
)/%$(OBJEXT
)
33 EXTRAS
= $(PORT_CASES_DIR
)/testfwk
$(OBJEXT
) $(PORT_CASES_DIR
)/support
$(OBJEXT
)
34 include $(srcdir)/fwk
/lib
/spec.mk
36 # Rule to link into .ihx
37 %$(BINEXT
): %$(OBJEXT
) $(EXTRAS
) $(FWKLIB
) $(PORT_CASES_DIR
)/fwk.lib
38 $(SDCC
) $(SDCCFLAGS
) $(LINKFLAGS
) $(EXTRAS
) $(PORT_CASES_DIR
)/fwk.lib
$< -o
$@
44 $(VALGRIND
) $(SDCC
) $(SDCCFLAGS
) -c
$< -o
$@
46 $(PORT_CASES_DIR
)/%$(OBJEXT
): $(PORTS_DIR
)/$(PORT
)/%.c
47 $(SDCC
) $(SDCCFLAGS
) -c
$< -o
$@
49 $(PORT_CASES_DIR
)/%$(OBJEXT
): $(srcdir)/fwk
/lib
/%.c
50 $(SDCC
) $(SDCCFLAGS
) -c
$< -o
$@
52 $(PORT_CASES_DIR
)/fwk.lib
: $(srcdir)/fwk
/lib
/fwk.lib
53 cat
< $(srcdir)/fwk
/lib
/fwk.lib
> $@
55 $(PYTHON
) $(srcdir)/get_ticks.py
< $@
>> $@
56 -grep
-n FAIL
$@
/dev
/null || true