X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=BUILDING.md;h=0b110cb9f64bd9a7cfa6f2bc349d8ef8c4462476;hb=a354467dfc72ca5b8be8cba65f975efc4a920d35;hp=10539b7b9b6d9bcc735999e7d7c5ebff467cc00b;hpb=1152c2be965713f8712a9960c1c02b58b44b43dd;p=dragonblocks_alpha.git diff --git a/BUILDING.md b/BUILDING.md index 10539b7..0b110cb 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,34 +1,50 @@ # 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: -## Dependencies -To build anything you need g++ and GNU make. ```bash -sudo apt install build-essential make +git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git ``` -The development versions OpenGL, GLFW3, GLEW are required to build the client. +## Dependencies +To build anything you need CMake. The ZLib development library is needed as well. +The development versions of OpenGL, GLFW3, GLEW and Freetype are required to build the client. +For building the server the SQLite3 development library is required. + + +Ubuntu / Debian: + ```bash -sudo apt install libgl1-mesa-dev libglfw3-dev libglew-dev +sudo apt install build-essential cmake zlib1g-dev libgl1-mesa-dev libglfw3-dev libglew-dev libfreetype-dev libsqlite3-dev ``` -When building the client, don't forget to pull the submodules before building. -``bash -git submodule update --init +FreeBSD: + +```csh +sudo pkg install cmake gcc lzlib mesa-devel glfw glew freetype sqlite3 +``` + +OpenBSD: + +```sh +sudo pkg_add cmake lzlib glfw glew freetype sqlite3 +``` + +## Building a debug build +By default CMake will make a Debug build if nothing else is specified. Simply use + +```bash +cd src +cmake . +make -j$(nproc) ``` -## Available targets -- `all` (default) -- `Dragonblocks` -- `DragonblocksServer` -- `clean` -- `clobber` +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. -The debug flag (`-g`) is set by default (RELEASE=TRUE will disable it). +## Building a snapshot -## Release ```bash -./release.sh +./snapshot.sh ``` -This script will create a release zipfile. +This script will create a snapshot zipfile.