
2 changed files with 61 additions and 58 deletions
@ -1,67 +1,66 @@ |
|||||
# p≡p JNI Adapter |
# p≡p JNI Adapter |
||||
More complete developer instructions can be found here: [https://dev.pep.foundation/JNI%20Adapter/Tutorial](). |
|
||||
|
|
||||
## Prerequisites |
Please find the complete build instructions here: |
||||
|
https://dev.pep.foundation/Common%20Adapter%20Documentation/Adapter_Build_Instructions |
||||
|
|
||||
### yml2 |
## Build Result |
||||
To set up yml2 properly, consult the documentation of pEp Engine (linked below). yml2 is a build dependency of pEp Engine. |
The binary package resulting from the build will be located under `./dist`. |
||||
|
It merely contains: |
||||
|
* pEp.jar - The java library |
||||
|
* libpEpJNI.dylib - The dynamically linkable native library |
||||
|
* libpEpJNI.a - The statically linkable native library |
||||
|
|
||||
### C and C++ compiler |
## Build Configuration |
||||
Any gcc or clang distribution offered by your OS is fine. |
|
||||
|
|
||||
### pEp Engine |
The build configuration file is called `local.conf`. |
||||
Instructions for obtaining the pEp Engine can be found on [https://pep.foundation/dev/repos/pEpEngine/file/](). |
Use the file `local.conf.example` as a template. |
||||
|
|
||||
### libpEpAdapter |
```bash |
||||
Instructions for obtaining libpEpAdapter can be found on [https://pep.foundation/dev/repos/libpEpAdapter/file/](). |
cp local.conf.example local.conf |
||||
|
``` |
||||
|
|
||||
### Java 8 (or newer) JDK |
Then, tweak it to your needs. |
||||
Download Oracle Java from [https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html](). |
|
||||
|
|
||||
OpenJDK can be installed from macports on macOS with one of the following commands: |
## Make Targets |
||||
|
|
||||
~~~ |
The default make target is `compile`. |
||||
sudo port install openjdk8 |
|
||||
sudo port install openjdk11 |
|
||||
~~~ |
|
||||
|
|
||||
## Building |
### Build |
||||
|
* `make compile` |
||||
|
Builds the whole adapter under `./build`. |
||||
|
The complete distribution ready adapter will be in `./dist`. |
||||
|
|
||||
Build configuration will be the result of including these files in the following order: |
### Test |
||||
* `Makefile.conf` - Defaults |
* `make test` |
||||
* `local.conf` - optional cfg (overwrites existing values) |
Builds the complete test-suite under `./test`. |
||||
* `src/local.conf`- optional cfg for src dir (overwrites existing values) |
|
||||
|
|
||||
An example `local.conf` looks like this: |
### Clean |
||||
|
* `make clean` |
||||
|
Deletes all the derived objects of the adapter build in `./build` and `./dist`. |
||||
|
Also invokes `make clean` which cleans the whole test-suite. |
||||
|
Does not remove the generated API doc. |
||||
|
|
||||
~~~ |
* `make clean-doc` |
||||
JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home |
Removes all the generated API doc. |
||||
|
|
||||
YML2_PATH=$(HOME)/code/yml2 |
* `make clean-all` |
||||
|
Equals `make clean` and `make clean-doc` |
||||
|
|
||||
ENGINE_INC_PATH=$(HOME)/code/engine/build/include |
### Generate API Documentation |
||||
ENGINE_LIB_PATH=$(HOME)/code/engine/build/lib |
In order to generate the API doc you need to have doxygen installed on your system. |
||||
|
|
||||
AD_INC_PATH=$(HOME)/code/libad/build/include |
* `make doc` |
||||
AD_LIB_PATH=$(HOME)/code/libad/build/lib |
Generates Java and C++ API doc. |
||||
~~~ |
|
||||
|
|
||||
The the foo_PATH variables will be turned into compiler directives (-I / -L), which can be directly set by just omitting "\_PATH" (e.g. ENGINE_INC). They will take priority. |
* `make doc-cxx` |
||||
|
Generates the API doc for the C++ part of the adapter. |
||||
|
|
||||
Depending on what is already set in your environment, or can be found in your default include/library paths, setting any of these variables may be optional on your platform. |
* `make doc-java` |
||||
|
Generates the API doc for the Java part of the adapter. |
||||
|
|
||||
Now, build the Adapter with |
### Install |
||||
|
* `make install` |
||||
|
Installs the files under `./dist` under $PREFIX (local.conf) |
||||
|
|
||||
On Linux: |
* `make uninstall` |
||||
|
Removes all the filenames under `./dist` from $PREFIX (local.conf) |
||||
~~~ |
|
||||
make src |
|
||||
~~~ |
|
||||
|
|
||||
On macOS: |
|
||||
|
|
||||
~~~ |
|
||||
make src |
|
||||
~~~ |
|
||||
|
|
||||
(The GNU Make distributed with macOS might be too old, in this case install GNU Make "gmake" from macPorts). |
|
||||
|
Loading…
Reference in new issue