From 5810984cbbbe81f17ddf48f95af0486f72d0e933 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Thu, 4 Jan 2024 17:26:20 +0800 Subject: [PATCH] =?UTF-8?q?>=20nvboard=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=2017:26:20=20=20up=20=20=202:12,=20?= =?UTF-8?q?=202=20users,=20=20load=20average:=200.63,=201.11,=201.07?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/npc/Makefile b/npc/Makefile index 072bea0..54afa29 100644 --- a/npc/Makefile +++ b/npc/Makefile @@ -4,7 +4,6 @@ OBJDIR := $(PREFIX)/obj CHISEL_VDIR := $(PREFIX)/chisel CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc/*.cpp)) -SUBMAKE = $(OBJDIR)/V$(CHISEL_TOP_MODULE).mk VERILATOR_FLAGS := --cc --exe LDFLAGS += $(shell sdl2-config --libs) -lSDL2_image @@ -13,6 +12,8 @@ CHISEL_TOP_PACKAGE := learning CHISEL_TOP_MODULE := Main CHISEL_TARGET := verilog +SUBMAKE := $(OBJDIR)/V$(CHISEL_TOP_MODULE).mk + # Pretty printing MAKEFLAGS += --no-print-directory GREEN=\e[32m @@ -27,14 +28,6 @@ SRC_AUTO_BIND := $(abspath $(PREFIX)/auto_bind.cpp) NXDC_FILES := $(abspath constr/top.nxdc) $(SRC_AUTO_BIND): $(NXDC_FILES) NVBOARD_HOME=$(NVBOARD_HOME) python3 $(NVBOARD_HOME)/scripts/auto_pin_bind.py $< $@ - -nvboard-bin: OBJDIR = $(PREFIX)/nvobj -nvboard-bin: SUBMAKE = $(OBJDIR)/V$(CHISEL_TOP_MODULE).mk -# TODO: fix this awkward way to find nvboard.a -nvboard-bin: CPPSRCS = $(addprefix $(PWD)/,$(wildcard csrc_nvboard/*.cpp)) $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a -nvboard-bin: CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) -g - -nvboard-bin: $(CPPSRCS) $(SUBMAKE) $(SRC_AUTO_BIND) $(OBJDIR)/V$(CHISEL_TOP_MODULE) $(OBJDIR)/V$(CHISEL_TOP_MODULE): $(SUBMAKE) @$(call colorize,"SUBMAKE",$^) @@ -59,6 +52,14 @@ compile_commands.json: clean .PHONY: clean nvboard sim nvboard-bin sim-bin git_trace_sim git_trace_nvboard +nvboard-bin: OBJDIR := $(PREFIX)/nvobj +nvboard-bin: SUBMAKE := $(OBJDIR)/V$(CHISEL_TOP_MODULE).mk +# TODO: fix this awkward way to find nvboard.a +nvboard-bin: CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc_nvboard/*.cpp)) $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a +nvboard-bin: CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) -g + +nvboard-bin: $(CPPSRCS) $(SUBMAKE) $(SRC_AUTO_BIND) $(OBJDIR)/V$(CHISEL_TOP_MODULE) + sim-bin: VERILATOR_FLAGS += --trace sim-bin: $(CPPSRCS) $(OBJDIR)/V$(CHISEL_TOP_MODULE)