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-06-01 13:07:15 +00:00
|
|
|
# We hack the CPU_CORES, because if you use all of the cores on Circle-CI, you
|
2018-09-20 12:25:44 +00:00
|
|
|
# run out of memory.
|
2018-09-18 17:35:21 +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
|
2018-03-30 17:08:06 +00:00
|
|
|
git clone https://github.com/juj/emsdk.git
|
2018-06-01 13:07:15 +00:00
|
|
|
sed -i -e "s#CPU_CORES = max(multiprocessing.cpu_count()-1, 1)#CPU_CORES = 3#g" emsdk/emsdk
|
2018-03-30 17:08:06 +00:00
|
|
|
( \
|
2019-01-10 12:40:01 +00:00
|
|
|
cd emsdk && \
|
|
|
|
./emsdk install --build=Release sdk-tag-$(EMSCRIPTEN_VERSION)-64bit binaryen-tag-$(EMSCRIPTEN_VERSION)-64bit && \
|
|
|
|
cd .. && \
|
2019-01-10 19:08:58 +00:00
|
|
|
(cat patches/*.patch | patch -p1) ; \
|
2019-01-10 12:40:01 +00:00
|
|
|
cd emsdk/binaryen/tag-$(EMSCRIPTEN_VERSION)_64bit_binaryen/ && \
|
|
|
|
make && \
|
|
|
|
cd ../.. && \
|
|
|
|
cp binaryen/tag-$(EMSCRIPTEN_VERSION)/bin/wasm.js binaryen/tag-$(EMSCRIPTEN_VERSION)_64bit_binaryen/bin && \
|
|
|
|
./emsdk activate --embedded --build=Release sdk-tag-$(EMSCRIPTEN_VERSION)-64bit binaryen-tag-$(EMSCRIPTEN_VERSION)-64bit && \
|
2018-07-19 11:53:37 +00:00
|
|
|
touch .complete \
|
2018-03-30 17:08:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf emsdk
|