Skip to content

Commit 07b43cf

Browse files
committed
better Makefile
1 parent 7b8de04 commit 07b43cf

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Makefile

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
EM_CXX_FLAG := -s DEMANGLE_SUPPORT=1 -s EXPORTED_FUNCTIONS='["_make_bin"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "FS_createDataFile", "FS_readFile", "FS_unlink"]' -s ALLOW_MEMORY_GROWTH=1
2+
O3 := -O3
3+
WASM := -s WASM=1
4+
15
all:
26
g++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -I .
37
release:
4-
g++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -O3 -I .
8+
g++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -I . ${O3}
59
em:
6-
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++-s -s DEMANGLE_SUPPORT=1 -I . -s EXPORTED_FUNCTIONS='["_make_bin"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "FS_createDataFile", "FS_readFile"]' -s TOTAL_MEMORY=128MB
7-
10+
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -I . ${EM_CXX_FLAG}
811
em_release:
9-
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++-s -s DEMANGLE_SUPPORT=1 -I . -s EXPORTED_FUNCTIONS='["_make_bin"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "FS_createDataFile", "FS_readFile"]' -O3 -s TOTAL_MEMORY=128MB
10-
12+
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -I . ${EM_CXX_FLAG} ${O3}
1113
wasm:
12-
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++-s -s DEMANGLE_SUPPORT=1 -I . -s EXPORTED_FUNCTIONS='["_make_bin"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "FS_createDataFile", "FS_readFile"]' -s TOTAL_MEMORY=128MB -s WASM=1
13-
14+
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -I . ${EM_CXX_FLAG} ${WASM}
1415
wasm_release:
15-
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++-s -s DEMANGLE_SUPPORT=1 -I . -s EXPORTED_FUNCTIONS='["_make_bin"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "FS_createDataFile", "FS_readFile"]' -O3 -s TOTAL_MEMORY=128MB -s WASM=1
16+
em++ stl2gltf.cpp -std=c++11 -stdlib=libc++ -I . ${EM_CXX_FLAG} ${O3} ${WASM}

0 commit comments

Comments
 (0)