Commit 08a8a8dc authored by Brateau Etienne's avatar Brateau Etienne Committed by Jean-Baptiste Kempf
Browse files

(patch) Add a target for emscripten in contribs and set values for the...

(patch) Add a target for emscripten in contribs and set values for the compilation toolchain variables
parent 29968a60
From 1969a3ccb872448ac8938bffa9aef34f8af51b3b Mon Sep 17 00:00:00 2001
From: Etienne Brateau <etienne.brateau@gmail.com>
Date: Fri, 25 Aug 2017 12:05:38 +0200
Subject: [PATCH 2/6] Add an emscripten target in contrib (bootstrap and
main.mak) and set values for toolchain variable.
---
contrib/bootstrap | 3 +++
contrib/src/main.mak | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 218487e2ab..6c39691be9 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -340,6 +340,9 @@ case "${OS}" in
*solaris*)
add_make_enabled "HAVE_SOLARIS"
;;
+ *emscripten*)
+ add_make_enabled "HAVE_EMSCRIPTEN"
+ ;;
esac
#
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 79cf780d23..15c0d72efb 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -109,6 +109,14 @@ CXX := clang++
endif
endif
+ifdef HAVE_EMSCRIPTEN
+CC := emcc
+CXX := em++
+LD := emcc
+AR := emar
+RANLIB := emranlib
+endif
+
ifdef HAVE_MACOSX
MIN_OSX_VERSION=10.7
EXTRA_CFLAGS += -isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MIN_OSX_VERSION) -DMACOSX_DEPLOYMENT_TARGET=$(MIN_OSX_VERSION)
--
2.14.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment