Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patches and build files for mupdf-git
- Loading branch information
1 parent
d5f829a
commit 2513017
Showing
2 changed files
with
69 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /bin/sh | ||
|
||
[ -e thirdparty/README ] && rm -rf thirdparty/* | ||
|
||
make verbose=yes generate | ||
make verbose=yes USE_SYSTEM_LIBS=yes OS=kobo | ||
|
||
arm-linux-gnueabihf-gcc -Wl,--gc-sections -Wl,-s -o build/release/libmupdf.so $(find build/release -name '*.o' | grep -Ev '(SourceHanSerif-Regular|DroidSansFallbackFull|color-lcms)') -lm -L../freetype2/objs/.libs -lfreetype -L../harfbuzz/src/.libs -lharfbuzz -L../jbig2dec/.libs -ljbig2dec -L../libjpeg/.libs -ljpeg -L../openjpeg/build/bin -lopenjp2 -L../zlib -lz -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined |
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,61 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 97ccf19..c16892f 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -200,7 +200,7 @@ $(THIRD_LIB) : $(THIRD_OBJ) | ||
$(THREAD_LIB) : $(THREAD_OBJ) | ||
$(PKCS7_LIB) : $(PKCS7_OBJ) | ||
|
||
-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) | ||
+INSTALL_LIBS := $(MUPDF_LIB) | ||
|
||
# --- Main tools and viewers --- | ||
|
||
@@ -383,7 +383,7 @@ cscope.files: $(shell find include source platform -name '*.[ch]') | ||
cscope.out: cscope.files | ||
cscope -b | ||
|
||
-all: libs apps | ||
+all: libs | ||
|
||
clean: | ||
rm -rf $(OUT) | ||
diff --git a/Makerules b/Makerules | ||
index b62374d..c8a0580 100644 | ||
--- a/Makerules | ||
+++ b/Makerules | ||
@@ -184,6 +184,34 @@ ifeq "$(OS)" "mingw64-cross" | ||
HAVE_WIN32=yes | ||
endif | ||
|
||
+ifeq "$(OS)" "kobo" | ||
+CC = arm-linux-gnueabihf-gcc | ||
+CXX = arm-linux-gnueabihf-gcc++ | ||
+LD = arm-linux-gnueabihf-ld | ||
+AR = arm-linux-gnueabihf-ar | ||
+AS = arm-linux-gnueabihf-as | ||
+CFLAGS += -O2 -fPIC -mcpu=cortex-a9 -mfpu=neon -DTOFU_CJK_LANG -DTOFU_CJK_EXT -DFZ_ENABLE_ICC=0 -DFZ_ENABLE_JS=0 | ||
+CROSSCOMPILE=yes | ||
+HAVE_PTHREAD := yes | ||
+HAVE_LIBCRYPTO := no | ||
+HAVE_X11 := no | ||
+HAVE_GLFW := no | ||
+SYS_PTHREAD_CFLAGS := | ||
+SYS_PTHREAD_LIBS := -lpthread | ||
+SYS_FREETYPE_CFLAGS := -I../freetype2/include | ||
+SYS_FREETYPE_LIBS := -L../freetype2/objs/.libs -lfreetype | ||
+SYS_HARFBUZZ_CFLAGS := -I../harfbuzz/src | ||
+SYS_HARFBUZZ_LIBS := -L../harfbuzz/src/.libs -lharfbuzz | ||
+SYS_OPENJPEG_CFLAGS := -I../openjpeg/src/lib/openjp2 | ||
+SYS_OPENJPEG_LIBS := -L../openjpeg/build/bin -lopenjpeg | ||
+SYS_JBIG2DEC_CFLAGS := -I../jbig2dec | ||
+SYS_JBIG2DEC_LIBS := -L../jbig2dec/.libs -ljbig2dec | ||
+SYS_LIBJPEG_CFLAGS := -I../libjpeg | ||
+SYS_LIBJPEG_LIBS := -L../libjpeg/.libs -ljpeg | ||
+SYS_ZLIB_CFLAGS := -I../zlib | ||
+SYS_ZLIB_LIBS := -L../zlib -lz | ||
+endif | ||
+ | ||
# Most variables when building for iOS are set up in ios/build_libs.sh, | ||
# which is called from the Xcode project as a "Run Script" build step. | ||
# The following section works for both device and simulator builds. |