From cc72b656c97d82eca0900c19280cdd031cfa7ff4 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 13 Feb 2014 06:59:07 +0100 Subject: Updated COMPILING instructions for out-of-source build. Also made the 32-bit mode a bit more clear as to what architectures it affects. --- COMPILING.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'COMPILING.md') diff --git a/COMPILING.md b/COMPILING.md index eceeefee7..d3c896bdd 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -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. -- cgit v1.2.3 From 0f7d90b7d18a1ccc59b2e47184bf8de1a21ec5a6 Mon Sep 17 00:00:00 2001 From: Muhammad Wang Date: Sun, 16 Feb 2014 12:15:24 +0800 Subject: Fixed a minor error --- COMPILING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'COMPILING.md') diff --git a/COMPILING.md b/COMPILING.md index d3c896bdd..94220f9c6 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -69,7 +69,7 @@ Assuming you are in the MCServer folder created in the initial setup step, you n ``` mkdir Release cd Release -cmake . -DCMAKE_BUILD_TYPE=RELEASE .. && make +cmake .. -DCMAKE_BUILD_TYPE=RELEASE && make ``` The executable will be built in the `MCServer/MCServer` folder and will be named `MCServer`. @@ -81,7 +81,7 @@ Assuming you are in the MCServer folder created in the Getting the sources step, ``` mkdir Debug cd Debug -cmake . -DCMAKE_BUILD_TYPE=DEBUG && make` +cmake .. -DCMAKE_BUILD_TYPE=DEBUG && make ``` The executable will be built in the `MCServer/MCServer` folder and will be named `MCServer_debug`. -- cgit v1.2.3 From 6b64a722b85d2f1ab6ddba7b874fd2ad43443ef2 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 16 Feb 2014 14:34:20 +0100 Subject: Fixed cmake invocation text The docs say: cmake --- COMPILING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'COMPILING.md') diff --git a/COMPILING.md b/COMPILING.md index 94220f9c6..139f1a0ee 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -69,7 +69,7 @@ Assuming you are in the MCServer folder created in the initial setup step, you n ``` mkdir Release cd Release -cmake .. -DCMAKE_BUILD_TYPE=RELEASE && make +cmake -DCMAKE_BUILD_TYPE=RELEASE .. && make ``` The executable will be built in the `MCServer/MCServer` folder and will be named `MCServer`. @@ -81,7 +81,7 @@ Assuming you are in the MCServer folder created in the Getting the sources step, ``` mkdir Debug cd Debug -cmake .. -DCMAKE_BUILD_TYPE=DEBUG && make +cmake -DCMAKE_BUILD_TYPE=DEBUG .. && make ``` The executable will be built in the `MCServer/MCServer` folder and will be named `MCServer_debug`. -- cgit v1.2.3