加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.common 1023 Bytes
一键复制 编辑 原始数据 按行查看 历史
Palmer Dabbelt 提交于 2017-04-18 16:16 . Add OpenOCD
# Script to build RISC-V ISA simulator, proxy kernel, and GNU toolchain.
# Tools will be installed to $RISCV.
if [ "x$RISCV" = "x" ]
then
echo "Please set the RISCV environment variable to your preferred install path."
exit 1
fi
# Use gmake instead of make if it exists.
MAKE=`command -v gmake || command -v make`
PATH="$RISCV/bin:$PATH"
#GCC_VERSION=`gcc -v 2>&1 | tail -1 | awk '{print $3}'`
set -e
function build_project {
PROJECT="$1"
shift
echo
if [ -e "$PROJECT/build" ]
then
echo "Removing existing $PROJECT/build directory"
rm -rf "$PROJECT/build"
fi
if [ ! -e "$PROJECT/configure" ]
then
(
cd "$PROJECT"
find . -iname configure.ac | sed s/configure.ac/m4/ | xargs mkdir -p
autoreconf -i
)
fi
mkdir -p "$PROJECT/build"
cd "$PROJECT/build"
echo "Configuring project $PROJECT"
../configure $* > build.log
echo "Building project $PROJECT"
$MAKE >> build.log
echo "Installing project $PROJECT"
$MAKE install >> build.log
cd - > /dev/null
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化