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-24 11:36:27 +00:00
|
|
|
TESTROMS:=$(addsuffix .rom,$(basename $(wildcard *.s)))
|
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
|
|
|
|