README-emscripten.txt 816 B

1234567891011121314151617181920212223242526
  1. Build:
  2. $ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
  3. $ emmake make
  4. Or with cmake:
  5. $ emconfigure cmake ..
  6. $ make
  7. To build one of the tests:
  8. $ cd test/
  9. $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
  10. Uses GLES2 renderer or software
  11. tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
  12. Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
  13. SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
  14. $ EMCONFIGURE_JS=1 emconfigure ../configure
  15. build as usual...
  16. SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
  17. $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
  18. build as usual...