2012-10-02 04:30:11 +02:00
|
|
|
import sbt._
|
|
|
|
import Keys._
|
2015-07-22 20:49:10 +02:00
|
|
|
import complete._
|
|
|
|
import complete.DefaultParsers._
|
2012-10-02 04:30:11 +02:00
|
|
|
|
2012-10-21 02:27:49 +02:00
|
|
|
object BuildSettings extends Build {
|
2012-10-02 04:30:11 +02:00
|
|
|
|
2015-07-22 20:49:10 +02:00
|
|
|
override lazy val settings = super.settings ++ Seq(
|
|
|
|
organization := "berkeley",
|
|
|
|
version := "1.2",
|
2016-03-06 03:42:45 +01:00
|
|
|
scalaVersion := "2.11.7",
|
2013-11-09 00:30:08 +01:00
|
|
|
parallelExecution in Global := false,
|
2013-07-25 08:28:43 +02:00
|
|
|
traceLevel := 15,
|
|
|
|
scalacOptions ++= Seq("-deprecation","-unchecked"),
|
2013-09-26 21:01:46 +02:00
|
|
|
libraryDependencies ++= Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
|
2012-10-02 04:30:11 +02:00
|
|
|
)
|
|
|
|
|
2016-06-07 06:24:55 +02:00
|
|
|
lazy val chisel = project in file("chisel" + sys.env.getOrElse("CHISEL_VERSION", 2))
|
2015-11-10 22:39:08 +01:00
|
|
|
lazy val cde = project in file("context-dependent-environments")
|
|
|
|
lazy val hardfloat = project.dependsOn(chisel)
|
|
|
|
lazy val junctions = project.dependsOn(chisel, cde)
|
|
|
|
lazy val uncore = project.dependsOn(junctions)
|
|
|
|
lazy val rocket = project.dependsOn(hardfloat, uncore)
|
|
|
|
lazy val groundtest = project.dependsOn(rocket)
|
2016-05-16 22:06:45 +02:00
|
|
|
lazy val rocketchip = (project in file(".")).settings(chipSettings).dependsOn(groundtest)
|
2014-09-25 15:45:09 +02:00
|
|
|
|
2015-07-22 20:49:10 +02:00
|
|
|
lazy val addons = settingKey[Seq[String]]("list of addons used for this build")
|
|
|
|
lazy val make = inputKey[Unit]("trigger backend-specific makefile command")
|
|
|
|
val setMake = NotSpace ~ ( Space ~> NotSpace )
|
2012-11-18 04:58:18 +01:00
|
|
|
|
2012-10-23 21:51:37 +02:00
|
|
|
val chipSettings = Seq(
|
2015-07-22 20:49:10 +02:00
|
|
|
addons := {
|
|
|
|
val a = sys.env.getOrElse("ROCKETCHIP_ADDONS", "")
|
|
|
|
println(s"Using addons: $a")
|
2015-12-09 20:17:16 +01:00
|
|
|
a.split(" ")
|
2012-10-23 21:51:37 +02:00
|
|
|
},
|
2015-07-22 20:49:10 +02:00
|
|
|
unmanagedSourceDirectories in Compile ++= addons.value.map(baseDirectory.value / _ / "src/main/scala"),
|
|
|
|
mainClass in (Compile, run) := Some("rocketchip.TestGenerator"),
|
|
|
|
make := {
|
|
|
|
val jobs = java.lang.Runtime.getRuntime.availableProcessors
|
|
|
|
val (makeDir, target) = setMake.parsed
|
|
|
|
(run in Compile).evaluated
|
|
|
|
s"make -C $makeDir -j $jobs $target" !
|
2012-10-23 21:51:37 +02:00
|
|
|
}
|
|
|
|
)
|
2012-10-02 04:30:11 +02:00
|
|
|
}
|