2014-12-28 22:02:17 +01:00
|
|
|
Emscripten
|
|
|
|
================================================================================
|
|
|
|
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
Build:
|
2014-12-28 22:02:17 +01:00
|
|
|
|
|
|
|
$ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
|
|
|
|
$ emmake make
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
|
|
|
|
Or with cmake:
|
2014-12-28 22:02:17 +01:00
|
|
|
|
|
|
|
$ emconfigure cmake ..
|
|
|
|
$ make
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
|
2014-12-25 22:07:15 +01:00
|
|
|
To build one of the tests:
|
2014-12-28 22:02:17 +01:00
|
|
|
|
|
|
|
$ cd test/
|
|
|
|
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
|
|
|
|
Uses GLES2 renderer or software
|
|
|
|
|
|
|
|
tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
|
|
|
|
|
2014-12-25 22:07:15 +01:00
|
|
|
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
|
|
|
|
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
|
2014-12-28 22:02:17 +01:00
|
|
|
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
$ EMCONFIGURE_JS=1 emconfigure ../configure
|
|
|
|
build as usual...
|
|
|
|
|
|
|
|
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
2014-12-28 22:02:17 +01:00
|
|
|
|
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!)
2014-12-18 06:19:52 +01:00
|
|
|
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
|
|
|
|
build as usual...
|