Linux Development Environment
Note: These instructions are likely to change often as the build system takes shape.
Requirements
- GNU Make
- GCC 4.3 or later
- The GNU Autotools: Autoconf, Automake, and Libtool
- pkg-config
- gettext
- libCURL
- LibYAML
- OpenAL and FreeALUT
- Lua 5.1 and Luabind 0.7 or later
- SDL 1.2.10 or later
- Boost libraries
- ASIO
- Filesystem
- Thread
Ubuntu 9.04 (Jaunty), 9.10 (Karmic), 10.4 LTS (Lucid), and Debian testing (squeeze) users can install the above dependencies with:
sudo apt-get install build-essential autoconf automake libtool pkg-config \
gettext libcurl4-gnutls-dev libyaml-dev libopenal-dev libalut-dev \
liblua5.1-0-dev libluabind-dev libois-dev libsdl-dev \
libboost-filesystem-dev libboost-thread-dev
Ubuntu 8.10 (Intrepid) users can enable the "universe" repository in order to run the above command.
Ubuntu 8.04 (Hardy) does not have a package for LibYAML.
Generating makefiles
Run the provided autogen.sh script:
./autogen.sh
It will copy files required for the autotools into the current directory. It will also run the "configure" script for you, to generate the Makefiles.
If the configure script fails, it probably couldn't find some required dependency. You can re-run the autogen.sh script with arguments (which will be passed to the configure script) if it can't find the dependencies automatically. For example, if Boost is installed in /opt/boost and LibYAML is installed in /opt/libyaml:
./autogen.sh --with-boost=/opt/boost --with-yaml=/opt/libyaml
Building
If the configure script succeeded:
make
This will build what little has been ported to Linux.
Editing the *.ac and *.am files
If you edit the configure.ac file, you should re-run autogen.sh.
If you edit any of the Makefile.am files, make is usually smart enough to regenerate the Makefile for you (look for a call to automake in the output from running make). If you get an error about not finding a target to generate a file, then try re-running autogen.sh.
Testing
Currently, there is no framework for testing.
However, it is possible to make sure that the generated tarball (see "Distribution" below) contains all the necessary files for building:
make distcheck
This will unpack the distributable files into a temporary directory, then configure and make.
Note: distcheck currently fails since not all client files are included in the tarball.
Distribution
To generate hoverrace-(version).tar.bz2:
make dist
Other formats are supported as well:
- dist-zip: Generates .zip archive.
- dist-gzip: Generates .tar.gz archive.
The highest level of compression will always be used.
