From db6353067cf545f4ca6fd854c8e8b4c4145dc537 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 20 Mar 2014 14:13:06 +0100 Subject: Add MuJS submodule, implementation and build. Adds simpler choice of Javascript library to makefiles. Will prefer in order: MuJS, JavaScriptCore, V8, none based on HAVE_MUJS, HAVE_JSCORE, and HAVE_V8. For simplicity, we build mujstest even with no javascript implementation. --- Makerules | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index e52571ec..682160c7 100644 --- a/Makerules +++ b/Makerules @@ -27,10 +27,12 @@ endif # Windows (MINGW) build doesn't use system libraries. ifeq "$(OS)" "MINGW" -NOX11 ?= yes # Mac OS X doesn't have pkg-config so we hard code paths. else ifeq "$(OS)" "MACOS" + +HAVE_X11 ?= yes + SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL SYS_OPENSSL_LIBS = -lcrypto @@ -54,6 +56,8 @@ RANLIB_CMD = xcrun ranlib $@ # Linux uses pkg-config for system libraries. else ifeq "$(OS)" "Linux" +HAVE_X11 ?= yes + ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes" SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto) SYS_OPENSSL_LIBS = $(shell pkg-config --libs libcrypto) @@ -138,6 +142,7 @@ RANLIB_CMD = xcrun ranlib $@ CROSSCOMPILE=yes endif +# TODO: If crosscompiling, why not just call "make libs" instead of this exception? ifeq "$(CROSSCOMPILE)" "yes" -NOX11 ?= yes +HAVE_X11 ?= no endif -- cgit v1.2.3