docs/README-emscripten.txt
changeset 9278 8900afb78a19
child 9293 d0667f0e808a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/README-emscripten.txt	Thu Dec 18 00:19:52 2014 -0500
     1.3 @@ -0,0 +1,26 @@
     1.4 +Build:
     1.5 +$ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
     1.6 +$ emmake make
     1.7 +
     1.8 +Or with cmake:
     1.9 +$ emconfigure cmake ..
    1.10 +$ make
    1.11 +
    1.12 +To build one of the tests -
    1.13 +$ cd test/
    1.14 +$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
    1.15 +
    1.16 +Uses GLES2 renderer or software
    1.17 +
    1.18 +tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
    1.19 +
    1.20 +Some other SDL2 libraries can be easily built (assuming SDL2 is installed somwhere):
    1.21 +
    1.22 +SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
    1.23 +    $ EMCONFIGURE_JS=1 emconfigure ../configure
    1.24 +    build as usual...
    1.25 +
    1.26 +SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
    1.27 +    $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
    1.28 +    build as usual...
    1.29 +