加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
configure.sh 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
Andrew Cook 提交于 2018-10-01 21:07 . Rework host tools
#!/bin/sh
if [ "x$ROS_ARCH" = "x" ]; then
echo Could not detect RosBE.
exit 1
fi
BUILD_ENVIRONMENT=MinGW
ARCH=$ROS_ARCH
REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
usage() {
echo Invalid parameter given.
exit 1
}
CMAKE_GENERATOR="Ninja"
while [ $# -gt 0 ]; do
case $1 in
-D)
shift
if echo "x$1" | grep 'x?*=*' > /dev/null; then
ROS_CMAKEOPTS=$ROS_CMAKEOPTS" -D $1"
else
usage
fi
;;
-D?*=*|-D?*)
ROS_CMAKEOPTS=$ROS_CMAKEOPTS" $1"
;;
makefiles|Makefiles)
CMAKE_GENERATOR="Unix Makefiles"
;;
*)
usage
esac
shift
done
if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
echo Creating directories in $REACTOS_OUTPUT_PATH
mkdir -p "$REACTOS_OUTPUT_PATH"
cd "$REACTOS_OUTPUT_PATH"
fi
echo Preparing reactos...
rm -f CMakeCache.txt host-tools/CMakeCache.txt
cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH $EXTRA_ARGS $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR"
echo Configure script complete! Enter directories and execute appropriate build commands \(ex: ninja, make, makex, etc...\).
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化