aboutsummaryrefslogtreecommitdiff
path: root/third_party/lzma.js/doit.sh
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-16 11:10:10 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-16 11:10:10 -0700
commitee1fc9904b58181e02cf48ae05308478327eeb3f (patch)
tree03fd37619c98f802f03a77da3a3ccc547c42d0be /third_party/lzma.js/doit.sh
parent19520c66ee9ca26ebf9f89ba4b106f495a1d5059 (diff)
add lzma.js in thirdparty
Diffstat (limited to 'third_party/lzma.js/doit.sh')
-rwxr-xr-xthird_party/lzma.js/doit.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/third_party/lzma.js/doit.sh b/third_party/lzma.js/doit.sh
new file mode 100755
index 00000000..44a3941e
--- /dev/null
+++ b/third_party/lzma.js/doit.sh
@@ -0,0 +1,33 @@
+cd lzip
+
+echo "native"
+make clean
+DECODER_ONLY=0 make lzip -j 4 # native build
+mv lzip ../lzma-native
+
+echo "bitcode full (encoder+decoder)"
+make clean
+DECODER_ONLY=0 ~/Dev/emscripten/emmake make lzip -j 4
+mv lzip lzip-full.bc
+
+echo "bitcode decoder only"
+make clean
+DECODER_ONLY=1 ~/Dev/emscripten/emmake make lzip -j 4
+mv lzip lzip-decoder.bc
+
+cd ..
+
+echo "javascript full"
+~/Dev/emscripten/emcc -O2 lzip/lzip-full.bc -o lzma-full.raw.js
+# -s INLINING_LIMIT=0
+cat pre.js > lzma-full.js
+cat lzma-full.raw.js >> lzma-full.js
+cat post.js >> lzma-full.js
+
+echo "javascript decoder"
+~/Dev/emscripten/emcc -O2 lzip/lzip-decoder.bc -o lzma-decoder.raw.js
+# -s INLINING_LIMIT=0
+cat pre.js > lzma-decoder.js
+cat lzma-decoder.raw.js >> lzma-decoder.js
+cat post.js >> lzma-decoder.js
+