* Sync to trunk HEAD (r53473).
[reactos.git] / configure.sh
1 #!/bin/bash
2 if [ "x$ROS_ARCH" == "x" ]
3 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" ]
14 then
15 echo Creating directories in $REACTOS_OUTPUT_PATH
16 mkdir -p $REACTOS_OUTPUT_PATH
17 cd "$REACTOS_OUTPUT_PATH"
18 fi
19
20 mkdir -p host-tools
21 mkdir -p reactos
22
23 echo Preparing host tools...
24 cd host-tools
25 if [ -f CMakeCache.txt ]
26 then
27 rm -f CMakeCache.txt
28 fi
29
30 REACTOS_BUILD_TOOLS_DIR="$PWD"
31 cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
32
33 echo Preparing reactos...
34 cd ../reactos
35 if [ -f CMakeCache.txt ]
36 then
37 rm -f CMakeCache.txt
38 fi
39
40 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"
41
42 echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).
43