* How to build and install on ps3 (*NOTE you will need a CFW [custom firmware] or system that can boot unsigned applications):
*  
* You will need several dependencies to setup ps3toolchain which are:
* autoconf
* automake
* bison
* flex
* makeinfo / texinfo
* ncurses
* gcc
* make
* wget
* libelf / elfutils
* zlib
* libgmp
* OpenSSL
* Python 2.x
* libtool
* git
* pkg-config
* nvidia-cg-toolkit (optional: for vertex shaders)
* 
* On debian/ubuntu you can just do this: 
* 	sudo apt-get install autoconf automake bison flex texinfo libncurses5-dev gcc make wget libelf-dev python2.6-dev zlib1g-dev libtool git-core libgmp3-dev libssl-dev pkg-config

  1. Setup the ps3 toolchain
    git clone https://github.com/ps3dev/ps3toolchain.git
    cd ps3toolchain
  
  2. Set up the build environment for ps3toolchain
    First create a directory where you want ps3dev to reside i.e.: /path/you/want/to/ps3dev
    
    export PS3DEV=/path/you/want/to/ps3dev
    export PATH=$PATH:$PS3DEV/bin
    export PATH=$PATH:$PS3DEV/ppu/bin
    export PATH=$PATH:$PS3DEV/spu/bin
    export PSL1GHT=$PS3DEV/psl1ght

  3. Execute the toolchain script *note this takes a long while (this downloads all necessary requirements and builds them all if you are missing dependencies it will tell you)
    ./toolchain.sh

  4. Patch SDL for the PS3
  $ cd build/ps3libraries/build/sdl_psl1ght
  $ patch -p1 < /path/to/paintown/misc/SDL-ps3.diff
  $ make && make install
    
  5. Make symlinks to the ps3dev directory you just checked out in /opt
    ln -s /path/to/ps3dev /opt/ps3dev

  6. Set the build type environment variable to 'ps3' and build paintown
    export ps3=1
    cd /path/to/paintown
    make

  The pkg currently does not contain the data directory. Once the pkg is installed, copy the data directory to the install directory/USRDIR. Use the ftp program or something to transfer data to the ps3.

  Notes:
  * install using ps3load from payloader3: http://git.dashhacks.com/payloader3
    'ps3load' is in the psl1ght/tools directory from where it was built
  * use an ftp server to upload data: http://ps3.dashhacks.com/downloads/openps3ftp
    Put the data in /dev_hdd0/tmp/data if running from ps3load.

  From the payloader3 screen press 'x, triangle' to put it in ps3load/ethdebug mode. Then use socat to get the output
  $ socat udp-recv:18194 stdout
