migrate to emscripten

This commit is contained in:
Dmitry Ivakhnenko
2022-11-22 15:05:05 +03:00
parent 35f3335efc
commit 8d3e02f565
17 changed files with 311 additions and 895 deletions

31
javascript/Makefile Normal file
View File

@@ -0,0 +1,31 @@
CC=emcc
all: clean dir asm
asm:
$(CC) sources/yoga/*.cpp sources/*.cc \
--bind \
-Isources \
-g0 \
-Os \
--memory-init-file 0 \
-s WASM=0 \
-s WASM_ASYNC_COMPILATION=0 \
-s USE_ES6_IMPORT_META=0 \
-s MODULARIZE=1 \
-s ASSERTIONS=0 \
-s ALLOW_MEMORY_GROWTH=1 \
-s DYNAMIC_EXECUTION=0 \
-s TEXTDECODER=0 \
-s ENVIRONMENT='web' \
-s ERROR_ON_UNDEFINED_SYMBOLS=0 \
-s FILESYSTEM=0 \
-s MALLOC="emmalloc" \
-s EXPORT_NAME="yoga" \
-o dist/asm.js
clean:
rm -rf dist
dir:
mkdir -p dist