Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/projectM-emscripten/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ${my_CFLAGS} \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-I${top_srcdir}/src/libprojectM \
-I${top_srcdir}/src/libprojectM/Renderer \
USE_SDL=2 \
${SDL_CFLAGS}

REALSRCDIR=${top_srcdir}/src/projectM-sdl
Expand All @@ -14,5 +13,3 @@ projectW_bc_SOURCES = $(REALSRCDIR)/pmSDL.cpp $(REALSRCDIR)/projectM_SDL_main.cp
projectW_bc_LDADD = ${SDL_LIBS} ${top_srcdir}/src/libprojectM/libprojectM.la
projectW_bc_LDFLAGS = -static -s USE_SDL=2
projectW_bc_PROGRAM = projectW.bc

# emcc -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 projectW.bc -o projectW.html
20 changes: 12 additions & 8 deletions src/projectM-emscripten/README
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
Building w/ emscripten

* Activate the emsdk
## Crepare
* Activate the emsdk (https://github.com/juj/emsdk#installation-instructions)
* make sure you are in the root directory of this project
* on fresh repositories: `./autogen.sh`

## Compile
* `emconfigure ./configure --enable-emscripten --enable-gles --enable-sdl`
* `emmake make -j4`

## Create wasm & html files
* `cd src/projectM-emscripten`
* `emcc -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 projectW.bc -o projectW.html`

Does not work? Try:



emcc -I../libprojectm -I../libprojectM/Renderer -Llib \
../libprojectM/KeyHandler.cpp projectM_SDL_emscripten.cpp \
-lRenderer -lprojectM -lMilkdropPresetFactory -lprojectM -lRenderer \
-s USE_SDL=2 -s LEGACY_GL_EMULATION=1 \
-o build/projectEM.html
* `mkdir vendor && cp /usr/local/Cellar/glm/xx/include/glm ./vendor/`
* `emmake make -j4 -lvendor`