diff options
author | LCID Fire <lcid-fire@gmx.net> | 2011-11-17 22:31:11 +0100 |
---|---|---|
committer | LCID Fire <lcid-fire@gmx.net> | 2011-11-17 22:31:11 +0100 |
commit | 0093586dc8aeee334f5cdd3638bac5ef837816a6 (patch) | |
tree | f3b97fffe6f5dada42733d546dbdd04c8b01eccd /tools/emmaken.py | |
parent | 98a7fbd6a30160575c2d092579f806833288b744 (diff) |
Add first comments to guide to SCons setup
Diffstat (limited to 'tools/emmaken.py')
-rwxr-xr-x | tools/emmaken.py | 15 |
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 |