2023-12-23 09:27:29 +00:00
|
|
|
VSRC := $(wildcard vsrc/*.v)
|
|
|
|
CPPSRC := $(wildcard csrc/*.cpp)
|
2023-12-23 10:28:18 +00:00
|
|
|
PREFIX ?= .
|
2023-12-23 09:29:41 +00:00
|
|
|
OBJDIR := $(PREFIX)/obj
|
2023-12-23 09:27:29 +00:00
|
|
|
|
2023-12-23 09:33:03 +00:00
|
|
|
all: $(OBJDIR)
|
2023-12-23 10:28:18 +00:00
|
|
|
$(MAKE) -j -C $(OBJDIR) -f Vexample.mk Vexample
|
2023-12-23 09:27:29 +00:00
|
|
|
|
2023-12-23 10:28:18 +00:00
|
|
|
sim: all
|
2023-12-23 09:27:29 +00:00
|
|
|
$(call git_commit, "sim RTL") # DO NOT REMOVE THIS LINE!!!
|
|
|
|
@echo "Write this Makefile by your self."
|
2023-12-23 10:28:18 +00:00
|
|
|
$(OBJDIR)/Vexample
|
|
|
|
|
2023-12-23 09:27:29 +00:00
|
|
|
|
2023-12-23 09:33:03 +00:00
|
|
|
$(OBJDIR): $(VSRC) $(CPPSRC)
|
|
|
|
mkdir -p $(OBJDIR)
|
2023-12-23 10:28:18 +00:00
|
|
|
verilator --cc --exe --Mdir $(PWD)/$(OBJDIR) $(VSRC) $(CPPSRC)
|
2023-12-23 09:27:29 +00:00
|
|
|
|
|
|
|
include ../Makefile
|
2023-12-23 09:33:39 +00:00
|
|
|
|
2023-12-23 10:28:18 +00:00
|
|
|
.PHONY: clean
|
2023-12-23 09:33:39 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -r $(OBJDIR)
|