diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-05-29 10:01:59 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-05-29 10:01:59 +0200 |
commit | ec55f364751749dfbda1192d3368be771ed5b5a5 (patch) | |
tree | ae68506c79ccf76905fe3844bc26da67ac2dbed1 /Makethird | |
parent | a29d92e6cd33325a21974b15a788bbe94736f59b (diff) | |
download | mupdf-ec55f364751749dfbda1192d3368be771ed5b5a5.tar.xz |
Add rules to configure and build openssl if it is present in thirdparty.
Also sets the -DHAVE_OPENSSL flag.
Diffstat (limited to 'Makethird')
-rw-r--r-- | Makethird | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -10,6 +10,7 @@ FREETYPE_DIR := thirdparty/freetype JBIG2DEC_DIR := thirdparty/jbig2dec JPEG_DIR := thirdparty/jpeg OPENJPEG_DIR := thirdparty/openjpeg +OPENSSL_DIR := thirdparty/openssl ZLIB_DIR := thirdparty/zlib # --- V8 --- @@ -261,6 +262,34 @@ ZLIB_CFLAGS := $(SYS_ZLIB_CFLAGS) ZLIB_LIBS := $(SYS_ZLIB_LIBS) endif +# --- OpenSSL --- + +ifneq "$(wildcard $(OPENSSL_DIR)/README)" "" + +OPENSSL_LIB := $(OUT)/libcrypto.a + +OPENSSL_DIR_MAK := $(OPENSSL_DIR)/Makefile +OPENSSL_DIR_LIB := $(OPENSSL_DIR)/libcrypto.a + +$(OPENSSL_DIR_MAK): + cd $(OPENSSL_DIR) && ./config no-threads no-zlib no-shared no-asm no-dso + +$(OPENSSL_DIR_LIB): $(OPENSSL_DIR_MAK) + $(MAKE) -C $(OPENSSL_DIR) build_crypto + +$(OPENSSL_LIB): $(OPENSSL_DIR_LIB) | $(OUT) + cp $(OPENSSL_DIR_LIB) $(OPENSSL_LIB) + +openssl-clean: + $(MAKE) -C $(OPENSSL_DIR) clean + rm -f thirdparty/openssl/Makefile thirdparty/openssl/libcrypto.a + +OPENSSL_CFLAGS := -DHAVE_OPENSSL -I$(OPENSSL_DIR)/include +else +OPENSSL_CFLAGS := $(SYS_OPENSSL_CFLAGS) +OPENSSL_LIBS := $(SYS_OPENSSL_LIBS) +endif + # --- X11 --- ifeq "$(NOX11)" "" |