diff options
author | chai <chaifix@163.com> | 2018-07-28 11:57:16 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-28 11:57:16 +0800 |
commit | ce63f79c7d683d0de398f6ea0483cdd59ec06a62 (patch) | |
tree | 6600b53ed5ba3164252bb75db743ff09532c4d4f /build/lib/SDL2-2.0.5/docs/README-emscripten.md | |
parent | 70eaf47d6505dc40f672fafb61c2b7f084fa798a (diff) |
*update
Diffstat (limited to 'build/lib/SDL2-2.0.5/docs/README-emscripten.md')
-rw-r--r-- | build/lib/SDL2-2.0.5/docs/README-emscripten.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/build/lib/SDL2-2.0.5/docs/README-emscripten.md b/build/lib/SDL2-2.0.5/docs/README-emscripten.md new file mode 100644 index 0000000..9712084 --- /dev/null +++ b/build/lib/SDL2-2.0.5/docs/README-emscripten.md @@ -0,0 +1,35 @@ +Emscripten +================================================================================ + +Build: + + $ mkdir build + $ cd build + $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2" + $ emmake make + +Or with cmake: + + $ mkdir build + $ cd build + $ emcmake cmake .. + $ emmake make + +To build one of the tests: + + $ cd test/ + $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html + +Uses GLES2 renderer or software + +Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere): + +SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/): + + $ EMCONFIGURE_JS=1 emconfigure ../configure + build as usual... + +SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx): + + $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx + build as usual... |