forked from pinqy520/yoga-layout-wasm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
42 lines (37 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
CC=emcc
all: clean dir wasm asm
wasm:
$(CC) yoga/yoga/*.cpp bindings/*.cc \
--bind -Os --memory-init-file 0 --llvm-lto 1 \
-Iyoga \
-s WASM=1 \
-s WASM_ASYNC_COMPILATION=1 \
-s DISABLE_EXCEPTION_CATCHING=1 \
-s AGGRESSIVE_VARIABLE_ELIMINATION=1 \
-s NO_EXIT_RUNTIME=1 \
-s ASSERTIONS=0 \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s ERROR_ON_UNDEFINED_SYMBOLS=0 \
-s "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['memcpy','memset','malloc','free','strlen']" \
-o build/yoga.mjs
asm:
$(CC) yoga/yoga/*.cpp bindings/*.cc \
--bind -Os --memory-init-file 0 --llvm-lto 1 \
-Iyoga \
-s WASM=0 \
-s ENVIRONMENT='shell,web' \
-s WASM_ASYNC_COMPILATION=1 \
-s DISABLE_EXCEPTION_CATCHING=1 \
-s AGGRESSIVE_VARIABLE_ELIMINATION=1 \
-s NO_EXIT_RUNTIME=1 \
-s ASSERTIONS=0 \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s ERROR_ON_UNDEFINED_SYMBOLS=0 \
-s "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['memcpy','memset','malloc','free','strlen']" \
-o build/yoga.asm.mjs
clean:
rm -rf build
dir:
mkdir -p build