Created
October 12, 2019 23:24
-
-
Save linux-china/9542a3d656f58616e65a7320175fbe72 to your computer and use it in GitHub Desktop.
Makefile for Emscripten
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WASM_MODULE = cpp17 | |
CC = em++ | |
CXXFLAGS = --bind -O3 -x c++ -std=c++17 -s ALLOW_MEMORY_GROWTH=1 -s 'MALLOC="emmalloc"' | |
.PHONY : all clean | |
all: $(WASM_MODULE).wasm ## Build all Wasm | |
$(WASM_MODULE).wasm: $(WASM_MODULE).cpp ## Compile cpp17.wasm | |
$(CC) $(CXXFLAGS) -o $(WASM_MODULE).js $(WASM_MODULE).cpp | |
clean: | |
rm -rf $(WASM_MODULE).js $(WASM_MODULE).wasm | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment