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. --- Makerules | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Makerules') 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. -- cgit v1.2.3