./configure make
./configure --help
returns a full list of options. If the GCC compiler is used, the optimization level 3 makes Fuego faster (the default CXXFLAGS on GCC-based systems are usually "-g -O2"). Therefore, a recommended build configuration would be:
env CXXFLAGS="-g -O3" ./configure make
To compile for debugging (no optimization, assertions enabled), use
env CXXFLAGS="-g" ./configure --enable-assert=yes make
aclocal autoheader autoreconf -i
The above commands need to be run only initially. Then the compilation works as in the previous section. After adding or removing files or doing other changes to configure.ac
or a Makefile.am
, you need to run autoreconf
again before doing a make. A better way is to configure your makefiles with ./configure --enable-maintainer-mode
. Then a make will automatically check, if configure.ac
or a Makefile.am
have changed and recreate the makefiles before the compilation if necessary.
There is also a script setup-build.sh
in the root directory that sets up some commonly used build targets in the subdirectory fuego/build, such that they can be used in parallel without recreating the build configuration (using so-called VPATH builds). Simply type make
in the according subdirectory. This script can also be used to recreate the makefiles after changes to configure.ac
or a Makefile.am
.
After building, the executable is in fuegomain/fuego. It is a GTP engine that can be used with GUIs like GoGui. Fuego can also be installed on the system with the following command:
sudo make install
The following command compiles and runs the unit tests (and also runs other tests):
make check
Assuming that you want to build a debug and release version in different directories. This is called a VPATH-build. In this example, we choose fuego/build/autotools/debug
and fuego/build/autotools/release
as the build directories:
cd fuego mkdir -p build/autotools/debug cd build/autotools/debug env CXXFLAGS=-g ../../../configure --enable-assert --enable-optimize=no cd ../../../ mkdir -p build/autotools/release cd build/autotools/release ../../../configure
Then the command make
should be run in fuego/build/autotools/debug
or fuego/build/autotools/release
.