diff --git a/libretro-build-psp1.sh b/libretro-build-psp1.sh index 44d02fe2..c9ba5eed 100755 --- a/libretro-build-psp1.sh +++ b/libretro-build-psp1.sh @@ -1,54 +1,19 @@ #! /usr/bin/env bash # vim: set ts=3 sw=3 noet ft=sh : bash -SCRIPT=$(readlink -f $0) -BASE_DIR=$(dirname $SCRIPT) +SCRIPT="${0#./}" +BASE_DIR="${SCRIPT%/*}" WORKDIR="$PWD" -RARCH_DIR=$BASE_DIR/dist -RARCH_DIST_DIR=$RARCH_DIR/psp1 -FORMAT=_psp1 -FORMAT_COMPILER_TARGET=psp1 -FORMAT_COMPILER_TARGET_ALT=psp1 -FORMAT_EXT=a -JOBS=7 -MAKE=make -. "$BASE_DIR/libretro-build-common.sh" - -if [ $1 ]; then - $1 +if [ "$BASE_DIR" = "$SCRIPT" ]; then + BASE_DIR="$WORKDIR" else - libretro_build_core 2048 - libretro_build_core bluemsx - libretro_build_core fceumm - libretro_build_core fmsx - libretro_build_core gambatte - libretro_build_core genesis_plus_gx - libretro_build_core handy - #libretro_build_core mame078 - libretro_build_core mednafen - libretro_build_core mednafen_bsnes - libretro_build_core mednafen_gba - libretro_build_core mednafen_lynx - libretro_build_core mednafen_ngp - libretro_build_core mednafen_pce_fast - libretro_build_core mednafen_pcfx - libretro_build_core mednafen_supergrafx - libretro_build_core mednafen_vb - libretro_build_core mednafen_wswan - libretro_build_core nestopia - libretro_build_core nxengine - libretro_build_core o2em - libretro_build_core picodrive - libretro_build_core prboom - libretro_build_core prosystem - libretro_build_core quicknes - libretro_build_core snes9x_next - libretro_build_core stella - libretro_build_core tgbdual - libretro_build_core tyrquake - libretro_build_core vba_next - libretro_build_core vecx - - build_libretro_fba_cps2 + if [[ "$0" != /* ]]; then + # Make the path absolute + BASE_DIR="$WORKDIR/$BASE_DIR" + fi fi + +# The PSP1 build rules have all been moved to libretro-build.sh + +platform=psp1 ${BASE_DIR}/libretro-build.sh $@ diff --git a/libretro-build.sh b/libretro-build.sh index 2e93c5dc..3266efd0 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -145,14 +145,19 @@ build_default_cores_libretro_gl() { # (They also use rules builds, which will help later) build_default_cores() { - if [ $platform == "wii" ] || [ $platform == "ngc" ]; then + if [ $platform == "wii" ] || [ $platform == "ngc" ] || [ $platform == "psp1" ]; then build_default_cores_small_memory_footprint fi libretro_build_core 2048 libretro_build_core bluemsx libretro_build_core catsfc - libretro_build_core dosbox - libretro_build_core fb_alpha + if [ $platform != "psp1" ]; then + libretro_build_core dosbox + fi + if [ $platform != "psp1" ]; then + # Excluded for binary size reasons + libretro_build_core fb_alpha + fi libretro_build_core fceumm libretro_build_core fmsx libretro_build_core gambatte @@ -167,26 +172,39 @@ build_default_cores() { libretro_build_core vba_next libretro_build_core vbam libretro_build_core vecx - libretro_build_core mgba - libretro_build_core bsnes_cplusplus98 + if [ $platform != "psp1" ]; then + # (PSP) Compilation issues + libretro_build_core mgba + # (PSP) Performance issues + libretro_build_core genesis_plus_gx + fi - libretro_build_core genesis_plus_gx + if [ $platform != "psp1" ] && [ $platform != "wii" ] && [ $platform != "ngc" ]; then + # (PSP/NGC/Wii) Performance issues + libretro_build_core bsnes_cplusplus98 + if [ $platform != "psp1" ]; then + libretro_build_core mame078 + fi + libretro_build_core mednafen_gba + fi - libretro_build_core mame078 - - libretro_build_core mednafen_gba libretro_build_core mednafen_lynx libretro_build_core mednafen_ngp libretro_build_core mednafen_pce_fast - libretro_build_core mednafen_pcfx - libretro_build_core mednafen_psx + if [ $platform != "psp1" ] && [ $platform != "wii" ] && [ $platform != "ngc" ] && [ $platform != "ps3" ] && [ $platform != "sncps3" ]; then + # Excluded for performance reasons + libretro_build_core mednafen_pcfx + libretro_build_core mednafen_psx + fi + if [ $platform != "qnx" ]; then # (QNX) Compilation issues libretro_build_core mednafen_snes libretro_build_core hatari libretro_build_core meteor fi + libretro_build_core mednafen_supergrafx libretro_build_core mednafen_vb libretro_build_core mednafen_wswan @@ -205,7 +223,7 @@ build_default_cores() { build_default_cores_libretro_gl - # Exclude this for PS3/NGC/Wii because SNES9x Next is a faster variant + # (PS3/NGC/Wii) Excluded for performance reasons libretro_build_core snes9x if [ $platform != "qnx" ]; then @@ -228,10 +246,11 @@ build_default_cores() { build_default_cores_cpp11 fi - if [ $platform != "win" ] && [ $platform != "qnx" ]; then + if [ $platform != "win" ] && [ $platform != "qnx" ] && [ $platform != "psp1" ]; then # Reasons for not compiling this on Windows yet - # (Windows) - Doesn't work properly # (QNX) - Compilation issues + # (PSP1) - Performance issues libretro_build_core pcsx_rearmed fi diff --git a/libretro-config.sh b/libretro-config.sh index b7fa140d..4dea3fa1 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -47,6 +47,17 @@ case "$platform" in CXX11="QCC -Vgcc_ntoarmv7le_cpp" ;; + psp1) + DIST_DIR="psp1" + FORMAT_EXT=a + FORMAT=_psp1 + FORMAT_COMPILER_TARGET=psp1 + FORMAT_COMPILER_TARGET_ALT=psp1 + + CC="psp-gcc${BINARY_EXT}" + CXX="psp-g++${BINARY_EXT}" + ;; + ps3) DIST_DIR="ps3" FORMAT_EXT=a