-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
13 lines (9 loc) · 709 Bytes
/
Makefile
File metadata and controls
13 lines (9 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
all: function.js arrayfunction.js functionmodule.js
function.js: function.cpp
emcc function.cpp -o function.js -s SINGLE_FILE=1 -s EXPORTED_FUNCTIONS='["_int_sqrt"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]'
functionmodule.js: function.cpp
emcc function.cpp -o functionmodule.js -s SINGLE_FILE=1 -s EXPORTED_FUNCTIONS='["_int_sqrt"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' -s MODULARIZE=1 -s 'EXPORT_NAME="functionModule"'
arrayfunction.js: arrayfunction.cpp
emcc arrayfunction.cpp -o arrayfunction.js -s SINGLE_FILE=1 -s EXPORTED_FUNCTIONS='["_addToVector"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]'
clean:
rm function.js functionmodule.js arrayfunction.js