spi/Makefile

20 lines
564 B
Makefile
Raw Normal View History

TESTBENCH_BASE=test_spi_write_read_mode0
AUXFILES=spi_master.v spi_slave.v
CPP_TESTBENCH=test_spi_write_read_mode0.cpp
WAVEFILE=test_spi_write_read_mode0.vcd
FILES=${TESTBENCH_BASE}.v ${AUXFILES} ${CPP_TESTBENCH}
all: obj_dir/V${TESTBENCH_BASE}
./obj_dir/V${TESTBENCH_BASE} && gtkwave ${WAVEFILE}
obj_dir/V${TESTBENCH_BASE}.mk: ${FILES}
verilator --trace --cc --exe ${FILES} --top ${TESTBENCH_BASE}
obj_dir/V${TESTBENCH_BASE}: obj_dir/V${TESTBENCH_BASE}.mk
make -C obj_dir -f V${TESTBENCH_BASE}.mk
run:
./obj_dir/V${TESTBENCH_CASE}
clean:
$(RM) obj_dir/*