build.sh 632 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. set -e
  3. build_dir=$1
  4. # With simpleBuildEnvironment flag, we're already in build directory
  5. # The source tree has been copied here by USM from sources/lz4
  6. echo "Building LZ4 in ${build_dir}..."
  7. # Check if we need to navigate to the lz4 source directory
  8. if [ ! -f "./Makefile" ]; then
  9. if [ -d "sources/lz4" ]; then
  10. cd sources/lz4
  11. elif [ -d "lz4" ]; then
  12. cd lz4
  13. else
  14. echo "Error: Makefile not found"
  15. echo "Contents of current directory:"
  16. ls -la
  17. exit 1
  18. fi
  19. fi
  20. # Build according to LFS instructions
  21. make BUILD_STATIC=no PREFIX=${PREFIX}
  22. echo "Build complete."