Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ How do I use it?

1. Set up your environment by installing the following software:

autoconf, automake, bison, flex, gcc, g++/gcc-c++, libusb-dev, make, ncurses, patch, readline, subversion, texinfo, wget, mpc, gmp, libelf, mpfr, git
autoconf, automake, bison, bzip2, flex, gcc, g++/gcc-c++, gzip, libusb-dev, make, ncurses, patch, readline, subversion, texinfo, xz-utils, wget, libelf, git

2. Set the PSPDEV and PATH environmental variables:

Expand All @@ -32,30 +32,30 @@ How do I use it?
> After you are done use `swapoff -a` disable the swapfile. Finally you can
> remove it with `rm`.

Ubuntu
------
Ubuntu/Debian
-------------

1. Install the required packages by running.
1. Install the required packages by running:

sudo apt-get install g++ build-essential autoconf automake cmake doxygen bison flex libncurses5-dev libsdl1.2-dev libreadline-dev libusb-dev texinfo libgmp3-dev libmpfr-dev libelf-dev libmpc-dev libfreetype6-dev zlib1g-dev libtool libtool-bin subversion git tcl unzip wget
sudo ./prepare-debian-ubuntu.sh

2. Build and install the toolchain and SDK.

sudo ./toolchain-sudo.sh
sudo ./toolchain-sudo.sh

> NOTE: If you do not wish for the toolchain to be installed in /usr/local/pspdev then edit toolchain-sudo.sh and change the INSTALLDIR variable.

OSX
---

1. Install [`port`][MacPorts] or [`brew`][HomeBrew].
2. Run `prepare-mac-os.sh`. This will auto-install all the libraries you will need before building.
2. Install all the libraries you will need before building by running:

sudo ./prepare-mac-os.sh
sudo ./prepare-mac-os.sh

3. Build and install the toolchain and SDK.

sudo ./toolchain-sudo.sh
sudo ./toolchain-sudo.sh

Where do I go from here?
========================
Expand Down
1 change: 1 addition & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function auto_extract
"tar") tar --no-same-owner -xf $path ;;
"gz"|"tgz") tar --no-same-owner -xzf $path ;;
"bz2"|"tbz2") tar --no-same-owner -xjf $path ;;
"xz"|"txz") tar --no-same-owner -xJf $path ;;
"zip") unzip $path ;;
*) echo "I don't know how to extract $ext archives!"; return 1 ;;
esac
Expand Down
9 changes: 2 additions & 7 deletions depends/check-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ function check_aclocal
missing_depends+=($1); return 1
}



# check_header gmp gmp.h
# check_header mpc mpc.h
# check_header mpfr mpfr.h
check_header libelf elf.h libelf.h libelf/libelf.h gelf.h libelf/gelf.h
check_header libusb usb.h
check_header ncurses ncurses.h ncurses/ncurses.h
Expand Down Expand Up @@ -105,10 +100,10 @@ if [ "$(uname)" == "Darwin" ]; then

# GNU libtool will be prepended with letter 'g' to prevent conflicts with
# the one comes along with OS X.
check_program glibtool
check_program glibtoolize
else
check_header readline readline.h readline/readline.h
check_program libtool
check_program libtoolize
fi

if [ ${#missing_depends[@]} -ne 0 ]; then
Expand Down
22 changes: 0 additions & 22 deletions patches/patch-gcc_cp_cfns.h

This file was deleted.

5 changes: 4 additions & 1 deletion prepare-debian-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash

# Install build dependencies
sudo apt-get install $@ g++ build-essential autoconf automake cmake doxygen bison flex libncurses5-dev libsdl1.2-dev libreadline-dev libusb-dev texinfo libgmp3-dev libmpfr-dev libelf-dev libmpc-dev libfreetype6-dev zlib1g-dev libtool libtool-bin subversion git tcl unzip
sudo apt-get install $@ g++ build-essential autoconf automake cmake doxygen \
bison flex libncurses5-dev libsdl1.2-dev libreadline-dev libusb-dev texinfo \
libelf-dev libfreetype6-dev zlib1g-dev libtool libtool-bin subversion git \
tcl wget unzip bzip2 gzip xz-utils

# Make `/bin/sh` an alias for `/bin/bash` instead of `/bin/dash` - which is
# faster, but doesn't play nice with some autotools scripts in psp-ports.
Expand Down
5 changes: 2 additions & 3 deletions prepare-mac-os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ install_libusb() {
}

if [ -e "/opt/local/bin/port" ]; then
sudo port install automake cmake doxygen libelf libmpc libusb wget
sudo port install automake cmake doxygen libelf libusb wget xz

install_libusb
elif [ -e "/usr/local/bin/brew" ]; then
CURRENT_USER=$(stat -f '%Su' /dev/console)
sudo -u $CURRENT_USER brew install automake cmake doxygen libelf libmpc libusb libusb-compat wget
sudo -u $CURRENT_USER brew install automake cmake doxygen libelf libusb libusb-compat wget xz
else
echo "Go install MacPorts from http://www.macports.org/ or Homebrew from http://brew.sh/ first, then we can talk"
fi

3 changes: 2 additions & 1 deletion scripts/001-binutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ cd build-psp
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
../configure --prefix="$PSPDEV" --target="psp" --enable-install-libbfd --enable-plugins --disable-werror --with-system-zlib
../configure --prefix="$PSPDEV" --target="psp" --enable-install-libbfd \
--enable-plugins --disable-werror --with-system-zlib

# Compile and install. ( -r is required for building under osx )
make -j $(num_cpus) clean
Expand Down
6 changes: 5 additions & 1 deletion scripts/002-gcc-stage1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
cd build-psp

## Configure the build.
CFLAGS="$CFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" ../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c" --enable-lto --with-newlib --without-headers --disable-libssp
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c" \
--enable-lto --with-newlib --without-headers --disable-libssp

## Compile and install.
make -j $(num_cpus) clean
Expand Down
5 changes: 4 additions & 1 deletion scripts/003-pspsdk-stage1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
./bootstrap

## Configure the build.
CFLAGS="$CFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" ./configure --with-pspdev="$PSPDEV"
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
./configure --with-pspdev="$PSPDEV"

## Build and install.
make -j $(num_cpus) clean
Expand Down
4 changes: 1 addition & 3 deletions scripts/004-newlib-1.20.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ clone_git_repo github.com pspdev newlib newlib-1_20_0-PSP

## Configure the build.
../configure --prefix="$PSPDEV" --target="psp" \
--enable-newlib-iconv \
--enable-newlib-multithread \
--enable-newlib-mb \
--enable-newlib-iconv --enable-newlib-multithread --enable-newlib-mb

## Compile and install.
make -j $(num_cpus) clean
Expand Down
6 changes: 5 additions & 1 deletion scripts/005-gcc-stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@

## Configure the build.
## If you want to build gdc add "d" to --enable-languages option.
CFLAGS="$CFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" ../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c,c++" --enable-lto --with-newlib --enable-cxx-flags="-G0"
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c,c++" \
--enable-lto --with-newlib --enable-cxx-flags="-G0"

## Compile and install.
make -j $(num_cpus) clean
Expand Down
5 changes: 4 additions & 1 deletion scripts/006-pspsdk-stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
./bootstrap

## Configure the build.
CFLAGS="$CFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" ./configure --with-pspdev="$PSPDEV"
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
./configure --with-pspdev="$PSPDEV"

## Build and install.
make -j $(num_cpus) clean
Expand Down
5 changes: 4 additions & 1 deletion scripts/007-gdb-7.3.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
cd build-psp

## Configure the build.
CFLAGS="$CFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" ../configure --prefix="$PSPDEV" --target="psp" --disable-werror --disable-nls
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
../configure --prefix="$PSPDEV" --target="psp" --disable-werror --disable-nls

## Compile and install.
make -j $(num_cpus) clean
Expand Down
5 changes: 4 additions & 1 deletion scripts/008-insight-6.8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ exit;
cd build-psp

## Configure the build.
CFLAGS="$CFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" ../configure --prefix="$PSPDEV" --target="psp" --disable-nls --disable-werror
CFLAGS="$CFLAGS -I/opt/local/include" \
CPPFLAGS="$CPPFLAGS -I/opt/local/include" \
LDFLAGS="$LDFLAGS -L/opt/local/lib" \
../configure --prefix="$PSPDEV" --target="psp" --disable-nls --disable-werror

## Compile and install.
make -j $(num_cpus) clean
Expand Down