mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-06-08 21:29:31 +00:00
Add support for building test case ROMs with vasm.
While here add first such ROM, for nop instruction test.
This commit is contained in:
parent
92914d4aa0
commit
73e4be2acc
|
@ -1,15 +1,22 @@
|
||||||
CFLAGS=-Wall -I../src -g
|
CFLAGS=-Wall -I../src -g
|
||||||
LDFLAGS=-latf-c
|
LDFLAGS=-latf-c
|
||||||
RK6502LIB=../src/librk65c02.a
|
RK6502LIB=../src/librk65c02.a
|
||||||
|
VASM=vasm6502_std
|
||||||
|
VASMFLAGS=-Fbin -c02
|
||||||
|
|
||||||
TESTS=test_bus test_emulation
|
TESTS=test_bus test_emulation
|
||||||
|
TESTROMS=test_emulation_nop.rom
|
||||||
|
|
||||||
all : $(TESTS)
|
all : $(TESTS) $(TESTROMS)
|
||||||
|
|
||||||
test_bus : test_bus.o
|
test_bus : test_bus.o $(RK6502LIB)
|
||||||
$(CC) -o test_bus $(LDFLAGS) $< $(RK6502LIB)
|
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
|
||||||
|
|
||||||
test_emulation : test_emulation.o
|
test_emulation : test_emulation.o $(RK6502LIB)
|
||||||
$(CC) -o test_emulation $(LDFLAGS) $< $(RK6502LIB)
|
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
|
||||||
|
|
||||||
|
%.rom : %.s
|
||||||
|
$(VASM) $(VASMFLAGS) -o $@ $<
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
$(CC) $(CFLAGS) -c $<
|
$(CC) $(CFLAGS) -c $<
|
||||||
|
@ -17,4 +24,5 @@ test_emulation : test_emulation.o
|
||||||
clean :
|
clean :
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
rm -f $(TESTS)
|
rm -f $(TESTS)
|
||||||
|
rm -f $(TESTROMS)
|
||||||
|
|
||||||
|
|
3
test/test_emulation_nop.s
Normal file
3
test/test_emulation_nop.s
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
start: nop
|
||||||
|
stp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user