🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

  1. #!/bin/bash
  2. if [ -z "$SDKDIR" ]; then
  3. SDKDIR="/emsdk"
  4. fi
  5. ENVSCRIPT="$SDKDIR/emsdk_env.sh"
  6. if [ ! -f "$ENVSCRIPT" ]; then
  7. echo "ERROR: This script expects the Emscripten SDK to be in '$SDKDIR'." 1>&2
  8. echo "ERROR: Set the \$SDKDIR environment variable to override this." 1>&2
  9. exit 1
  10. fi
  11. TARBALL="$1"
  12. if [ -z $1 ]; then
  13. TARBALL=physfs-emscripten.tar.xz
  14. fi
  15. cd `dirname "$0"`
  16. cd ..
  17. PHYSFSBASE=`pwd`
  18. echo "Setting up Emscripten SDK environment..."
  19. source "$ENVSCRIPT"
  20. echo "Setting up..."
  21. cd "$PHYSFSBASE"
  22. rm -rf buildbot
  23. mkdir buildbot
  24. cd buildbot
  25. echo "Configuring..."
  26. emcmake cmake -G "Ninja" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?
  27. echo "Building..."
  28. emmake cmake --build . --config MinSizeRel || exit $?
  29. set -e
  30. rm -rf "$TARBALL" physfs-emscripten
  31. mkdir -p physfs-emscripten
  32. echo "Archiving to '$TARBALL' ..."
  33. cp ../src/physfs.h libphysfs.a physfs-emscripten
  34. chmod -R a+r physfs-emscripten
  35. chmod a+x physfs-emscripten
  36. chmod -R go-w physfs-emscripten
  37. tar -cJvvf "$TARBALL" physfs-emscripten
  38. echo "Done."
  39. exit 0
  40. # end of emscripten-buildbot.sh ...