Add make target to clean testbench files

Add it as default in the contrib Makefile.
This commit is contained in:
Daniel Jobson 2024-10-10 08:56:48 +02:00
parent f13366538e
commit 056ee4d3ee
No known key found for this signature in database
GPG Key ID: 3707A9DBF4BB8F1A
2 changed files with 12 additions and 2 deletions

View File

@ -40,7 +40,7 @@ run-make-spi:
run-tb:
podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \
$(IMAGE) make tb
$(IMAGE) make clean_tb tb
run-make-testfw:
podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \

View File

@ -416,7 +416,7 @@ view: tb_application_fpga_vcd
#-------------------------------------------------------------------
# Cleanup.
#-------------------------------------------------------------------
clean: clean_fw
clean: clean_fw clean_tb
rm -f bram_fw.hex
rm -f synth.{v,json,txt} route.v application_fpga.{asc,bin,vcd} application_fpga_testfw.bin
rm -f tb_application_fpga.vvp synth_tb.vvp route_tb.vvp
@ -436,6 +436,15 @@ clean_fw:
rm -f qemu_firmware.elf
.PHONY: clean_fw
clean_tb:
make -C core/timer/toolruns clean
make -C core/tk1/toolruns clean
make -C core/touch_sense/toolruns clean
make -C core/trng/toolruns clean
make -C core/uart/toolruns clean
make -C core/uds/toolruns clean
.PHONY: clean_tb
#-------------------------------------------------------------------
# Display info about targets.
#-------------------------------------------------------------------
@ -458,6 +467,7 @@ help:
@echo "prog_flash_testfw Program device flash as above, but with testfw."
@echo "clean Delete all generated files."
@echo "clean_fw Delete only generated files for firmware. Useful for fw devs."
@echo "clean_tb Delete only generated files for testbenches."
#=======================================================================
# EOF Makefile