2017-01-18 16:18:19 +00:00
|
|
|
CFLAGS=-Wall -I../src -g
|
2017-01-16 22:56:10 +00:00
|
|
|
LDFLAGS=-latf-c
|
|
|
|
RK6502LIB=../src/librk65c02.a
|
2017-01-18 22:47:55 +00:00
|
|
|
VASM=vasm6502_std
|
|
|
|
VASMFLAGS=-Fbin -c02
|
|
|
|
|
2017-01-18 16:18:19 +00:00
|
|
|
TESTS=test_bus test_emulation
|
2017-01-20 09:41:56 +00:00
|
|
|
TESTROMS=test_emulation_and_imm.rom \
|
2017-01-22 12:07:21 +00:00
|
|
|
test_emulation_inx.rom test_emulation_iny.rom \
|
2017-01-20 22:18:25 +00:00
|
|
|
test_emulation_pha.rom test_emulation_pla.rom \
|
2017-01-20 09:41:56 +00:00
|
|
|
test_emulation_nop.rom \
|
2017-01-21 20:46:35 +00:00
|
|
|
test_emulation_lda_imm.rom test_emulation_lda_zp.rom \
|
|
|
|
test_emulation_stz_zp.rom
|
2017-01-18 22:47:55 +00:00
|
|
|
|
|
|
|
all : $(TESTS) $(TESTROMS)
|
2017-01-16 21:54:51 +00:00
|
|
|
|
2017-01-18 22:47:55 +00:00
|
|
|
test_bus : test_bus.o $(RK6502LIB)
|
|
|
|
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
|
2017-01-18 16:18:19 +00:00
|
|
|
|
2017-01-18 22:47:55 +00:00
|
|
|
test_emulation : test_emulation.o $(RK6502LIB)
|
|
|
|
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
|
2017-01-16 21:54:51 +00:00
|
|
|
|
2017-01-18 22:47:55 +00:00
|
|
|
%.rom : %.s
|
|
|
|
$(VASM) $(VASMFLAGS) -o $@ $<
|
2017-01-18 16:18:19 +00:00
|
|
|
|
2017-01-16 21:54:51 +00:00
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
|
2017-01-18 16:18:19 +00:00
|
|
|
clean :
|
|
|
|
rm -f *.o
|
|
|
|
rm -f $(TESTS)
|
2017-01-18 22:47:55 +00:00
|
|
|
rm -f $(TESTROMS)
|
2017-01-16 21:54:51 +00:00
|
|
|
|