Start work on WebGL bindings
[wasm.git] / Makefile
index 5bfb9adb0901451fe3ea5fcaa3b68f41884345ef..13a9c43ca20dff921d0ef883548d9399327f5338 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+.PHONY: all
+all: test.wasm
+
 # build llvm and clang (for wasm only)
 toolchain/build/llvm/bin/clang:
        mkdir -p toolchain/build/llvm
@@ -48,7 +51,9 @@ sysroot/lib/libc++abi.a: toolchain/build/llvm/bin/clang sysroot/lib/libc++.a
 sysroot: sysroot/lib/libc.a sysroot/lib/libc++.a sysroot/lib/libc++abi.a
 
 test.wasm: test.cpp sysroot
-       clang++ --target=wasm32-unknown-unknown-wasm -g \
+       toolchain/build/llvm/bin/clang++ \
+               --target=wasm32-unknown-unknown-wasm -g -O3 \
                -fno-exceptions --sysroot=sysroot -nostartfiles \
-               -Wl,--export=foo,--demangle,--no-entry \
+               -Wl,--export=foo,--demangle,--no-entry,--allow-undefined-file=gles2.imports \
                test.cpp -o test.wasm
+