]> git.lizzy.rs Git - dragonblocks_alpha.git/commitdiff
Update building notice
authorElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 16 Jul 2021 12:17:00 +0000 (14:17 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 16 Jul 2021 12:17:00 +0000 (14:17 +0200)
BUILDING.md

index d253f990c1794cb626625906697cc74d281585f9..2f8aaa7a0ac628275fd929faba2c1e8b0201734b 100644 (file)
@@ -1,12 +1,16 @@
 # Building instructions
 
-GNU make is used for compiling. The code and the Makefile are located in the src/ directory.
+CMake is used for compiling. Make sure to clone the repository recursively:
+
+``bash
+git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git
+```
 
 ## Dependencies
-To build anything you need gcc and GNU make. The ZLib development library is needed as well.
+To build anything you need CMake. The ZLib development library is needed as well.
 
 ```bash
-sudo apt install build-essential make zlib1g-dev
+sudo apt install build-essential cmake zlib1g-dev
 ```
 
 The development versions of OpenGL, GLFW3, GLEW and Freetype are required to build the client.
@@ -21,22 +25,19 @@ For building the server the SQLite3 development library is required.
 sudo apt install libsqlite3-dev
 ```
 
-Don't forget to pull the submodules before building.
+## Building a debug build
+By default CMake will make a Debug build if nothing else is specified. Simply use
 
-``bash
-git submodule update --init
+```bash
+cd src
+cmake .
+make -j$(nproc)
 ```
 
-## Available targets
-- `all` (default)
-- `Dragonblocks`
-- `DragonblocksServer`
-- `clean`
-- `clobber`
-
-The debug flag (`-g`) is set by default (RELEASE=TRUE will disable it).
+to build the dragonblocks client and server.
+If you use a debug build, the singleplayer script should be invoked from the src/ directory, because that's where the binaries are located.
 
-## Release
+## Building a snapshot
 
 ```bash
 ./snapshot.sh