portlibs

From devkitPro
Revision as of 23:09, 21 September 2010 by Wintermute (talk | contribs)
Jump to navigation Jump to search

devkitPro are currently supplying a selection of useful libraries for porting purposes. These can be found in the portlibs section of sourceforge. Eventually we hope to have the installer/updater pull these automatically but for now they can be installed manually. The archives should be extracted into the $DEVKITPRO/portlibs/<cpu> directory as appropriate, i.e. libpng-1.2.40-arm.tar.bz2 should be extracted to $DEVKITPRO/portlibs/arm and libpng-1.2.40-ppc.tar.bz2 to $DEVKITPRO/portlibs/ppc.

To use these libraries in your projects just add $(PORTLIBS) to the LIBDIRS line and the appropriate lib to the LIBS line in the template makefiles, the devkitPro build system takes care of the rest.

For libraries which aren't currently provided you can attempt to build them manually - most portable libraries which use autotools should work. You'll need to do this from a bash shell (provided by msys under windows) with a fairly standard configure && make && make install approach.

For arm libraries you do this - please note, configure should usually not be run from the source directory directly, create a build directory outside the source tree and configure from there. Most libraries work this way but some will require configuring & building from inside the source tree using ./configure

 PATH=$DEVKITARM/bin:$PATH
 <path/to/>configure --prefix=$DEVKITPRO/portlibs/arm --host=arm-eabi --disable-shared --enable-static
 make && make install

For ppc libraries obviously you use devkitPPC and --host=powerpc-eabi

 PATH=$DEVKITPPC/bin:$PATH
 <path/to/>configure --prefix=$DEVKITPRO/portlibs/ppc --host=powerpc-eabi --disable-shared --enable-static
 make && make install

While zlib provides a configure script, it isn't a standard autotools configure and needs to be used differently.

 AR="arm-eabi-ar rc" RANLIB=arm-eabi-ranlib CC=arm-eabi-gcc prefix=$DEVKITPRO/portlibs/arm ./configure