Created
October 14, 2018 20:04
-
-
Save val314159/196fa0132f9e9e5142e275d38c373b71 to your computer and use it in GitHub Desktop.
cool emcc makefile
This file contains hidden or 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
DOPTS=-v "`pwd`:/src" --name em trzeci/emscripten | |
EMCC=docker exec em emcc -Os | |
# -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap","ccall"]' | |
all: clean main0.html twelve.bc eleven.js | |
node main1.js | |
main0.html: main0.bc eleven.bc twelve.bc | |
$(EMCC) $? -o $@ -s [email protected] | |
main1.html: main1.bc eleven.bc twelve.bc | |
$(EMCC) $? -o $@ -s EXPORTED_FUNCTIONS=1main0.json | |
%.js: %.bc ; $(EMCC) $? -o $@ -s EXPORTED_FUNCTIONS=@$*.json | |
%.bc: %.c ; $(EMCC) $? -o $@ -s EXPORTED_FUNCTIONS=@$*.json | |
ws:; bottle.py ws | |
dock:; docker run -d $(DOPTS) sleep 360000 | |
clean:; rm -fr *.{bc,js,html,wasm} *~ *.pyc __pycache__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment