1#!/bin/sh 2 3if [ "x$ROS_ARCH" = "x" ]; then 4 echo Could not detect RosBE. 5 exit 1 6fi 7 8BUILD_ENVIRONMENT=MinGW 9ARCH=$ROS_ARCH 10REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd) 11REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH 12 13usage() { 14 echo Invalid parameter given. 15 exit 1 16} 17 18CMAKE_GENERATOR="Ninja" 19while [ $# -gt 0 ]; do 20 case $1 in 21 -D) 22 shift 23 if echo "x$1" | grep 'x?*=*' > /dev/null; then 24 ROS_CMAKEOPTS=$ROS_CMAKEOPTS" -D $1" 25 else 26 usage 27 fi 28 ;; 29 30 -D?*=*|-D?*) 31 ROS_CMAKEOPTS=$ROS_CMAKEOPTS" $1" 32 ;; 33 makefiles|Makefiles) 34 CMAKE_GENERATOR="Unix Makefiles" 35 ;; 36 *) 37 usage 38 esac 39 40 shift 41done 42 43if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then 44 echo Creating directories in $REACTOS_OUTPUT_PATH 45 mkdir -p "$REACTOS_OUTPUT_PATH" 46 cd "$REACTOS_OUTPUT_PATH" 47fi 48 49echo Preparing reactos... 50rm -f CMakeCache.txt host-tools/CMakeCache.txt 51 52cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH $EXTRA_ARGS $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR" 53 54echo Configure script complete! Enter directories and execute appropriate build commands \(ex: ninja, make, makex, etc...\). 55