xref: /DragonOS/user/port/gmp/6.2.1/build.sh (revision fae6e9ade46a52976ad5d099643d51cc20876448)
1# 编译前请先设置参数
2sys_root=$DRAGONOS_SYSROOT
3gmp_path=请填写gmp的路径
4
5# 要安装到的目录
6PREFIX=/usr
7
8
9if [ ! -d ${gmp_path} ]; then
10    echo "Error: ${gmp_path} not found"
11    exit 1
12fi
13
14if [ ! -d ${sysroot} ]; then
15    echo "Error: ${sysroot} not found"
16    exit 1
17fi
18
19mkdir -p build-gmp || exit 1
20mkdir -p ${PREFIX} || exit 1
21
22cd build-gmp
23${gmp_path}/configure --prefix=${PREFIX} --host=x86_64-dragonos  || exit 1
24make -j $(nproc) || exit 1
25make DESTDIR=${sys_root} install|| exit 1
26make clean
27cd ..
28rm -rf build-gmp