summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-10-01 15:40:07 +0100
committerRobin Watts <robin.watts@artifex.com>2015-10-02 15:53:18 +0100
commit1cf9a6c5092adce610f3e6b33219e09b4383249f (patch)
treed29e194c6468456ae828c1915567c40ba327079f /Makerules
parentc2bb7036e69df477fd3340e6c73cfdae08d9b7b7 (diff)
downloadmupdf-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.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules20
1 files changed, 20 insertions, 0 deletions
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.