docs/README-emscripten.md
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Sun, 28 Dec 2014 22:00:24 +0100
changeset 9301 7377a9a3aed6
parent 9293 docs/README-emscripten.txt@d0667f0e808a
child 9302 2ddb65f75084
permissions -rw-r--r--
Renamed README-emscripten.txt to README-emscripten.md.
     1 Build:
     2 $ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
     3 $ emmake make
     4 
     5 Or with cmake:
     6 $ emconfigure cmake ..
     7 $ make
     8 
     9 To build one of the tests:
    10 $ cd test/
    11 $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
    12 
    13 Uses GLES2 renderer or software
    14 
    15 tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
    16 
    17 Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
    18 
    19 SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
    20     $ EMCONFIGURE_JS=1 emconfigure ../configure
    21     build as usual...
    22 
    23 SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
    24     $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
    25     build as usual...
    26