mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 12:54:51 +00:00
![Amine Khaldi](/assets/img/avatar_default.png)
* Move cmake files to the cmake folder. * Rename msc.cmake to msvc.cmake and toolchain-mingw32.cmake to toolchain-gcc.cmake. * Add compilerflags.cmake to group macros that handle different compiler flags. * Move add_linkerflag and set_unicode macros to compilerflags.cmake. They were duplicated in gcc.cmake and msvc.cmake. * Add add_compiler_flags macro to handle CMAKE_C_FLAGS and CMAKE_CXX_FLAGS properly, and replace add_definitions calls with add_compiler_flags calls when we're adding compiler flags, not definitions. * Reorganize gcc.cmake to have compiler flags then linking and compiling rules. * Move CMAKE_ASM_COMPILE_OBJECT out of toolchain-gcc.cmake into gcc.cmake and add ${CMAKE_C_FLAGS} to it, now that flags are properly set. * Don't pass <FLAGS> (compiler flags) when linking. * Without the (commented out) linker script flag, CMAKE_SHARED_LINKER_FLAGS_INIT is the same for both i386 and amd64. Deduplicate it. * Fix CMAKE_C_STANDARD_LIBRARIES comment. * Use <FLAGS> in msvc CMAKE_ASM_COMPILE_OBJECT instead of manual includes. * Don't set ntdllsys linker language to C, it's an asm lib. * Remove ros_cd.cmake as it's not needed anymore. * Define _CRT_SECURE_NO_WARNINGS when compiling host tools with msvc. svn path=/trunk/; revision=52210
44 lines
989 B
Bash
Executable file
44 lines
989 B
Bash
Executable file
#!/bin/bash
|
|
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
|
|
|
|
if [ "$REACTOS_SOURCE_DIR" == "$PWD" ]
|
|
then
|
|
echo Creating directories in $REACTOS_OUTPUT_PATH
|
|
mkdir -p $REACTOS_OUTPUT_PATH
|
|
cd "$REACTOS_OUTPUT_PATH"
|
|
fi
|
|
|
|
mkdir -p host-tools
|
|
mkdir -p reactos
|
|
|
|
echo Preparing host tools...
|
|
cd host-tools
|
|
if [ -f CMakeCache.txt ]
|
|
then
|
|
rm -f CMakeCache.txt
|
|
fi
|
|
|
|
REACTOS_BUILD_TOOLS_DIR="$PWD"
|
|
cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
|
|
|
|
echo Preparing reactos...
|
|
cd ../reactos
|
|
if [ -f CMakeCache.txt ]
|
|
then
|
|
rm -f CMakeCache.txt
|
|
fi
|
|
|
|
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
|
|
|
|
echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).
|
|
|