Makefile: Make it easier to clean other directories

Create a list of extensions to clean, and then use wildcards to remove
the files. This will make it easier to clean other (nested) directories.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2023-02-20 18:52:31 -05:00
parent f82fd2cac3
commit 5f8c60518f
1 changed files with 3 additions and 1 deletions

View File

@ -144,8 +144,10 @@ test: $(addsuffix .fst,$(MODULES)) $(addsuffix .synth.fst,$(MODULES))
.PHONY: asc
asc: $(addprefix rtl/,$(addsuffix .asc,$(MODULES)))
CLEAN_EXT := .json .asc .pre .vvp .d .synth.v .place.v .sdf
.PHONY: clean
clean:
rm -f *.fst
rm -rf log
cd rtl && rm -f *.json *.asc *.pre *.vvp *.d *.synth.v *.place.v *.sdf
rm -f $(addprefix rtl/*,$(CLEAN_EXT))