-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jni: Update build files for moved java sources.
- Loading branch information
Showing
10 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ Make* tabs | |
*.[chm] tabs | ||
*.java tabs | ||
*.xml tabs | ||
build.xml spaces | ||
memento.* spaces | ||
*.vcxproj* spaces | ||
jmem* spaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ build | |
DerivedData | ||
generated | ||
cscope.* | ||
*.class | ||
*.jar | ||
*.o | ||
*.so | ||
*.epub | ||
*.pnm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
default: | ||
$(MAKE) -C ../java -f Makejar | ||
ndk-build | ||
ant debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
default: libmupdf_java.so libmupdf.jar | ||
|
||
MUPDF_CORE = ../../build/java/libmupdf.a ../../build/java/libmupdfthird.a | ||
|
||
LIBRARY_JAVA_SOURCES := $(sort $(wildcard com/artifex/mupdf/fitz/*.java)) | ||
LIBRARY_JAVA_OBJECTS := $(LIBRARY_JAVA_SOURCES:%.java=%.class) | ||
LIBRARY_JAVA_CLASSES := $(subst com/artifex/mupdf/fitz/,com.artifex.mupdf.fitz.,$(LIBRARY_JAVA_SOURCES:%.java=%)) | ||
|
||
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 | ||
|
||
$(LIBRARY_JAVA_OBJECTS) : $(LIBRARY_JAVA_SOURCES) | ||
javac $^ | ||
|
||
libmupdf.jar : $(LIBRARY_JAVA_OBJECTS) | ||
rm -f $@ | ||
jar cf $@ $^ | ||
|
||
mupdf_native.h : $(LIBRARY_JAVA_OBJECTS) | ||
rm -f $@ | ||
javah -o $@ $(LIBRARY_JAVA_CLASSES) | ||
|
||
mupdf_native.o : mupdf_native.c mupdf_native.h | ||
$(CC) -g -fPIC -Wall -Wextra -Wno-unused-parameter \ | ||
-I /usr/lib/jvm/java-7-openjdk-amd64/include \ | ||
-I /usr/lib/jvm/java-7-openjdk-amd64/include/linux \ | ||
-I ../../include \ | ||
-o $@ -c $< | ||
|
||
libmupdf_java.so : mupdf_native.o $(MUPDF_CORE) | ||
$(CC) -shared -o $@ $^ -lcrypto | ||
|
||
$(VIEWER_JAVA_OBJECTS) : $(VIEWER_JAVA_SOURCES) | ||
javac $^ | ||
|
||
viewer: libmupdf_java.so $(LIBRARY_JAVA_OBJECTS) $(VIEWER_JAVA_OBJECTS) | ||
LD_LIBRARY_PATH=. java Viewer | ||
|
||
clean: | ||
rm -f com/artifex/mupdf/fitz/*.class | ||
rm -f *.class | ||
rm -f mupdf_native.o | ||
rm -f libmupdf_java.so | ||
|
||
nuke: clean | ||
$(MAKE) -C ../.. OUT=build/java clean | ||
|
||
.NOTPARALLEL : # disable -j option (it breaks since javac compiles all class files in one command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default: | ||
javac com/artifex/mupdf/fitz/*.java | ||
jar cf libmupdf.jar com/artifex/mupdf/fitz/*.class |