diff options
author | Jakob Odersky <jodersky@gmail.com> | 2013-05-21 17:16:23 +0200 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2013-05-21 17:16:23 +0200 |
commit | 4403f3cfcdba57657918b47d86799a6b10455022 (patch) | |
tree | 97a290cf177cdea57d8b8ae0475efa111cc61f45 /project/Build.scala | |
parent | 122c6cdd3d8aa598b38a83c3c6aff73eb9fdb14e (diff) | |
download | akka-serial-4403f3cfcdba57657918b47d86799a6b10455022.tar.gz akka-serial-4403f3cfcdba57657918b47d86799a6b10455022.tar.bz2 akka-serial-4403f3cfcdba57657918b47d86799a6b10455022.zip |
move native build to sbt
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/project/Build.scala b/project/Build.scala new file mode 100644 index 0000000..be1febc --- /dev/null +++ b/project/Build.scala @@ -0,0 +1,43 @@ +import sbt._ +import Keys._ +import NativeBuild._ + +object FlowBuild extends Build { + val Organization = "com.github.jodersky" + val Version = "1.0-SNAPSHOT" + val ScalaVersion = "2.10.1" + + lazy val root = Project( + id = "flow", + base = file("."), + settings = buildSettings ++ nativeSettings ++ runSettings) + + lazy val buildSettings = Defaults.defaultSettings ++ Seq( + organization := Organization, + version := Version, + scalaVersion := ScalaVersion, + resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/", + scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"), + compileOrder in Compile := CompileOrder.JavaThenScala) + + lazy val nativeSettings = NativeBuild.defaults ++ Seq( + NativeBuild.compiler := "gcc", + options := Seq("-fPIC"), + linker := "gcc", + linkerOptions := Seq("-shared", "-Wl,-soname,libflow.so.1"), + linkerOutput <<= NativeBuild.outputDirectory(_ / "libflow.so") + ) + + lazy val runSettings = Seq( + fork := true, + connectInput in run := true, + javaOptions in run += "-Djava.library.path=.") +} + +object Dependencies { + lazy val all = Seq() + + //lazy val io = "com.github.scala-incubator.io" %% "scala-io-core" % "0.4.2" + //lazy val file = "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2" + +} |