From 1cf9a6c5092adce610f3e6b33219e09b4383249f Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 1 Oct 2015 15:40:07 +0100 Subject: 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. --- .gitignore | 2 ++ Makerules | 20 ++++++++++++++++++++ include/mupdf/fitz/system.h | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 78ff7fd0..2cfbd4b8 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makerules b/Makerules index 590a75ae..20dfeb5c 100644 --- a/Makerules +++ b/Makerules @@ -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 -- cgit v1.2.3