Make a 1.2.3 guide to get libSDL into your environment for other n00bs like me
The big hurdle for most seems to be using svn and following the build instructions for each package.
But in any case, here's a little script that can install all of SDL:
Code: Select all
#!/bin/sh
SRCDIR="`pwd`"
TMPDIR="/tmp/pspsdl"
SVN="svn"
mkdir -p $TMPDIR
cd $TMPDIR
SDL_PKGS="SDL SDL_gfx SDL_image jpeg libpng zlib SDL_mixer SDL_ttf freetype"
for pkg in $SDL_PKGS ; do
rm -Rf $pkg
$SVN checkout svn://svn.pspdev.org/psp/trunk/$pkg
done
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 $TMPDIR
cd zlib
make
make install
cd $TMPDIR
cd libpng
make
make install
cd $TMPDIR
cd jpeg
make
make install
cd $TMPDIR
cd SDL_image
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` \
--prefix=`psp-config --psp-prefix`
make
make install
cd $TMPDIR
cd SDL_gfx
./autogen.sh
AR=psp-ar LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` \
--prefix=`psp-config --psp-prefix` --disable-mmx --disable-shared
make
make install
cd $TMPDIR
cd freetype
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
cd $TMPDIR
cd SDL_ttf
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` \
--with-freetype-prefix=`psp-config --psp-prefix` \
--without-x --prefix=`psp-config --psp-prefix`
make
make install
cd $TMPDIR
cd SDL_mixer
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` \
--disable-music-mp3 --prefix=`psp-config --psp-prefix`
make
make install
cd $TMPDIR
cd $SRCDIR
#for pkg in $SDL_PKGS ; do
# rm -Rf $pkg
#done
#
#rmdir $TMPDIR
And there's a few ports in the svn pspware repository that can be used to test the installation:
abrick - for testing SDL_mixer
vecteroids - depends upon SDL_image and SDL_mixer
SMC - requires SDL_ttf, SDL_mixer, SDL_image and SDL_gfx
Also, it is interesting to note that these source packages can be reused on your host platform; just build the packages downloaded from pspsvn by running ./configure (ie: without all the psp specifics). Running 'make clean' first would be a wise move.