1
0

Updated COMPILING instructions for out-of-source build.

Also made the 32-bit mode a bit more clear as to what architectures it affects.
This commit is contained in:
Mattes D 2014-02-13 06:59:07 +01:00
parent 3456cfa34b
commit cc72b656c9

View File

@ -49,7 +49,7 @@ There's a script file, `MCServer/profile_run.cmd` that encapsulates most of the
Install git, cmake and gcc or clang, using your platform's package manager:
```
sudo apt-get install git cmake gcc
sudo apt-get install git cmake gcc g++
```
### Getting the sources ###
@ -65,17 +65,29 @@ git submodule update
Release mode is preferred for almost all cases, it has much better speed and less console spam. However, if you are developing MCServer actively, debug mode might be better.
cmake . -DCMAKE_BUILD_TYPE=RELEASE && make
Assuming you are in the MCServer folder created in the initial setup step, you need to run these commands:
```
mkdir Release
cd Release
cmake . -DCMAKE_BUILD_TYPE=RELEASE .. && make
```
The executable will be built in the `MCServer/MCServer` folder and will be named `MCServer`.
### Debug Mode ###
Debug mode is useful if you want more debugging information about MCServer as it's running or if you want to use a debugger like GDB to debug issues and crashes.
Debug mode is useful if you want more debugging information about MCServer while it's running or if you want to use a debugger like GDB to debug issues and crashes.
cmake . -DCMAKE_BUILD_TYPE=DEBUG && make
Assuming you are in the MCServer folder created in the Getting the sources step, you need to run these commands:
```
mkdir Debug
cd Debug
cmake . -DCMAKE_BUILD_TYPE=DEBUG && make`
```
The executable will be built in the `MCServer/MCServer` folder and will be named `MCServer_debug`.
### 32 Bit Mode ###
### 32 Bit Mode switch ###
This is useful if you want to compile MCServer to use on another 32-bit machine. It can be used with debug or release mode. To use 32 bit mode, simply add:
This is useful if you want to compile MCServer on an x64 (64-bit Intel) machine but want to use on an x86 (32-bit Intel) machine. This switch can be used with debug or release mode. Simply add:
-DFORCE_32=1
@ -84,8 +96,10 @@ to your cmake command and 32 bit will be forced.
### Compiling for another computer ###
When compiling for another computer it is important to set cross compiling mode. This tells the compiler not to optimise for your machine. It can be used with debug or release mode. To enable simply add:
When cross-compiling for another computer it is important to set cross compiling mode. This tells the compiler not to optimise for your machine. This switch can be used with debug or release mode. To enable, simply add:
-DCROSSCOMPILE=1
to your cmake command.
Note that cross-compilation is probably broken at this moment, since the build requires running an executable that it has built, as part of the build process.