1
0

dist-js.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env bash
  2. set -e
  3. mkdir -p bin
  4. rm -rf bin/stage
  5. mkdir -p bin/stage
  6. make CONFIG=emscripten VERBOSE=1 clean-dist
  7. make CONFIG=emscripten EMSCRIPTEN_TARGET=all VERBOSE=1 clean
  8. make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
  9. make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
  10. mkdir -p bin/stage/all
  11. make CONFIG=emscripten EMSCRIPTEN_TARGET=all VERBOSE=1 clean
  12. make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=all VERBOSE=1
  13. make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=all VERBOSE=1 check
  14. make CONFIG=emscripten TEST=0 EMSCRIPTEN_TARGET=all VERBOSE=1
  15. cp bin/libopenmpt.js bin/stage/all/
  16. cp bin/libopenmpt.js.mem bin/stage/all/
  17. cp bin/libopenmpt.wasm bin/stage/all/
  18. cp bin/libopenmpt.wasm.js bin/stage/all/
  19. make CONFIG=emscripten EMSCRIPTEN_TARGET=all VERBOSE=1 clean
  20. mkdir -p bin/stage/wasm
  21. make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
  22. make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=wasm VERBOSE=1
  23. make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=wasm VERBOSE=1 check
  24. make CONFIG=emscripten TEST=0 EMSCRIPTEN_TARGET=wasm VERBOSE=1
  25. cp bin/libopenmpt.js bin/stage/wasm/
  26. cp bin/libopenmpt.wasm bin/stage/wasm/
  27. make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
  28. mkdir -p bin/stage/js
  29. make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
  30. make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=js VERBOSE=1
  31. make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=js VERBOSE=1 check
  32. make CONFIG=emscripten TEST=0 EMSCRIPTEN_TARGET=js VERBOSE=1
  33. cp bin/libopenmpt.js bin/stage/js/
  34. cp bin/libopenmpt.js.mem bin/stage/js/
  35. make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
  36. make CONFIG=emscripten VERBOSE=1 dist-js