The Allegro Wiki is migrating to github at

Allegro build system

From Allegro Wiki
Jump to: navigation, search

Current situation

Allegro 4.2 uses make, and autoconf on some platforms. The current build process is not well structured, stuff was simply added to a number of growing makefiles over time. But besides the general need for an overhaul, the main problems are:

  • No cross-platform support at all. A script must be run before building the first time, which will install one of several possible makefiles.
  • No auto-dependencies. Yes, you heard right. Some developers rely on ccache to speed up building and simply rebuild after each change, others forget to manually run the dependency script and then have to hunt phantom bugs. And even when you remember that you need to manually create dependencies - the script to create them takes a whole 24 seconds on my P4 with 3.2 GHz, so almost as long as the whole remaining build itself.
  • Writing configure checks in .m4 isn't really a nice experience.

In Allegro 4.3, there's now a scons build as alternative to the autoconf build. It requires python to be installed for everyone who wants to compile, and scons also has some small quirks, but it's still a much better alternative already and likely will replace the old build system at some point, which is much slower and almost unmaintainable.


Allegro is a complex piece of software that runs on several different OS platforms. Tools must be used to configure, build and install it. There are several options available. This document is to record our conclusions.


The chosen system must meet the following

  • Works on all platforms
  • Suitable for developers and end users
  • Handles dependencies automatically

And in addition, preferably

  • Does not require a lot of installing itself
  • Handles configuration, build and install in one package

Systems under consideration

These are possible options

Classic make

The GNU automake/autoconf/make package. Mature but still under active development. Currently we use make on all platforms and autoconf on *nix. Most Linux and OSX come with make installed. See Using Allegro with autoconf/KDevelop.


Unix only, this would integrate rather seamlessly into the current build there, and add auto dependencies. Requires Perl.


See FT Jam and 'Classic' Jam. Jam is cross-platform and mature. Jam is the underlying system for the Project Builder IDE on OSX.

Should work with autoconf fine. The binary is tiny (80 kB) so easy to distribute if necessary. It's fast and seems to do well at the easy things (compiling, linking). Ad-hoc rules (such as for plugins.h) will require more work than make. The documentation is lacking. I haven't figured out how to put object files in a separate directory and so on. So far, I quite like it. Here's a TestJamFile (File:Jamfile) I made. -- Main.PeterWang - 02 Dec 2005


See Apache ANT. Cross-platform and mature, but still under development. Requires Java and is slanted towards Java development. It is the underlying system for the Java Netbeans IDE.


See Scons. Cross-platform, stable but not yet at v1.0. Actively developed. Required Python.

Jon Rafkind is currently working on a first draft of a SCons build for Allegro.


See CBUILD. Still in early development. Requires only a C compiler to compile itself, then uses a simple Makefile like script to describe the build.

-- Main.PeterHull - 01 Dec 2005


List some comparisons between build tools here. Obviously they might be biased, but on the other hand we don't have to believe them :-)