diff --git a/.gitmodules b/.gitmodules index a98eb94..ff05570 100644 --- a/.gitmodules +++ b/.gitmodules @@ -29,6 +29,11 @@ url = https://github.com/bespoke-silicon-group/bsg_fakeram branch = master ignore = untracked +[submodule "riscv-isa-sim"] + path = riscv-isa-sim + url = https://github.com/riscv-software-src/riscv-isa-sim.git + branch = master + ignore = untracked # BlackParrot Tool Forks [submodule "dromajo"] @@ -36,7 +41,3 @@ url = https://github.com/bsg-external/dromajo branch = blackparrot_mods_1208 ignore = untracked - -[submodule "riscv-isa-sim"] - path = riscv-isa-sim - url = https://github.com/riscv-software-src/riscv-isa-sim.git diff --git a/mk/Makefile.prereq b/mk/Makefile.prereq index 9d5d5d6..66edb71 100644 --- a/mk/Makefile.prereq +++ b/mk/Makefile.prereq @@ -5,6 +5,7 @@ BOOST_URL := https://sourceforge.net/projects/boost/files/boost BOOST_DOWNLOAD := $(BOOST_URL)/$(BOOST_VERSION)/$(BOOST).tar.gz/download $(eval $(call bsg_fn_build_if_missing,boost,$(BP_TOOLS_WORK_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.boost_build: + @$(eval export MAKEFLAGS="") @$(CD) $(@D); \ $(WGET) -qO- $(BOOST_DOWNLOAD) | $(TAR) xzv @$(CD) $(@D)/$(BOOST); \ diff --git a/mk/Makefile.tools b/mk/Makefile.tools index 566522f..8bac3c1 100644 --- a/mk/Makefile.tools +++ b/mk/Makefile.tools @@ -1,19 +1,23 @@ $(eval $(call bsg_fn_build_if_new,axe,$(BP_TOOLS_AXE_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.axe_build: + @$(eval export MAKEFLAGS="") @$(CD) $(@D)/src; ./make.sh @$(CP) $(@D)/src/axe $(BP_TOOLS_BIN_DIR) $(eval $(call bsg_fn_build_if_new,bsg_fakeram,$(BP_TOOLS_FAKERAM_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.bsg_fakeram_build: + @$(eval export MAKEFLAGS="") $(MAKE) -j1 -C $(@D) tools $(eval $(call bsg_fn_build_if_new,bsg_sv2v,$(BP_TOOLS_SV2V_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.bsg_sv2v_build: + @$(eval export MAKEFLAGS="") $(MAKE) -j1 -C $(@D) tools $(eval $(call bsg_fn_build_if_new,dromajo,$(BP_TOOLS_DROMAJO_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.dromajo_build: + @$(eval export MAKEFLAGS="") @$(eval SOURCE_DIR := $(@D)) @$(eval BUILD_DIR := $(@D)/build) @$(MKDIR) -p $(BUILD_DIR) @@ -25,13 +29,16 @@ $(eval $(call bsg_fn_build_if_new,dromajo,$(BP_TOOLS_DROMAJO_DIR),$(BP_TOOLS_TOU $(eval $(call bsg_fn_build_if_new,spike,$(BP_TOOLS_SPIKE_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.spike_build: + @$(eval export MAKEFLAGS="") @$(CD) $(@D); \ ./configure --prefix=$(BP_TOOLS_INSTALL_DIR) --with-boost-libdir=$(BP_TOOLS_LIB_DIR); \ - $(MAKE) && $(MAKE) install + $(MAKE) && $(MAKE) install; \ + $(CP) libriscv.a $(BP_TOOLS_LIB_DIR) $(eval $(call bsg_fn_build_if_new,surelog,$(BP_TOOLS_SURELOG_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.surelog_build: - $(eval BUILD_DIR := $(@D)/build) + @$(eval export MAKEFLAGS="") + @$(eval BUILD_DIR := $(@D)/build) @$(MKDIR) -p $(BUILD_DIR) @$(CMAKE) -S $(@D) -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(BP_TOOLS_INSTALL_DIR) @$(CD) $(BUILD_DIR); \ @@ -39,6 +46,7 @@ $(eval $(call bsg_fn_build_if_new,surelog,$(BP_TOOLS_SURELOG_DIR),$(BP_TOOLS_TOU $(eval $(call bsg_fn_build_if_new,verilator,$(BP_TOOLS_VERILATOR_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.verilator_build: + @$(eval export MAKEFLAGS="") @$(CD) $(@D); \ autoconf; \ ./configure --prefix=$(BP_TOOLS_INSTALL_DIR); \ @@ -47,6 +55,7 @@ $(eval $(call bsg_fn_build_if_new,verilator,$(BP_TOOLS_VERILATOR_DIR),$(BP_TOOLS $(eval $(call bsg_fn_build_if_new,yosys,$(BP_TOOLS_YOSYS_DIR),$(BP_TOOLS_TOUCH_DIR))) %/.yosys_build: + @$(eval export MAKEFLAGS="") @$(CD) $(@D); \ $(MAKE) && $(MAKE) install PREFIX=$(BP_TOOLS_INSTALL_DIR)