Compiling on Linux
BZFlag uses a number of third-party build tools and libraries to build on Linux. Much of this info will also apply to other *nix like operating systems such as the various BSDs.
- GNU gcc/g++
- automake 1.6.0+
- autoconf 2.68+
- libtool 1.4.2+
- SDL 1.2.10+ or 2.0.3+
Debian/Ubuntu (and other Debian-based distributions)
Obtaining the code
For BZFlag 2.4:
Either download and extract the specific release source .tar.gz or .tar.bz2 from our downloads archive or use Git to download the current 2.4 branch.
For BZFlag master (2.5):
Building the code
First, change to the bzflag directory (adjusting if necessary) and then run our autogen.sh script. If you later modify any of the Makefile.am files, you must re-run the autogen.sh script (and configure).
The next step will be running the configure script, which will check that the build system works and that the necessary dependencies are available.
There are also various options for the configure script. Some common options include:
--enable-debug- This leaves the binaries unoptimized and with debugging symbols, and makes it possible to use a debugger like GDB to inspect and diagnose issues and crashes.
--disable-client- Do not build the graphical game client. With this option enabled, glew and SDL are not required.
--disable-bzadmin- Do not build the text-based game client. With this option enabled, ncurses is not required.
--enable-custom-plugins=plugin1[,plugin2,...]- Build additional plugins.
--prefix=someDirectoryPath- Install the game files into an alternative location, such as your home directory.
The following example would build with debugging enabled but skip building the graphical game client, and would also
build two additional plugins. When
make install is called, it would then install the files into
of in a system-wide directory, which would mean it would not need root access to install.
Once configured, just run:
For more information, review the README.Linux and DEVINFO files from the source.
This content is maintained on GitHub. We welcome any feedback and improvements!