xref: /DragonOS/user/port/mpfr/4.1.1/build.sh (revision 2224c93ea968bc74621f7e124b4aca04875b3e6a)
1*2224c93eSguanjinquan
2*2224c93eSguanjinquan# 编译前请先设置参数
3*2224c93eSguanjinquansys_root=$DRAGONOS_SYSROOT
4*2224c93eSguanjinquansrc_path=请填写mpfr的路径
5*2224c93eSguanjinquan
6*2224c93eSguanjinquancurrent_path=$(pwd)
7*2224c93eSguanjinquan# 要安装到的目录
8*2224c93eSguanjinquanPREFIX=/usr
9*2224c93eSguanjinquan
10*2224c93eSguanjinquan
11*2224c93eSguanjinquanif [ ! -d ${src_path} ]; then
12*2224c93eSguanjinquan    echo "Error: ${src_path} not found"
13*2224c93eSguanjinquan    exit 1
14*2224c93eSguanjinquanfi
15*2224c93eSguanjinquan
16*2224c93eSguanjinquanif [ ! -d ${sysroot} ]; then
17*2224c93eSguanjinquan    echo "Error: ${sysroot} not found"
18*2224c93eSguanjinquan    exit 1
19*2224c93eSguanjinquanfi
20*2224c93eSguanjinquan
21*2224c93eSguanjinquancd ${src_path}
22*2224c93eSguanjinquanautoreconf --install
23*2224c93eSguanjinquanautoconf
24*2224c93eSguanjinquansed -i 's/ios[*]/ios* | dragonos* /' config.sub
25*2224c93eSguanjinquan
26*2224c93eSguanjinquancd ${current_path}
27*2224c93eSguanjinquan
28*2224c93eSguanjinquanmkdir -p build || exit 1
29*2224c93eSguanjinquanmkdir -p ${PREFIX} || exit 1
30*2224c93eSguanjinquan
31*2224c93eSguanjinquancd build
32*2224c93eSguanjinquan${src_path}/configure --prefix=${PREFIX} --host=x86_64-dragonos  || exit 1
33*2224c93eSguanjinquanmake -j $(nproc) || exit 1
34*2224c93eSguanjinquanmake DESTDIR=${sys_root} install|| exit 1
35*2224c93eSguanjinquanmake clean
36*2224c93eSguanjinquancd ..
37*2224c93eSguanjinquanrm -rf build