BUILDING MEGAZEUX FOR PSP

As of 2.81d, MegaZeux can be built for PSP. The only supported toolchain for
this is ps2dev's 'psptoolchain' and 'pspsdk' projects. These can be installed
from here:

http://ps2dev.org/psp/Tools (see "Toolchain")

Follow the instructions to build the toolchain.

BUILDING DEPENDENCIES

MegaZeux depends on libTremor and SDL, on the PSP platform. Check these modules
out from the ps2dev SVN repositories. Mikmod is optional, but should be
checked out if you want music with reasonable performance.

svn co svn://svn.pspdev.org/psp/trunk/libTremor
svn co svn://svn.pspdev.org/psp/trunk/SDL
svn co svn://svn.pspdev.org/psp/trunk/libmikmod

First, build libTremor:

cd libTremor
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./autogen.sh --host psp --prefix=`psp-config --psp-prefix`
make
make install
cd ..

Then build SDL:

cd SDL
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
cd ..

Then optionally build libmikmod:

cd libmikmod
make -f Makefile.psp
make install
cd ..

BUILDING MEGAZEUX FROM SOURCES

Extract the latest version of MegaZeux, or obtain it from SVN. Before starting,
we need to add another path to the PATH variable, so that SDL may be correctly
detected. You should have the $PSPDEV variable already defined from toolkit
installation. I will assume that this exists and is correct. Enter the
following:

export PATH=$PSPDEV/psp/bin:$PATH

cd megazeux
./config.sh --platform psp --prefix $PSPDEV/psp --optimize-size \
            --disable-editor --disable-helpsys --disable-utils \
            --disable-libpng
make

PACKAGING THE BUILD

Type:

make package

To construct a bootable EBOOT.PBP file.

You can then use "./package.sh -b psp" to build a dist/mzxsvn-psp.zip file for
distribution.

--ajs (20071021)
