From b94ec06979bb76152650fb7c011163d58211337e Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 19 Apr 2025 22:15:56 +1000 Subject: [PATCH] Compiling: fix the table --- Compiling.md | 95 ++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/Compiling.md b/Compiling.md index dc899d0..83947c1 100644 --- a/Compiling.md +++ b/Compiling.md @@ -1,47 +1,48 @@ ---- -title: Compiling Xonotic releases and autobuilds ---- - -This page is about compiling the sources included in [stable releases](https://xonotic.org/download) and [beta autobuilds](Autobuilds), which you may want to do after [updating by rsync](https://xonotic.org/download#upgrading). -For git builds and development tools please see [Repository_Access](Repository_Access) and [Git HOWTO](Git). - -The release Makefile is the most convenient way to compile for alternative CPU architectures, or to get a build fully optimised for a recent x86 CPU (the official binaries are generic x86_64). It would also allow you to run Xonotic on an OS too old to be supported by official binaries. - -To this end the Makefile default settings enable all optimisations that can be used on your current CPU without causing bugs, and compile using all available CPU threads. - -The engine builds will be dynamically linked except for d0_blind_id which is statically linked to ensure reliable player ID support and because OS distributions don't ship this library. - -**Invoking `make` or `make help` in the Xonotic directory will print the supported targets and current config.** -**Most players will want `make update-stable client` or `make update-beta client`** - - -## System package dependencies - -### Debian -Build (client): `build-essential automake libtool libgmp-dev libjpeg-dev libsdl2-dev` -Build (server): `build-essential automake libtool libgmp-dev libjpeg-dev zlib1g-dev` -Runtime (client): `curl rsync libpng16-16 libfreetype6 libvorbisfile3` -Runtime (server): `curl rsync libpng16-16` - - -## Downstream packaging: install* targets - -The `install` targets support distribution packaging. Several variables should be changed to suit the target platform, the "Suggested definition" is the one downstream packages are expected to apply. -For a working example you may refer to the flatpak manifest at https://github.com/flathub/org.xonotic.Xonotic (NB: it has some tech debt, fixed in current master and to be removed at 0.9 release) - -### Variables -| Variable | GNU | Default | Suggested definition | Explanation | -| CFLAGS | ? | `-march=native -mtune=native` | `""` | `""` = generic CPU, all other optimisations enabled as in upstream builds | -| DESTDIR | yes | `""` | default | [GNU make manual](https://www.gnu.org/software/make/manual/html_node/DESTDIR.html) | -| prefix | yes | `/usr/local` | `/usr` | must start with `/`! | -| bindir | yes | `$(prefix)/bin` | default | `xonotic-sdl` and `xonotic-dedicated` will be installed here | -| datarootdir | yes | `$(prefix)/share` | default | [GNU make manual](https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html) | -| datadir | yes | `$(datarootdir)` | default | [GNU make manual](https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html) | -| docdir | yes | `$(datarootdir)/doc/xonotic` | default | `Docs/*` and/or `server` files/dirs will be installed here | -| BASEDIR | no | `$(datadir)/xonotic` | `/usr/share/xonotic` | `data/*.pk3` files will be installed here. Special: [^nb1] | - -[^nb1]: Defining `BASEDIR` or `DP_FS_BASEDIR` (including to its default value) changes the engine build slightly by compiling this path into engine binaries so they can always find the data files there. Distribution packages are expected to use this mode. -Otherwise (by default) data and engine binaries are installed to `$(datadir)/xonotic` and symlinked to in `$(bindir)` so the symlinks can be used to find the data files. - -### Targets -See: `make help-install` +--- +title: Compiling Xonotic releases and autobuilds +--- + +This page is about compiling the sources included in [stable releases](https://xonotic.org/download) and [beta autobuilds](Autobuilds), which you may want to do after [updating by rsync](https://xonotic.org/download#upgrading). +For git builds and development tools please see [Repository_Access](Repository_Access) and [Git HOWTO](Git). + +The release Makefile is the most convenient way to compile for alternative CPU architectures, or to get a build fully optimised for a recent x86 CPU (the official binaries are generic x86_64). It would also allow you to run Xonotic on an OS too old to be supported by official binaries. + +To this end the Makefile default settings enable all optimisations that can be used on your current CPU without causing bugs, and compile using all available CPU threads. + +The engine builds will be dynamically linked except for d0_blind_id which is statically linked to ensure reliable player ID support and because OS distributions don't ship this library. + +**Invoking `make` or `make help` in the Xonotic directory will print the supported targets and current config.** +**Most players will want `make update-stable client` or `make update-beta client`** + + +## System package dependencies + +### Debian +Build (client): `build-essential automake libtool libgmp-dev libjpeg-dev libsdl2-dev` +Build (server): `build-essential automake libtool libgmp-dev libjpeg-dev zlib1g-dev` +Runtime (client): `curl rsync libpng16-16 libfreetype6 libvorbisfile3` +Runtime (server): `curl rsync libpng16-16` + + +## Downstream packaging: install* targets + +The `install` targets support distribution packaging. Several variables should be changed to suit the target platform, the "Suggested definition" is the one downstream packages are expected to apply. +For a working example you may refer to the flatpak manifest at https://github.com/flathub/org.xonotic.Xonotic (NB: it has some tech debt, fixed in current master and to be removed at 0.9 release) + +### Variables +| Variable | GNU | Default | Suggested definition | Explanation | +| - | - | - | - | - | +| CFLAGS | ? | `-march=native -mtune=native` | `""` | `""` = generic CPU, all other optimisations enabled as in upstream builds | +| DESTDIR | yes | `""` | default | [GNU make manual](https://www.gnu.org/software/make/manual/html_node/DESTDIR.html) | +| prefix | yes | `/usr/local` | `/usr` | must start with `/`! | +| bindir | yes | `$(prefix)/bin` | default | `xonotic-sdl` and `xonotic-dedicated` will be installed here | +| datarootdir | yes | `$(prefix)/share` | default | [GNU make manual](https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html) | +| datadir | yes | `$(datarootdir)` | default | [GNU make manual](https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html) | +| docdir | yes | `$(datarootdir)/doc/xonotic` | default | `Docs/*` and/or `server` files/dirs will be installed here | +| BASEDIR | no | `$(datadir)/xonotic` | `/usr/share/xonotic` | `data/*.pk3` files will be installed here. **NB: special effect [^nb1]** | + +[^nb1]: Defining `BASEDIR` or `DP_FS_BASEDIR` (including to its default value) changes the engine build slightly by compiling this path into engine binaries so they can always find the data files there. Distribution packages are expected to use this mode. +Otherwise (by default) data and engine binaries are installed to `$(datadir)/xonotic` and symlinked to in `$(bindir)` so the symlinks can be used to find the data files. + +### Targets +See: `make help-install` -- 2.39.5