author Ryan C. Gordon <>
Fri, 12 Aug 2016 19:59:00 -0400
changeset 10266 c09f06c4e8c8
parent 9782 fcf237e5e834
permissions -rw-r--r--
emscripten: send fake mouse events for touches, like other targets do. (This really should be handled at the higher level and not in the individual targets, but this fixes the immediate bug.)



    $ mkdir build
    $ cd build
    $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false 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 (

    $ EMCONFIGURE_JS=1 emconfigure ../configure
    build as usual...

SDL_gfx (

    $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
    build as usual...