summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 55be36b..d97f6a0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,8 @@ IVFLAGS := -g2005-sv
SIM_SRCS := $(wildcard *_tb.v)
SIMS := $(SIM_SRCS:.v=.sim)
-WAVES := $(SIM_SRCS:.v=.vcd)
+WAVES := $(addprefix waves/,$(SIM_SRCS:.v=.vcd))
+DIRS := waves
DEPS = $(sort $(1) $(foreach d,$(1),$(DEPS-$(d))))
DEPS-alu := $(call DEPS,shifter)
@@ -17,9 +18,13 @@ all: simulate
simulate: $(WAVES)
clean:
- rm -f $(SIMS) $(WAVES)
+ rm -f $(SIMS)
+ rm -rf $(DIRS)
-%.vcd: %.sim
+$(DIRS):
+ mkdir -p $@
+
+waves/%.vcd: %.sim | waves
vvp $<
.SECONDEXPANSION: