portlibs: Difference between revisions

From devkitPro
Jump to navigation Jump to search
No edit summary
m (moved portlibs to Portlibs)
(No difference)

Revision as of 16:07, 20 September 2010

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 almost never be run from the source directory directly, create a build directory outside the source tree and configure from there.

 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