Skip to content

Instantly share code, notes, and snippets.

@Quon
Forked from dweekly/gist:5873953
Last active December 23, 2015 13:29
Show Gist options
  • Select an option

  • Save Quon/6642355 to your computer and use it in GitHub Desktop.

Select an option

Save Quon/6642355 to your computer and use it in GitHub Desktop.
# Based on https://github.com/kripken/emscripten/wiki/Tutorial
# prerequisites
cd ~/src
sudo ln -s /usr/bin/python2.7 /usr/bin/python2
curl http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-apple-darwin11.tar.gz > llvm.tgz
tar xzvf llvm.tgz
ln -s clang+llvm-3.2-x86_64-apple-darwin11 llvm
# emscripten
git clone git://github.com/kripken/emscripten.git
cd emscripten
LLVM=~/src/llvm/bin ./emcc
LLVM=~/src/llvm/bin ./emcc tests/hello_world.cpp -o hello.html
open hello.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment