From 23766bd467a54f1bd4f3e95e3c8d9fd4b4156fb9 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Mon, 1 Jan 2024 13:56:48 +0800 Subject: [PATCH] =?UTF-8?q?>=20sim=20RTL=20ysyx=5F22040000=20=E6=9D=8E?= =?UTF-8?q?=E5=BF=83=E6=9D=A8=20Linux=20calcite=206.1.69=20#1-NixOS=20SMP?= =?UTF-8?q?=20PREEMPT=5FDYNAMIC=20Wed=20Dec=2020=2016:00:29=20UTC=202023?= =?UTF-8?q?=20x86=5F64=20GNU/Linux=20=2013:56:48=20=20up=20=2022:35,=20=20?= =?UTF-8?q?2=20users,=20=20load=20average:=200.69,=200.78,=200.80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/npc/Makefile b/npc/Makefile index f0ac626..6f076ab 100644 --- a/npc/Makefile +++ b/npc/Makefile @@ -1,9 +1,10 @@ NVBOARD_HOME ?= $(abspath ../nvboard) PREFIX ?= build OBJDIR := $(PREFIX)/obj +TARGET := $(OBJDIR)/Vexample VSRC := $(wildcard vsrc/*.v) -SRC_AUTO_BIND := $(abspath $(PREFIX)/auto_bind.cpp) +SRC_AUTO_BIND := $(PREFIX)/auto_bind.cpp CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc/*.cpp)) NXDC_FILES = $(abspath constr/top.nxdc) SUBMAKE := $(OBJDIR)/Vexample.mk @@ -21,6 +22,9 @@ sim: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample git_trace $(OBJDIR)/Vexample: $(SUBMAKE) $(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample + +$(PREFIX)/nvobj/Vexample: $(SUBMAKE) + $(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample $(SUBMAKE): $(VSRC) $(CPPSRCS) $(OBJDIR) verilator $(VERILATOR_FLAGS) $(addprefix -CFLAGS , $(CXXFLAGS)) $(addprefix -LDFLAGS , $(LDFLAGS)) --Mdir $(abspath $(OBJDIR)) $(VSRC) $(CPPSRCS) @@ -44,11 +48,11 @@ git_trace: .PHONY: clean nvboard -nvboard: OBJDIR := $(PREFIX)/nvobj # TODO: fix this awkward way to find nvboard.a nvboard: CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc_nvboard/*.cpp)) $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a nvboard: CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) -g -nvboard: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample +nvboard: OBJDIR := $(PREFIX)/nvobj +nvboard: $(VSRC) $(CPPSRCS) $(PREFIX)/nvobj/Vexample $(SUBMAKE) $(SRC_AUTO_BIND) @NVBOARD_HOME=$(NVBOARD_HOME) $(OBJDIR)/Vexample clean: