diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-09-03 13:17:13 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-09-08 08:21:19 -0500 |
commit | 3408b6a59145df4389f38ba75e095c39bc1c699e (patch) | |
tree | 37a8079e8697c8f4ed67e2c50f553c4788c882d4 /Makerules | |
parent | f9f374998eb8208d300bd71bde28fdcd155f5062 (diff) | |
download | mupdf-3408b6a59145df4389f38ba75e095c39bc1c699e.tar.xz |
ios: Clean up project file.
Strip stupid project build settings.
Add proper "make generate" target that uses the 'macosx' sdkroot.
Rewrite cross compile build script to be more future proof.
Diffstat (limited to 'Makerules')
-rw-r--r-- | Makerules | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -3,6 +3,7 @@ OS ?= $(shell uname) OS := $(OS:MINGW%=MINGW) OS := $(OS:Windows_NT=MINGW) +OS := $(OS:Darwin=MACOS) CFLAGS += -Wall @@ -29,7 +30,7 @@ ifeq "$(OS)" "MINGW" NOX11 ?= yes # Mac OS X doesn't have pkg-config so we hard code paths. -else ifeq "$(OS)" "Darwin" +else ifeq "$(OS)" "MACOS" SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL SYS_OPENSSL_LIBS = -lcrypto @@ -45,10 +46,13 @@ SYS_JBIG2DEC_LIBS = -ljbig2dec SYS_JPEG_LIBS = -ljpeg SYS_ZLIB_LIBS = -lz -RANLIB_CMD = ranlib $@ +CC = xcrun cc +AR = xcrun ar +LD = xcrun ld +RANLIB_CMD = xcrun ranlib $@ -# Other Unixes use pkg-config for system libraries. -else +# Linux uses pkg-config for system libraries. +else ifeq "$(OS)" "Linux" ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes" SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto) @@ -126,9 +130,10 @@ endif # The following section works for both device and simulator builds. ifeq "$(OS)" "ios" -CC = $(PLATFORM_DEVELOPER_BIN_DIR)/gcc -AR = $(PLATFORM_DEVELOPER_BIN_DIR)/ar -RANLIB_CMD = $(PLATFORM_DEVELOPER_BIN_DIR)/ranlib $@ +CC = xcrun cc +AR = xcrun ar +LD = xcrun ld +RANLIB_CMD = xcrun ranlib $@ CROSSCOMPILE=yes endif |