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