1
0
Fork 0

normalize rocket-chip to reference-chip

This commit is contained in:
Yunsup Lee 2014-09-25 06:45:09 -07:00
parent 6495d0e6f7
commit 3b9624277a
1 changed files with 5 additions and 2 deletions

View File

@ -30,18 +30,21 @@ object BuildSettings extends Build {
lazy val hardfloat = Project("hardfloat", file("hardfloat"), settings = buildSettings) dependsOn(chisel)
lazy val uncore = Project("uncore", file("uncore"), settings = buildSettings) dependsOn(hardfloat)
lazy val rocket = Project("rocket", file("rocket"), settings = buildSettings) dependsOn(uncore)
val baselist = Vector("chisel", "uncore", "rocket", "hardfloat")
def show[A](in: Seq[A]) = in.map(_.toString).foldRight("")(_+" "+_)
def getsubdirs = {
val blacklist = (baselist ++ Vector("target", "project"))
IO.listFiles(file(".")) map (_.toString.split("/").last) filter (f=> !blacklist.contains(f)) filter (f=> !IO.listFiles(file(f+"/src/main/scala")).isEmpty)
}
// def buildsubproj(sproj: String) = Project(sproj, file(sproj), settings = buildSettings).dependsOn(chisel, uncore, rocket, hardfloat)
// val subprojs = (getsubprojs map (sproj=>buildsubproj(sproj)))
// unfortunately, creating projects on the fly doesn't seem to quite work in sbt
val othersources = getsubdirs map (f=>s"${f}/src/main/scala") map (f=>file(f))
val addOtherFiles = Seq (
unmanagedSourceDirectories in Compile ++= othersources.toSeq
) // aggregate extra sources into rocketchip
) // so instead, for dynamically expanding projects, just compile them all at once with rocket chip
lazy val rocketchip = Project("rocketchip", file("."), settings = buildSettings ++ chipSettings ++ addOtherFiles).dependsOn(chisel, hardfloat, uncore, rocket)