2022-11-22 15:05:05 +03:00
|
|
|
CC=emcc
|
|
|
|
|
|
|
|
all: clean dir asm
|
|
|
|
|
|
|
|
asm:
|
2022-12-12 12:34:53 +03:00
|
|
|
$(CC) sources/yoga/*.cpp sources/yoga/**/*.cpp sources/*.cc \
|
2022-11-22 15:05:05 +03:00
|
|
|
--bind \
|
|
|
|
-Isources \
|
|
|
|
-g0 \
|
|
|
|
-Os \
|
2022-12-12 12:40:36 +03:00
|
|
|
--closure 1 \
|
2022-11-22 15:05:05 +03:00
|
|
|
--memory-init-file 0 \
|
|
|
|
-s WASM=0 \
|
|
|
|
-s WASM_ASYNC_COMPILATION=0 \
|
2022-12-12 12:40:36 +03:00
|
|
|
-s USE_CLOSURE_COMPILER=1 \
|
2022-11-22 15:05:05 +03:00
|
|
|
-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 FILESYSTEM=0 \
|
|
|
|
-s MALLOC="emmalloc" \
|
|
|
|
-s EXPORT_NAME="yoga" \
|
|
|
|
-o dist/asm.js
|
|
|
|
|
|
|
|
clean:
|
2022-12-12 12:34:53 +03:00
|
|
|
rm -rf dist
|
2022-11-22 15:05:05 +03:00
|
|
|
|
|
|
|
dir:
|
|
|
|
mkdir -p dist
|