build.sh 668 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # 编译前请先设置参数
  2. sys_root=$DRAGONOS_SYSROOT
  3. src_path=请填写mpfr的路径
  4. current_path=$(pwd)
  5. # 要安装到的目录
  6. PREFIX=/usr
  7. if [ ! -d ${src_path} ]; then
  8. echo "Error: ${src_path} not found"
  9. exit 1
  10. fi
  11. if [ ! -d ${sysroot} ]; then
  12. echo "Error: ${sysroot} not found"
  13. exit 1
  14. fi
  15. cd ${src_path}
  16. autoreconf --install
  17. autoconf
  18. sed -i 's/ios[*]/ios* | dragonos* /' config.sub
  19. cd ${current_path}
  20. mkdir -p build || exit 1
  21. mkdir -p ${PREFIX} || exit 1
  22. cd build
  23. ${src_path}/configure --prefix=${PREFIX} --host=x86_64-dragonos || exit 1
  24. make -j $(nproc) || exit 1
  25. make DESTDIR=${sys_root} install|| exit 1
  26. make clean
  27. cd ..
  28. rm -rf build