summaryrefslogtreecommitdiff
path: root/platform/java
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-03-21 16:04:51 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-03-21 16:09:22 +0100
commit479f9481f039a69ff5c145522ec9a45c35a1b3d4 (patch)
treee3db50d79e887a69d3f688d471affe66e86e52a7 /platform/java
parent4022d1bb49a7ece2ffa1d88bbe9ae4839e27132b (diff)
downloadmupdf-479f9481f039a69ff5c145522ec9a45c35a1b3d4.tar.xz
jni: Use system freetype and zlib.
AWT pulls in the system freetype library, which in turn pulls in system zlib. Avoid symbol collisions and possible header/library conflicts by using the system libraries for desktop java builds.
Diffstat (limited to 'platform/java')
-rw-r--r--platform/java/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/java/Makefile b/platform/java/Makefile
index 7a7448cb..3e7df255 100644
--- a/platform/java/Makefile
+++ b/platform/java/Makefile
@@ -10,7 +10,10 @@ VIEWER_JAVA_SOURCES := $(sort $(wildcard *.java))
VIEWER_JAVA_OBJECTS := $(VIEWER_JAVA_SOURCES:%.java=%.class)
$(MUPDF_CORE) :
- $(MAKE) -C ../.. OUT=build/java XCFLAGS=-fPIC build=release libs
+ $(MAKE) -C ../.. OUT=build/java XCFLAGS=-fPIC \
+ FREETYPE_DIR=/use/system/library \
+ ZLIB_DIR=/use/system/library \
+ build=release libs
$(LIBRARY_JAVA_OBJECTS) : $(LIBRARY_JAVA_SOURCES)
javac $^
@@ -33,7 +36,7 @@ mupdf_native.o : mupdf_native.c mupdf_native.h
-o $@ -c $<
libmupdf_java.so : mupdf_native.o $(MUPDF_CORE)
- $(CC) -shared -o $@ $^
+ $(CC) -shared -o $@ $^ -lfreetype -lz
$(VIEWER_JAVA_OBJECTS) : $(VIEWER_JAVA_SOURCES)
javac $^
@@ -48,6 +51,6 @@ clean:
rm -f libmupdf_java.so
nuke: clean
- $(MAKE) -C ../.. OUT=build/java clean
+ $(MAKE) -C ../.. build=release OUT=build/java clean
.NOTPARALLEL : # disable -j option (it breaks since javac compiles all class files in one command)