aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-11-17 20:35:56 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-11-17 20:35:56 -0800
commit0e278173c9a3b07e165abdfd08eb95cd1d4325e0 (patch)
tree6a20c0d0cce3d27e768f7ad23418eed12c8921be
parent77efd8b75777e43a3b2fc4eff61b2ef186a08ff2 (diff)
parent0093586dc8aeee334f5cdd3638bac5ef837816a6 (diff)
Merge pull request #121 from LCID-Fire/scons_docu
Add first comments to guide to SCons setup
-rwxr-xr-xtools/emmaken.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/emmaken.py b/tools/emmaken.py
index 8e2144b2..a509b940 100755
--- a/tools/emmaken.py
+++ b/tools/emmaken.py
@@ -51,6 +51,21 @@ Example uses:
SET(CMAKE_AR "PATH/emmaken.py")
SET(CMAKE_RANLIB "PATH/emmaken.py")
+ * For SCons the shared.py can be imported like so:
+ __file__ = str(Dir('#/project_path_to_emscripten/dummy/dummy'))
+ __rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+ def path_from_root(*pathelems):
+ return os.path.join(__rootpath__, *pathelems)
+ exec(open(path_from_root('tools', 'shared.py'), 'r').read())
+
+ For using the Emscripten compilers/linkers/etc. you can do:
+ env = Environment()
+ ...
+ env.Append(CCFLAGS = COMPILER_OPTS)
+ env.Replace(LINK = LLVM_LD)
+ env.Replace(LD = LLVM_LD)
+ TODO: Document all relevant setup changes
+
After setting that up, run your build system normally. It should generate
LLVM instead of the normal output, and end up with .ll files that you can
give to Emscripten. Note that this tool doesn't run Emscripten itself. Note