4 # This is a POSIX-make-compatible makefile for building the sqlite3
5 # JNI library from "dist" zip file. It must be edited to set the
6 # proper top-level JDK directory and, depending on the platform, add a
7 # platform-specific -I directory. It should build as-is with any
8 # 2020s-era version of gcc or clang. It requires JDK version 8 or
9 # higher and that JAVA_HOME points to the top-most installation
10 # directory of that JDK. On Ubuntu-style systems the JDK is typically
11 # installed under /usr/lib/jvm/java-VERSION-PLATFORM.
15 JAVA_HOME
= /usr
/lib
/jvm
/java-1.8
.0-openjdk-amd64
19 -I
$(JAVA_HOME
)/include \
20 -I
$(JAVA_HOME
)/include/linux \
21 -I
$(JAVA_HOME
)/include/apple \
22 -I
$(JAVA_HOME
)/include/bsd \
26 -DSQLITE_ENABLE_RTREE \
27 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
28 -DSQLITE_ENABLE_STMTVTAB \
29 -DSQLITE_ENABLE_DBPAGE_VTAB \
30 -DSQLITE_ENABLE_DBSTAT_VTAB \
31 -DSQLITE_ENABLE_BYTECODE_VTAB \
32 -DSQLITE_ENABLE_OFFSET_SQL_FUNC \
33 -DSQLITE_OMIT_LOAD_EXTENSION \
34 -DSQLITE_OMIT_DEPRECATED \
35 -DSQLITE_OMIT_SHARED_CACHE \
36 -DSQLITE_THREADSAFE
=1 \
37 -DSQLITE_TEMP_STORE
=2 \
39 -DSQLITE_ENABLE_FTS5 \
42 sqlite3-jni.dll
= libsqlite3-jni.so
44 @echo
"************************************************************************"; \
45 echo
"*** If this fails to build, be sure to edit this makefile ***"; \
46 echo
"*** to configure it for your system. ***"; \
47 echo
"************************************************************************"
48 $(CC
) $(CFLAGS
) $(SQLITE_OPT
) \
49 src
/sqlite3-jni.c
-shared
-o
$@
50 @echo
"Now try running it with: make test"
52 test.flags
= -Djava.library.path
=. sqlite3-jni-
*.jar
53 test: $(sqlite3-jni.dll
)
54 java
-jar
$(test.flags
)
55 java
-jar
$(test.flags
) -t
7 -r
10 -shuffle
58 -rm -f
$(sqlite3-jni.dll
)
60 all: $(sqlite3-jni.dll
)