-
Notifications
You must be signed in to change notification settings - Fork 19
Build
All NativeLibs4Java's sub-projects can be built from sources in one step. This includes :
This will build all of NativeLibs4Java's projects, including JNAerator. It will take some time, so you'll want to have a coffee during the build (if you've never used Maven before, this can take up to 15 minutes, so that might be enough for two coffees).
Subsequent builds will be much quicker (see next section), and can be launched from your Maven-aware IDE of choice.
- First, install Maven.
- Checkout nativelibs4java files :
git clone [email protected]:ochafik/nativelibs4java.git
cd nativelibs4java/libraries
- Run the following Maven command :
mvn install -DskipTests
After the build is finished, you'll find JavaCL's full self-contained JAR in OpenCL/JavaCL/target/javacl-xxx-shaded.jar
Note that if you want JavaCL's tests to pass, you'll need to install JOGL 2.x on your system first (see next section)
To build JavaCL Demos, just cd to the libraries/OpenCL/Demos directory and run the following command (works the same for any other sub-project) :
mvn clean install
To avoid launching tests, you can append a -Dmaven.test.skip=true
argument to that command.
Two files in JavaCL's sources rely on the Jogamp JOGL OpenGL bindings (ParticlesDemo.java
and JOGLTest.java
). It should be easy to use the Lightweight Java Game Library (LWJGL) library instead, any contribution in that direction would be welcome.
To proceed with the build, you can delete these files or install JOGL manually.
The JOGL paragraph of the Install page explains how to install the latest version of Jogamp's JOGL on your system in a few seconds.
This is not advised, not supported and reserved to experienced users.
You'll have to edit the autogenerated files after the generation to avoid regressions, use some SVN diff for that.
The current SVN version of OpenCL4Java's wrappings was generated by bits on three platforms).
Run the following command in the OpenCL4Java directory, after a first full build :
mvn jnaerator:jnaerate