Building Allegro for GP2X

by George Foot

Don't Panic

It's really not very hard...

  1. Unpack the Allegro sources, e.g. tar -xzf allegro-4.2.0.tar.gz
  2. Apply my patches, e.g. cd allegro-4.2.0 ; patch -p1 < gp2xallegro-0.3.diff
  3. Configure properly - this is the hard bit, so unless you know better, stick to the following command:

    LDFLAGS=-static ./configure --host arm-open2x-linux --without-x --enable-static --disable-shared --enable-lgp2x --disable-modules --prefix=/opt/gp2x --enable-dbglib

    This will build static libraries, not shared libraries, in debug and release modes, and link the various programs (demo game, examples, tests) with the release version, totally staticly. Everything gets installed to subdirectories (bin, lib, include, share) of /opt/gp2x.

    If you want, you can --enable-dbgprog to build the programs in debug mode too, and link them to the debug library. Up to you.

  4. make depend - sort out dependencies, write makefiles
  5. make - build everything
  6. make install - copy relevant stuff to /opt/gp2x or whatever you set --prefix to
After installation, you probably want to add the relevant bin directory to your path. Don't worry about the include or lib directories, gp2x-allegro-config handles that for you! So it doesn't matter if you choose to install Allegro off by itself somewhere, away from all your precious devkitgp2x libraries.

Using Allegro for GP2X

See Using Allegro for GP2X