cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

README-emscripten.md (931B)


      1Emscripten
      2================================================================================
      3
      4Build:
      5
      6    $ mkdir build
      7    $ cd build
      8    $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2"
      9    $ emmake make
     10
     11Or with cmake:
     12
     13    $ mkdir build
     14    $ cd build
     15    $ emcmake cmake ..
     16    $ emmake make
     17
     18To build one of the tests:
     19
     20    $ cd test/
     21    $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
     22
     23Uses GLES2 renderer or software
     24
     25Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
     26
     27SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
     28
     29    $ EMCONFIGURE_JS=1 emconfigure ../configure
     30    build as usual...
     31
     32SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
     33
     34    $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
     35    build as usual...