Compiling VDrift

From VDrift
Revision as of 00:52, 15 February 2007 by Thelusiv (talk) (Importing from FAQ, updating)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compiling VDrift is different depending on the operating system on which it is compiled.



Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries.


As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with SCons which is written in Python and makes much better sense than autotools in many ways. You may want to read a little about Using SCons.

There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must use the ./ command instead of scons.

Get the Code

You can get the code from a source package for a particular version, or you can get the development version.

Source Package

Download the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-version-src where version is something like 2005-10-02.

Unpack the archive, then enter the directory it creates.

tar jxvf vdrift-2005-10-02-src.tar.bz2
cd vdrift-2005-10-02-src

Development version

You can check out the development version of VDrift from our Subversion repository. See Getting the development version.

Once you've checked out the code, enter the directory Subversion created.

cd vdrift


If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following:

tar zxvf tools/scons-local-0.96.1.tar.gz
Note: Some of the following steps refer to the scons command, you should now replace that with ./


To compile VDrift, just use the scons command.



You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the arch option.

scons arch=a64

Compiling VDrift in release mode will turn off debugging options, and enbale more compiler optimizations.

scons release=1


To install, use the SCons build target install. This command must be run as root.

scons install


There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the minimal option, which is on by default.

scons install minimal=0

You can also change the installation prefix. By default, VDrift is installed to /usr/share/games/vdrift, but if you wanted it to go in /usr/local/share/games/vdrift, you can change the prefix setting.

scons install prefix=/usr/local
Note: There are many more build and install options, see the Using SCons page for more information.