summaryrefslogtreecommitdiff
path: root/platform/javascript/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/SCsub')
-rw-r--r--platform/javascript/SCsub10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub
index 7a8005fe30..1d3f96a6b8 100644
--- a/platform/javascript/SCsub
+++ b/platform/javascript/SCsub
@@ -67,6 +67,16 @@ else:
sys_env.Depends(build[0], sys_env["JS_LIBS"])
+if "JS_PRE" in env:
+ for js in env["JS_PRE"]:
+ env.Append(LINKFLAGS=["--pre-js", env.File(js).path])
+ env.Depends(build, env["JS_PRE"])
+
+if "JS_EXTERNS" in env:
+ for ext in env["JS_EXTERNS"]:
+ env["ENV"]["EMCC_CLOSURE_ARGS"] += " --externs " + ext.path
+ env.Depends(build, env["JS_EXTERNS"])
+
engine = [
"js/engine/preloader.js",
"js/engine/utils.js",