Initial merge of Emscripten port!
With this commit, you can compile SDL2 with Emscripten ( http://emscripten.org/ ), and make your SDL-based C/C++ program into a web app. This port was due to the efforts of several people, including: Charlie Birks, Sathyanarayanan Gunasekaran, Jukka Jylänki, Alon Zakai, Edward Rudd, Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!) --HG-- extra : rebase_source : 97af74c8a5121e926ebe89f123536b5dd6681695
This commit is contained in:
parent
c2ebb6b09f
commit
de88474dda
61 changed files with 4047 additions and 600 deletions
26
docs/README-emscripten.txt
Normal file
26
docs/README-emscripten.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
Build:
|
||||
$ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
|
||||
$ emmake make
|
||||
|
||||
Or with cmake:
|
||||
$ emconfigure cmake ..
|
||||
$ 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
|
||||
|
||||
tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
|
||||
|
||||
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somwhere):
|
||||
|
||||
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...
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue