summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-10-13 20:19:30 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-11-01 23:46:56 +0100
commit33483b52654822b58390ebd2711b13b2dece8740 (patch)
tree981549a13f6754b5980d796ef886a57144636155 /Makerules
parenta89c74cd325b3ee670ba430756eec267a49400c0 (diff)
downloadmupdf-33483b52654822b58390ebd2711b13b2dece8740.tar.xz
Add skeleton iOS viewer project.
Support cross compiling for iPhone and iPad targets using the makefile.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 63a75d6a..43ba78e5 100644
--- a/Makerules
+++ b/Makerules
@@ -34,6 +34,7 @@ ifeq "$(OS)" "Darwin"
SYS_FREETYPE_INC := -I/usr/X11R6/include/freetype2
CFLAGS += -I/usr/X11R6/include
LDFLAGS += -L/usr/X11R6/lib
+RANLIB_CMD = ranlib $@
X11_LIBS := -lX11 -lXext
ifeq "$(arch)" "amd64"
CFLAGS += -m64
@@ -56,6 +57,7 @@ endif
# cygwin)
# 2) do a non cross compile build (e.g. windows in MSVC) first.
# 3) download the generated files from mupdf.com.
+
ifeq "$(OS)" "beagle-cross"
CC = arm-none-linux-gnueabi-gcc
LD = arm-none-linux-gnueabi-gcc
@@ -82,3 +84,23 @@ CFLAGS += -O3 -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -ffast-math -fsingl
CROSSCOMPILE=yes
NOX11=yes
endif
+
+ifeq "$(OS)" "iphonesimulator"
+CC = $(PLATFORM_DEVELOPER_BIN_DIR)/gcc
+AR = $(PLATFORM_DEVELOPER_BIN_DIR)/ar
+CFLAGS += -arch i386 -isysroot $(SDKROOT)
+LDFLAGS += -arch i386 -isysroot $(SDKROOT)
+RANLIB_CMD = $(PLATFORM_DEVELOPER_BIN_DIR)/ranlib $@
+CROSSCOMPILE=yes
+NOX11=yes
+endif
+
+ifeq "$(OS)" "iphoneos"
+CC = $(PLATFORM_DEVELOPER_BIN_DIR)/gcc
+AR = $(PLATFORM_DEVELOPER_BIN_DIR)/ar
+CFLAGS += -arch armv7 -isysroot $(SDKROOT)
+LDFLAGS += -arch armv7 -isysroot $(SDKROOT)
+RANLIB_CMD = $(PLATFORM_DEVELOPER_BIN_DIR)/ranlib $@
+CROSSCOMPILE=yes
+NOX11=yes
+endif