Create this branch to work on loading of different Kernel-Debugger DLL providers...
[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 if [ "$1" = "ninja" ]; then
13 CMAKE_GENERATOR="Ninja"
14 else
15 CMAKE_GENERATOR="Unix Makefiles"
16 fi
17
18 if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
19 echo Creating directories in $REACTOS_OUTPUT_PATH
20 mkdir -p "$REACTOS_OUTPUT_PATH"
21 cd "$REACTOS_OUTPUT_PATH"
22 fi
23
24 mkdir -p host-tools reactos
25
26 echo Preparing host tools...
27 cd host-tools
28 rm -f CMakeCache.txt
29
30 REACTOS_BUILD_TOOLS_DIR="$PWD"
31 cmake -G "$CMAKE_GENERATOR" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
32
33 echo Preparing reactos...
34 cd ../reactos
35 rm -f CMakeCache.txt
36
37 cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE=0 -DPCH=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
38
39 echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).