🛠️🐜 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.

56 lines
1.6 KiB

  1. #!/bin/bash
  2. # This is the script physfs-buildbot.icculus.org uses to cross-compile
  3. # PhysicsFS from x86 Linux to Raspberry Pi. This script was originally from
  4. # Simple Directmedia Layer ( https://www.libsdl.org/ ).
  5. # The final tarball can be unpacked in the root directory of a RPi,
  6. # so the PhysicsFS install lands in /usr/local. Run ldconfig, and then
  7. # you should be able to build and run PhysicsFS-based software on your
  8. # Pi. Standard configure scripts should be able to find PhysicsFS and
  9. # build against it.
  10. TARBALL="$1"
  11. if [ -z $1 ]; then
  12. TARBALL=physfs-raspberrypi.tar.xz
  13. fi
  14. BUILDBOTDIR="buildbot"
  15. PARENTDIR="$PWD"
  16. set -e
  17. set -x
  18. rm -f $TARBALL
  19. rm -rf $BUILDBOTDIR
  20. mkdir -p $BUILDBOTDIR
  21. pushd $BUILDBOTDIR
  22. # the '-G "Ninja"' can be '-G "Unix Makefiles"' if you prefer to use GNU Make.
  23. SYSROOT="/opt/rpi-sysroot"
  24. cmake -G "Ninja" \
  25. -DCMAKE_C_COMPILER="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" \
  26. -DCMAKE_BUILD_TYPE=MinSizeRel \
  27. -DCMAKE_SYSROOT="$SYSROOT" \
  28. -DCMAKE_FIND_ROOT_PATH="$SYSROOT" \
  29. -DCMAKE_SYSTEM_NAME="Linux" \
  30. -DCMAKE_SYSTEM_VERSION=1 \
  31. -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
  32. -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
  33. -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
  34. ..
  35. cmake --build . --config MinSizeRel
  36. rm -rf "$TARBALL" physfs-raspberrypi
  37. mkdir -p physfs-raspberrypi
  38. echo "Archiving to '$TARBALL' ..."
  39. cp -a ../src/physfs.h libphysfs.a libphysfs.so* physfs-raspberrypi
  40. chmod -R a+r physfs-raspberrypi
  41. chmod a+x physfs-raspberrypi physfs-raspberrypi/*.so*
  42. chmod -R go-w physfs-raspberrypi
  43. tar -cJvvf "$TARBALL" physfs-raspberrypi
  44. set +x
  45. echo "Done."