diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-10-01 15:40:07 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-10-02 15:53:18 +0100 |
commit | 1cf9a6c5092adce610f3e6b33219e09b4383249f (patch) | |
tree | d29e194c6468456ae828c1915567c40ba327079f | |
parent | c2bb7036e69df477fd3340e6c73cfdae08d9b7b7 (diff) | |
download | mupdf-1cf9a6c5092adce610f3e6b33219e09b4383249f.tar.xz |
Bug 696117: Add NaCl cross compile rules.
Add NaCl cross compile rules to Makerules (together with a tiny
header tweak). Thanks to Robert Bamler for the rules to include.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makerules | 20 | ||||
-rw-r--r-- | include/mupdf/fitz/system.h | 2 |
3 files changed, 23 insertions, 1 deletions
@@ -37,3 +37,5 @@ platform/android/.classpath platform/android/.project platform/android/.settings docs/browse +include/mupdf/pdf/name-table.h +source/pdf/pdf-name-table.h @@ -138,6 +138,26 @@ AR = x86_64-w64-mingw32-ar CROSSCOMPILE=yes endif +ifeq "$(OS)" "pnacl-cross" +VALID_TOOLCHAINS := pnacl +TARGET = mupdf +include $(NACL_SDK_ROOT)/tools/common.mk +CC = $(PNACL_CC) +CXX = $(PNACL_CXX) +LD = $(PNACL_LD) +AR = $(PNACL_LIB) +CFLAGS += -D__NACL__ +CROSSCOMPILE=yes + +# Don't install libjpeg, libz, or libfreetype, since these are already +# provided by naclports and the versions compiled here cause problems +# with nacl. +install-nacl-libs: $(OUT)/libmupdf.a $(OUT)/libmujs.a $(OUT)/libjbig2dec.a $(OUT)/libopenjpeg.a + install -d $(LIBDIR)/$(TOOLCHAIN)/$(CONFIG)/ + install $(OUT)/libmupdf.a $(OUT)/libmujs.a $(OUT)/libjbig2dec.a $(OUT)/libopenjpeg.a $(LIBDIR)/$(TOOLCHAIN)/$(CONFIG)/ +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. diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h index 3698c8ed..f4967ebe 100644 --- a/include/mupdf/fitz/system.h +++ b/include/mupdf/fitz/system.h @@ -48,7 +48,7 @@ #ifdef __APPLE__ #define HAVE_SIGSETJMP -#elif defined(__unix) +#elif defined(__unix) && !defined(__NACL__) #define HAVE_SIGSETJMP #endif |