Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1008 Bytes

README-emscripten.md

File metadata and controls

37 lines (24 loc) · 1008 Bytes
 
1
2
3
4
5
Emscripten
================================================================================
Build:
Jun 26, 2015
Jun 26, 2015
6
7
8
$ mkdir build
$ cd build
$ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
9
10
11
12
$ emmake make
Or with cmake:
Jun 26, 2015
Jun 26, 2015
13
14
15
16
$ mkdir build
$ cd build
$ emcmake cmake ..
$ emmake make
17
18
19
20
21
22
23
24
25
26
27
28
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 somewhere):
Jun 26, 2015
Jun 26, 2015
29
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
30
31
32
33
34
35
36
37
$ 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...