aboutsummaryrefslogtreecommitdiff
path: root/documentation/building.md
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/building.md')
-rw-r--r--documentation/building.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/documentation/building.md b/documentation/building.md
index 52f845c..03729f7 100644
--- a/documentation/building.md
+++ b/documentation/building.md
@@ -1,10 +1,10 @@
# Building flow
Flow can be divided into two layers: a scala front-end that wraps serial communication in an actor-style way, and a native back-end that actually enables the communication. These layers are loosely coupled, their only interaction being the JNI bindings generated by javah. As such, building flow may be decomposed into two independent steps.
-## Scala/Java front-end
+## 1) Front-end
The front-end is compiled as any regular Scala project. It is managed by sbt and may be built by running `sbt flow/packageBin`, producing a jar ready to be included in any project.
-## Native back-end
+## 2) Back-end
_Note: currently, the native build only supports Linux. However, the code is designed to be portable and should be able to compile on other Unix flavours (including Mac). Any contributions to the native build are highly welcome._
All files related to the back-end are contained in `flow-native` and are managed by make. The build offers various options for compilation and installation, be sure to check the makefile for additional information. The following is a short, incomplete list of build possibilities:
@@ -18,17 +18,17 @@ All files related to the back-end are contained in `flow-native` and are managed
3. Debian package build
A debian binary package can be built the standard way by navigating to the build directory and running `debuild` or `dpkg-buildpackage`. The resulting packages are created in this project's root directory and can be installed with `sudo dpkg -i *.deb`.
-Note that for compiling, a JNI_INCLUDE environment variable should be set, pointing to any directories containing JNI headers. If this variable is not set, the default is to use the JNI include directories of an OpenJDK 7 installation on Debian.
+Note that for compiling a JNI_INCLUDE environment variable should be set, pointing to any directories containing JNI headers. If this variable is not set, the default is to use the JNI include directories of an OpenJDK 7 installation on Debian.
-# Using flow
+# Including flow
As is with the build, using flow in a project can also be divided into two parts.
-## Front-end
+## 1) Front-end
In your scala/java application, treat flow as if it were a pure scala/java library and build your application with flow as a usual dependency. When using sbt to build your application, you can add flow as a dependency with the following line:
- libraryDependencies += "com.github.jodersky" %% "flow" % "2.0.0"
+ libraryDependencies += "com.github.jodersky" %% "flow" % "2.0.0-RC2"
-## Back-end
+## 2) Back-end
When running your application or any other application that relies on it, the native library must be included in java's library path. To do so, you have several options depending on the type of build you performed (see previous section).
### Manual or package-based installation