File tree 4 files changed +40
-0
lines changed
src/java/datalevin/javacpp
4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ * .class
Original file line number Diff line number Diff line change
1
+ [submodule "lmdb "]
2
+ path = src/c/lmdb
3
+ url = https://github.com/LMDB/lmdb
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ cd src/java
4
+
5
+ # generate Lib.java
6
+ java -jar ../../javacpp.jar datalevin/javacpp/Config.java
7
+
8
+ # compile native library
9
+ java -jar ../../javacpp.jar datalevin/javacpp/Lib.java
Original file line number Diff line number Diff line change
1
+ package datalevin .javacpp ;
2
+
3
+ import org .bytedeco .javacpp .*;
4
+ import org .bytedeco .javacpp .annotation .*;
5
+ import org .bytedeco .javacpp .tools .*;
6
+
7
+ @ Properties (
8
+ value = @ Platform (
9
+ includepath = {"/usr/include" , "../src/c" },
10
+ cinclude = {"lmdb/libraries/liblmdb/lmdb.h" , "dtlv.h" },
11
+ linkpath = {"../src/c" },
12
+ link = {"dtlv" , "lmdb" }
13
+ ),
14
+ target = "datalevin.javacpp.Lib"
15
+ )
16
+ public class Config implements InfoMapper {
17
+ public void map (InfoMap infoMap ) {
18
+ infoMap
19
+ .put (new Info ("mdb_mode_t" ).cast ().valueTypes ("int" ).pointerTypes ("IntPointer" , "IntBuffer" , "int[]" ))
20
+ .put (new Info ("mdb_filehandle_t" ).cast ().valueTypes ("int" ).pointerTypes ("IntPointer" ))
21
+ .put (new Info ("MDB_VERINT" ).cppText ("#define MDB_VERINT" ))
22
+ .put (new Info ("MDB_VERSION_FULL" ).cppText ("#define MDB_VERSION_FULL" ))
23
+ .put (new Info ("MDB_VERSTR" ).cppText ("#define MDB_VERSTR" ))
24
+ .put (new Info ("MDB_VERFOO" ).cppText ("#define MDB_VERFOO" ))
25
+ .put (new Info ("MDB_VERSION_STRING" ).cppText ("#define MDB_VERSION_STRING" ));
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments