mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-13 01:29:57 +00:00
cddba4c56b
There's too many of them now, so the names are constructed from the list of assembly files, automatically.
29 lines
526 B
Makefile
29 lines
526 B
Makefile
CFLAGS=-Wall -I../src -g
|
|
LDFLAGS=-latf-c
|
|
RK6502LIB=../src/librk65c02.a
|
|
VASM=vasm6502_std
|
|
VASMFLAGS=-Fbin -c02
|
|
|
|
TESTS=test_bus test_emulation
|
|
TESTROMS:=$(addsuffix .rom,$(basename $(wildcard *.s)))
|
|
|
|
all : $(TESTS) $(TESTROMS)
|
|
|
|
test_bus : test_bus.o $(RK6502LIB)
|
|
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
|
|
|
|
test_emulation : test_emulation.o $(RK6502LIB)
|
|
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
|
|
|
|
%.rom : %.s
|
|
$(VASM) $(VASMFLAGS) -o $@ $<
|
|
|
|
%.o : %.c
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
clean :
|
|
rm -f *.o
|
|
rm -f $(TESTS)
|
|
rm -f $(TESTROMS)
|
|
|