From 8122a216abeab3ccd5e5efed760193b238c763aa Mon Sep 17 00:00:00 2001 From: luoliangyi <87842688@qq.com> Date: Fri, 14 Oct 2022 16:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9C=A8=E9=BE=99=E8=8A=AF?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E6=9E=84=E5=BB=BA=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_build.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 setup_build.sh diff --git a/setup_build.sh b/setup_build.sh new file mode 100755 index 0000000..258c285 --- /dev/null +++ b/setup_build.sh @@ -0,0 +1,29 @@ +#!/bin/bash +cpu=$(arch) #cpu架构 +strinstallpath="" +read -p "Enter the path you want to install: " installpath +strinstallpath=$installpath"/libusb_install" +echo $strinstallpath + +if [!-d $strinstallpath];then + echo "$strinstallpath do not exist,will make dir" + mkdir $strinstallpath +else + echo "$strinstallpath exist" +fi + +./bootstrap.sh +if [ "$cpu" == "loongarch64" ]; then +./configure --build=loongarch64-unknown-linux-gnu --with-pic --prefix=$strinstallpath --enable-static=no --enable-static=yes + +else + ./configure --with-pic --prefix=$strinstallpath --enable-shared=no --enable-static=yes +fi + +echo "configure done!!!!" +echo "start to make source code" +make -j4 +echo "make done" +echo "start to make install " +make install +echo "make install done! installed in "