mirror of
https://github.com/libretro/libretro-super
synced 2024-11-28 20:14:22 +00:00
f74147fbac
NOTE - all output filenames are now consistent with those of the other platform ports - maister -you have to change the install scripts now - naming convention now is ${name_of_core}_libretro.${extension}
133 lines
2.6 KiB
Bash
Executable File
133 lines
2.6 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
. ./libretro-config.sh
|
|
|
|
UNAME=$(uname)
|
|
if [ "`echo $UNAME | grep Linux`" ]; then
|
|
FORMAT_EXT="so"
|
|
FORMAT_COMPILER_TARGET=unix
|
|
FORMAT_COMPILER_TARGET_ALT=unix
|
|
elif [ "`echo $UNAME | grep BSD`" ]; then
|
|
FORMAT_EXT="so"
|
|
FORMAT_COMPILER_TARGET=unix
|
|
FORMAT_COMPILER_TARGET_ALT=unix
|
|
elif [ "`echo $UNAME | grep Darwin`" ]; then
|
|
FORMAT_EXT="dylib"
|
|
FORMAT_COMPILER_TARGET=osx
|
|
FORMAT_COMPILER_TARGET_ALT=osx
|
|
elif [ "`echo $UNAME | grep -i MINGW`" ]; then
|
|
FORMAT_EXT="dll"
|
|
FORMAT_COMPILER_TARGET=win
|
|
FORMAT_COMPILER_TARGET_ALT=win
|
|
else
|
|
# assume this is UNIX-based at least
|
|
FORMAT_EXT="so"
|
|
FORMAT_COMPILER_TARGET=unix
|
|
FORMAT_COMPILER_TARGET_ALT=unix
|
|
fi
|
|
|
|
. ./libretro-build-common-console.sh
|
|
|
|
# BSDs don't have readlink -f
|
|
read_link()
|
|
{
|
|
TARGET_FILE="$1"
|
|
cd $(dirname "$TARGET_FILE")
|
|
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
|
|
while [ -L "$TARGET_FILE" ]
|
|
do
|
|
TARGET_FILE=$(readlink "$TARGET_FILE")
|
|
cd $(dirname "$TARGET_FILE")
|
|
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
done
|
|
|
|
PHYS_DIR=$(pwd -P)
|
|
RESULT="$PHYS_DIR/$TARGET_FILE"
|
|
echo $RESULT
|
|
}
|
|
|
|
SCRIPT=$(read_link "$0")
|
|
echo "Script: $SCRIPT"
|
|
BASE_DIR=$(dirname "$SCRIPT")
|
|
RARCH_DIR="$BASE_DIR/dist"
|
|
RARCH_DIST_DIR="$RARCH_DIR/pc"
|
|
|
|
if [ -z "$JOBS" ]; then
|
|
JOBS=4
|
|
fi
|
|
|
|
die()
|
|
{
|
|
echo $1
|
|
#exit 1
|
|
}
|
|
|
|
ARCH=$(uname -m)
|
|
X86=false
|
|
X86_64=false
|
|
ARM=false
|
|
ARMV5=false
|
|
ARMV6=false
|
|
ARMV7=false
|
|
if [ $ARCH = x86_64 ]; then
|
|
echo "x86_64 CPU detected"
|
|
X86=true
|
|
X86_64=true
|
|
elif [ $ARCH = i686 ]; then
|
|
echo "x86_32 CPU detected"
|
|
X86=true
|
|
elif [ $ARCH = armv5tel ]; then
|
|
echo "ARMv5 CPU detected"
|
|
ARM=true
|
|
ARMV5=true
|
|
elif [ $ARCH = armv6l ]; then
|
|
echo "ARMv6 CPU detected"
|
|
ARM=true
|
|
ARMV6=true
|
|
elif [ $ARCH = armv7l ]; then
|
|
echo "ARMv7 CPU detected"
|
|
ARM=true
|
|
ARMV7=true
|
|
fi
|
|
|
|
if [ -z "$CC" ]; then
|
|
CC=gcc
|
|
fi
|
|
|
|
mkdir -p "$RARCH_DIST_DIR"
|
|
|
|
if [ $1 ]; then
|
|
$1
|
|
else
|
|
build_libretro_desmume
|
|
build_libretro_bsnes
|
|
build_libretro_mednafen
|
|
build_libretro_mednafen_gba
|
|
build_libretro_mednafen_snes
|
|
build_libretro_mednafen_psx
|
|
build_libretro_s9x
|
|
build_libretro_s9x_next
|
|
build_libretro_genplus
|
|
build_libretro_fba_full
|
|
build_libretro_vba
|
|
build_libretro_bnes
|
|
build_libretro_fceu
|
|
build_libretro_gambatte
|
|
build_libretro_meteor
|
|
build_libretro_nx
|
|
build_libretro_prboom
|
|
build_libretro_stella
|
|
build_libretro_quicknes
|
|
build_libretro_nestopia
|
|
build_libretro_tyrquake
|
|
build_libretro_pcsx_rearmed
|
|
build_libretro_mame078
|
|
build_libretro_dosbox
|
|
build_libretro_scummvm
|
|
if [ -z $BUILD_LIBRETRO_GL ]; then
|
|
build_libretro_modelviewer
|
|
build_libretro_scenewalker
|
|
fi
|
|
fi
|