2019-01-10 12:40:01 +00:00
|
|
|
PYODIDE_ROOT=$(abspath ..)
|
|
|
|
include ../Makefile.envs
|
|
|
|
|
2018-07-20 00:33:56 +00:00
|
|
|
all: emsdk/.complete
|
2018-03-30 17:08:06 +00:00
|
|
|
|
2018-07-20 00:33:56 +00:00
|
|
|
emsdk/.complete:
|
2018-07-18 22:45:20 +00:00
|
|
|
if [ -d emsdk ]; then rm -rf emsdk; fi
|
2020-11-30 17:54:35 +00:00
|
|
|
git clone https://github.com/emscripten-core/emsdk.git
|
2018-03-30 17:08:06 +00:00
|
|
|
( \
|
2019-01-10 12:40:01 +00:00
|
|
|
cd emsdk && \
|
2020-11-30 17:54:35 +00:00
|
|
|
./emsdk install --build=Release $(EMSCRIPTEN_VERSION)-fastcomp && \
|
|
|
|
git clone --branch 1.38.32 --depth 1 https://github.com/WebAssembly/binaryen.git && \
|
2019-01-10 12:40:01 +00:00
|
|
|
cd .. && \
|
2019-04-04 11:57:47 +00:00
|
|
|
(cat patches/*.patch | patch -p1) && \
|
2020-11-30 17:54:35 +00:00
|
|
|
cd emsdk && \
|
|
|
|
./emsdk activate --embedded --build=Release $(EMSCRIPTEN_VERSION)-fastcomp && \
|
|
|
|
cd binaryen && \
|
|
|
|
cmake . && make -j5 && \
|
|
|
|
cd ../.. && \
|
|
|
|
sed -i "s/BINARYEN_ROOT.*/BINARYEN_ROOT = emsdk_path \+ '\/binaryen'/g" emsdk/.emscripten && \
|
|
|
|
touch emsdk/.complete \
|
2018-03-30 17:08:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf emsdk
|