Synchronize with trunk's revision r57599.
[reactos.git] / configure.sh
1 #!/bin/sh
2
3 if [ "x$ROS_ARCH" = "x" ]; then
4 echo Could not detect RosBE.
5 exit 1
6 fi
7
8 BUILD_ENVIRONMENT=MinGW
9 ARCH=$ROS_ARCH
10 REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
11 REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
12
13 if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
14 echo Creating directories in $REACTOS_OUTPUT_PATH
15 mkdir -p "$REACTOS_OUTPUT_PATH"
16 cd "$REACTOS_OUTPUT_PATH"
17 fi
18
19 mkdir -p host-tools reactos
20
21 echo Preparing host tools...
22 cd host-tools
23 rm -f CMakeCache.txt
24
25 REACTOS_BUILD_TOOLS_DIR="$PWD"
26 cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
27
28 echo Preparing reactos...
29 cd ../reactos
30 rm -f CMakeCache.txt
31
32 cmake -G "Unix Makefiles" -DENABLE_CCACHE=0 -DPCH=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
33
34 echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).