调整在龙芯下的构建代码规则

This commit is contained in:
luoliangyi 2022-10-14 16:12:49 +08:00
parent ea9e16f073
commit 8122a216ab
1 changed files with 29 additions and 0 deletions

29
setup_build.sh Executable file
View File

@ -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 "