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
1 changed files with 8 additions and 4 deletions

View File

@ -6,23 +6,27 @@ XSIM ?= xsim
vpath $(PATH_SRC)
vpath %.svh $(PATH_SRC)
vpath %.sdb xsim.dir/work
.SUFFIXES: .sv .svh .sdb
.PHONY: all clean sim_build sim sim_gui
all: sim
OBJS=$(subst sv,sdb,$(SOURCES))
xsim.dir/work/%.sdb: $(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*