mirror of https://github.com/encounter/SDL.git
Linked README-emscripten.md in README.md and added markdown formatting.
This commit is contained in:
parent
3e8040f300
commit
69f18b6268
|
@ -1,12 +1,18 @@
|
||||||
|
Emscripten
|
||||||
|
================================================================================
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
|
|
||||||
$ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
|
$ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
|
||||||
$ emmake make
|
$ emmake make
|
||||||
|
|
||||||
Or with cmake:
|
Or with cmake:
|
||||||
|
|
||||||
$ emconfigure cmake ..
|
$ emconfigure cmake ..
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
To build one of the tests:
|
To build one of the tests:
|
||||||
|
|
||||||
$ cd test/
|
$ cd test/
|
||||||
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
|
||||||
|
|
||||||
|
@ -17,10 +23,11 @@ tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
|
||||||
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
|
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
|
||||||
|
|
||||||
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
|
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
|
||||||
|
|
||||||
$ EMCONFIGURE_JS=1 emconfigure ../configure
|
$ EMCONFIGURE_JS=1 emconfigure ../configure
|
||||||
build as usual...
|
build as usual...
|
||||||
|
|
||||||
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
||||||
|
|
||||||
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
|
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
|
||||||
build as usual...
|
build as usual...
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
|
||||||
- [CMake](README-cmake.md)
|
- [CMake](README-cmake.md)
|
||||||
- [DirectFB](README-directfb.md)
|
- [DirectFB](README-directfb.md)
|
||||||
- [DynAPI](README-dynapi.md)
|
- [DynAPI](README-dynapi.md)
|
||||||
|
- [Emscripten](README-emscripten.md)
|
||||||
- [Gesture](README-gesture.md)
|
- [Gesture](README-gesture.md)
|
||||||
- [Mercurial](README-hg.md)
|
- [Mercurial](README-hg.md)
|
||||||
- [iOS](README-ios.md)
|
- [iOS](README-ios.md)
|
||||||
|
|
Loading…
Reference in New Issue