Install the Xcode command line tools
xcode-select --install
Install emscripten.
Install SDL2 via Homebrew and run make
$ brew install sdl2 sdl2_image sdl2_ttf
$ make
Run the native build with ./build/tetris
or the Web Assembly build using the index.html
file through a web server. E.g.
$ python -m SimpleHTTPServer 8080