2023-12-23 09:27:29 +00:00
|
|
|
VERILATOR := verilator
|
|
|
|
|
|
|
|
VSRC := $(wildcard vsrc/*.v)
|
|
|
|
CPPSRC := $(wildcard csrc/*.cpp)
|
2023-12-23 09:33:03 +00:00
|
|
|
PREFIX ?= ./build
|
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)
|
|
|
|
$(MAKE) -C $(OBJDIR) -f Vexample.mk
|
2023-12-23 09:27:29 +00:00
|
|
|
|
2023-12-23 09:33:03 +00:00
|
|
|
sim: $(OBJDIR)
|
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 09:33:03 +00:00
|
|
|
$(OBJDIR): $(VSRC) $(CPPSRC)
|
|
|
|
mkdir -p $(OBJDIR)
|
2023-12-23 09:29:41 +00:00
|
|
|
$(VERILATOR) $(VSRC:%=--cc %) $(CPPSRC:%=--exe %) --Mdir $(OBJDIR)
|
2023-12-23 09:27:29 +00:00
|
|
|
|
|
|
|
include ../Makefile
|