forked from shuding/yoga-wasm-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (62 loc) · 1.33 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
CC=emcc
all: clean dir wasm asm
wasm:
$(CC) yoga/yoga/*.cpp yoga/yoga/**/*.cpp yoga/javascript/src_native/*.cc \
--bind \
-Iyoga \
-g0 \
-O3 \
-flto \
-std=c++14 \
-fno-exceptions \
-fno-rtti \
-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 \
--closure 1 \
-s WASM=1 \
-s WASM_ASYNC_COMPILATION=1 \
-s USE_CLOSURE_COMPILER=1 \
-s USE_ES6_IMPORT_META=0 \
-s ASSERTIONS=0 \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s DYNAMIC_EXECUTION=0 \
-s TEXTDECODER=0 \
-s ENVIRONMENT='web' \
-s FETCH_SUPPORT_INDEXEDDB=0 \
-s FILESYSTEM=0 \
-s MALLOC="emmalloc" \
-s INCOMING_MODULE_JS_API=['instantiateWasm']\
-s EXPORT_NAME="yoga" \
-o tmp/yoga.mjs
asm:
$(CC) yoga/yoga/*.cpp yoga/yoga/**/*.cpp yoga/javascript/src_native/*.cc \
--bind \
-Iyoga \
-g0 \
-Os \
-flto \
-std=c++14 \
-fno-exceptions \
-fno-rtti \
-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 \
--closure 1 \
--memory-init-file 0 \
-s WASM=0 \
-s WASM_ASYNC_COMPILATION=0 \
-s USE_CLOSURE_COMPILER=1 \
-s USE_ES6_IMPORT_META=0 \
-s ASSERTIONS=0 \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s DYNAMIC_EXECUTION=0 \
-s TEXTDECODER=0 \
-s ENVIRONMENT='web' \
-s FETCH_SUPPORT_INDEXEDDB=0 \
-s FILESYSTEM=0 \
-s MALLOC="emmalloc" \
-s EXPORT_NAME="yoga" \
-o tmp/yoga-asm.mjs
clean:
rm -rf tmp
dir:
mkdir -p tmp