Fix constant rebuilding everything

Shouldn't rely on vpath for targets, instead make them explicitly
built. This makes sure we don't constantly rebuild everything.
This commit is contained in:
Koray Yanik 2022-02-08 16:03:36 +00:00
parent 767277e341
commit 3f8450ac6a

View File

@ -6,23 +6,27 @@ XSIM ?= xsim
vpath %.sv $(PATH_SRC)
vpath %.svh $(PATH_SRC)
vpath %.sdb xsim.dir/work
.SUFFIXES:
.SUFFIXES: .sv .svh .sdb
.PHONY: all clean sim_build sim sim_gui
all: sim
%.sdb: %.sv
OBJS=$(subst sv,sdb,$(SOURCES))
xsim.dir/work/%.sdb: %.sv $(INCLUDES)
$(XVLOG) --sv --nolog $<
rm xvlog.pb
xsim.dir/work.$(TB)/xsim.dbg: $(subst sv,sdb,$(SOURCES))
xsim.dir/work.$(TB)/xsim.dbg: $(addprefix xsim.dir/work/, $(OBJS))
$(XELAB) --nolog --debug all -Odisable_unused_removal $(TB)
rm -f xelab.pb
sim_build: xsim.dir/work.$(TB)/xsim.dbg
sim: sim_build
sim: xsim.dir/work.$(TB)/xsim.dbg
$(XSIM) --nolog --runall $(TB)
rm -f xsim.jou xsim_* webtalk*