Add clean target to all example makefiles
Signed-off-by: gatecat <gatecat@ds0.me>
diff --git a/examples/picorv32_tinyfpga/Makefile b/examples/picorv32_tinyfpga/Makefile
index 38c541d..0b0bfe2 100644
--- a/examples/picorv32_tinyfpga/Makefile
+++ b/examples/picorv32_tinyfpga/Makefile
@@ -21,5 +21,8 @@
prog: attosoc.bit
tinyprog -p $<
+clean:
+ rm -f *.vvp *.vcd *.elf *.bin *.hex *.bit *.svf *_out.config *.json
+
.PHONY: attosoc_sim clean prog
.PRECIOUS: attosoc.json attosoc_out.config attosoc.bit
diff --git a/examples/picorv32_ulx3s/Makefile b/examples/picorv32_ulx3s/Makefile
index c1d11a3..e279ecb 100644
--- a/examples/picorv32_ulx3s/Makefile
+++ b/examples/picorv32_ulx3s/Makefile
@@ -19,5 +19,8 @@
attosoc.bit: attosoc_out.config
ecppack $< $@
+clean:
+ rm *.vvp *.vcd *.elf *.bin *.hex *.bit *.svf *_out.config *.json
+
.PHONY: attosoc_sim clean prog
.PRECIOUS: attosoc.json attosoc_out.config attosoc.bit
diff --git a/examples/picorv32_versa5g/Makefile b/examples/picorv32_versa5g/Makefile
index c259c04..9bfe745 100644
--- a/examples/picorv32_versa5g/Makefile
+++ b/examples/picorv32_versa5g/Makefile
@@ -26,5 +26,8 @@
prog: attosoc.svf
openocd -f ${TRELLIS}/misc/openocd/ecp5-versa5g.cfg -c "transport select jtag; init; svf $<; exit"
+clean:
+ rm -f *.vvp *.vcd *.elf *.bin *.hex *.bit *.svf *_out.config *.json
+
.PHONY: attosoc_sim clean prog
.PRECIOUS: attosoc.json attosoc_out.config attosoc.bit
diff --git a/examples/soc_ecp5_evn/Makefile b/examples/soc_ecp5_evn/Makefile
index dd916be..65d8793 100644
--- a/examples/soc_ecp5_evn/Makefile
+++ b/examples/soc_ecp5_evn/Makefile
@@ -29,5 +29,8 @@
prog: attosoc.svf
openocd -f ${TRELLIS}/misc/openocd/ecp5-evn.cfg -c "transport select jtag; init; svf $<; exit"
+clean:
+ rm -f *.vvp *.vcd *.elf *.bin *.hex *.bit *.svf *_out.config *.json
+
.PHONY: attosoc_sim clean prog
.PRECIOUS: attosoc.json attosoc_out.config attosoc.bit
diff --git a/examples/soc_versa5g/Makefile b/examples/soc_versa5g/Makefile
index 4f8c9e3..8ae171c 100644
--- a/examples/soc_versa5g/Makefile
+++ b/examples/soc_versa5g/Makefile
@@ -29,5 +29,8 @@
prog: attosoc.svf
openocd -f ${TRELLIS}/misc/openocd/ecp5-versa5g.cfg -c "transport select jtag; init; svf $<; exit"
+clean:
+ rm -f *.vvp *.vcd *.elf *.bin *.hex *.bit *.svf *_out.config *.json
+
.PHONY: attosoc_sim clean prog
.PRECIOUS: attosoc.json attosoc_out.config attosoc.bit
diff --git a/examples/tinyfpga_rev1/Makefile b/examples/tinyfpga_rev1/Makefile
index 0c291f2..6954f52 100644
--- a/examples/tinyfpga_rev1/Makefile
+++ b/examples/tinyfpga_rev1/Makefile
@@ -11,5 +11,11 @@
%.bit: %_out.config
ecppack $< $@
+clean:
+ rm *.bit *.svf *_out.config *.json
+
prog: ${PROJ}.bit
tinyprog -p $<
+
+.PHONY: clean
+
diff --git a/examples/tinyfpga_rev2/Makefile b/examples/tinyfpga_rev2/Makefile
index 57e6352..a1bfb0b 100644
--- a/examples/tinyfpga_rev2/Makefile
+++ b/examples/tinyfpga_rev2/Makefile
@@ -13,5 +13,9 @@
prog: ${PROJ}.bit
tinyprog -p $<
-
+
+clean:
+ rm -f *.bit *.svf *_out.config *.json
+
+.PHONY: clean
.PRECIOUS: ${PROJ}.json ${PROJ}_out.config
diff --git a/examples/versa5g/Makefile b/examples/versa5g/Makefile
index a540232..862aa8a 100644
--- a/examples/versa5g/Makefile
+++ b/examples/versa5g/Makefile
@@ -21,5 +21,8 @@
prog: ${PROJ}.svf
openocd -f ${TRELLIS}/misc/openocd/ecp5-versa5g.cfg -c "transport select jtag; init; svf $<; exit"
-.PHONY: prog
+clean:
+ rm -f *.bit *.svf *_out.config *.json pattern.vh
+
+.PHONY: prog clean
.PRECIOUS: ${PROJ}.json ${PROJ}_out.config