From 21307161050f832a8eca1faecc7e2b88ed82be0a Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Sun, 21 Jun 2020 23:20:33 +0000 Subject: [PATCH] [make] Move firesim-as-top handling of bloop into Makefile --- sim/Makefile | 12 ++++++++++-- sim/target-agnostic.mk | 7 ------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sim/Makefile b/sim/Makefile index 48c15813..29eb91e5 100644 --- a/sim/Makefile +++ b/sim/Makefile @@ -39,12 +39,14 @@ JVM_MEMORY ?= 16G SCALA_VERSION ?= 2.12.10 JAVA_ARGS ?= -Xmx$(JVM_MEMORY) SBT ?= java $(JAVA_ARGS) -jar $(rocketchip_dir)/sbt-launch.jar + BLOOP ?= bloop +BLOOP_CONFIG_DIR ?= $(base_dir)/.bloop SCALA_BUILDTOOL_DEPS ?= build.sbt -ifdef FIRESIM_USE_BLOOP -override SCALA_BUILDTOOL_DEPS += .bloop/TIMESTAMP +ifdef ENABLE_BLOOP +override SCALA_BUILDTOOL_DEPS += $(BLOOP_CONFIG_DIR)/TIMESTAMP define run_scala_main bloop run $(shell echo $(1) | sed 's/{.*}//') --main $(2) -- $(3) endef @@ -54,6 +56,12 @@ define run_scala_main endef endif +######################### +# Bloop Project Defs # +######################### +$(BLOOP_CONFIG_DIR)/TIMESTAMP: build.sbt + cd $(base_dir) && $(SBT) "project $(firesim_sbt_project)" "bloopInstall" + touch $@ # Manage the FIRRTL dependency manually FIRRTL_SUBMODULE_DIR ?= $(chipyard_dir)/tools/firrtl diff --git a/sim/target-agnostic.mk b/sim/target-agnostic.mk index 50bd0033..f987236c 100644 --- a/sim/target-agnostic.mk +++ b/sim/target-agnostic.mk @@ -254,13 +254,6 @@ run-midas-unittests: $(chisel_srcs) run-midas-unittests-debug: $(chisel_srcs) $(MAKE) -f $(simif_dir)/unittest/Makefrag $@ $(unittest_args) -######################### -# Bloop Project Defs # -######################### -.bloop/TIMESTAMP : build.sbt - cd $(base_dir) && $(SBT) "project $(firesim_sbt_project)" "bloopInstall" - touch $@ - ######################### # ScalaDoc # #########################