Browse Source

Rewrite from scratch

heck 5 months ago
2 changed files with 61 additions and 58 deletions
  1. +15
  2. +46

+ 15
- 11
Makefile View File

@ -3,32 +3,36 @@
# This file may be used under the terms of the GNU General Public License version 3
# see LICENSE.txt
.PHONY: all src test clean doxy-all doxy-cxx doxy-java doxy-clean install uninstall
.PHONY: all compile test clean doc doc-cxx doc-java clean-doc install uninstall
all: src
all: compile
$(MAKE) -C src
test: src
test: compile
$(MAKE) -C test/java/foundation/pEp/jniadapter/test/ compile
clean-all: clean clean-doc
$(MAKE) -C src clean
$(MAKE) -C test/java/foundation/pEp/jniadapter/test/ clean clean-pep-home
# Generate API Documentation
doxy-all: doxy-cxx doxy-java
rm -rf doc/doxygen/cxx
rm -rf doc/doxygen/java
doxy-cxx: src
# Generate API Documentation
doc: doc-cxx doc-java
dox-cxx: compile
cd doc/doxygen; doxygen doxyfile-cxx
doxy-java: src
doc-java: compile
cd doc/doxygen; doxygen doxyfile-java
rm -rf doc/doxygen/cxx
rm -rf doc/doxygen/java
$(MAKE) -C src install

+ 46
- 47 View File

@ -1,67 +1,66 @@
# p≡p JNI Adapter
More complete developer instructions can be found here: []().
## Prerequisites
Please find the complete build instructions here:
### yml2
To set up yml2 properly, consult the documentation of pEp Engine (linked below). yml2 is a build dependency of pEp Engine.
## Build Result
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
Any gcc or clang distribution offered by your OS is fine.
## Build Configuration
### pEp Engine
Instructions for obtaining the pEp Engine can be found on []().
The build configuration file is called `local.conf`.
Use the file `local.conf.example` as a template.
### libpEpAdapter
Instructions for obtaining libpEpAdapter can be found on []().
cp local.conf.example local.conf
### Java 8 (or newer) JDK
Download Oracle Java from []().
Then, tweak it to your needs.
OpenJDK can be installed from macports on macOS with one of the following commands:
## Make Targets
sudo port install openjdk8
sudo port install openjdk11
The default make target is `compile`.
## 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:
* `Makefile.conf` - Defaults
* `local.conf` - optional cfg (overwrites existing values)
* `src/local.conf`- optional cfg for src dir (overwrites existing values)
### Test
* `make test`
Builds the complete test-suite under `./test`.
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`
Removes all the generated API doc.
* `make clean-all`
Equals `make clean` and `make clean-doc`
### Generate API Documentation
In order to generate the API doc you need to have doxygen installed on your system.
* `make doc`
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 src
On macOS:
make src
(The GNU Make distributed with macOS might be too old, in this case install GNU Make "gmake" from macPorts).
* `make uninstall`
Removes all the filenames under `./dist` from $PREFIX (local.conf)