Duplicate build scripts for tinkering
This commit is contained in:
parent
e71b22bf1c
commit
bdff6efe2d
|
@ -0,0 +1,644 @@
|
||||||
|
# vi: ts=3 sw=3 et ft=sh
|
||||||
|
|
||||||
|
die() {
|
||||||
|
echo $1
|
||||||
|
#exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "${CC}" ] && [ "${CXX}" ]; then
|
||||||
|
COMPILER="CC=\"${CC}\" CXX=\"${CXX}\""
|
||||||
|
else
|
||||||
|
COMPILER=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Compiler: ${COMPILER}"
|
||||||
|
|
||||||
|
[[ "${ARM_NEON}" ]] && echo '=== ARM NEON opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon"
|
||||||
|
[[ "${CORTEX_A8}" ]] && echo '=== Cortex A8 opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa8"
|
||||||
|
[[ "${CORTEX_A9}" ]] && echo '=== Cortex A9 opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa9"
|
||||||
|
[[ "${ARM_HARDFLOAT}" ]] && echo '=== ARM hardfloat ABI enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-hardfloat"
|
||||||
|
[[ "${ARM_SOFTFLOAT}" ]] && echo '=== ARM softfloat ABI enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-softfloat"
|
||||||
|
[[ "${X86}" ]] && echo '=== x86 CPU detected... ==='
|
||||||
|
[[ "${X86}" ]] && [[ "${X86_64}" ]] && echo '=== x86_64 CPU detected... ==='
|
||||||
|
[[ "${IOS}" ]] && echo '=== iOS =='
|
||||||
|
|
||||||
|
echo "${FORMAT_COMPILER_TARGET}"
|
||||||
|
echo "${FORMAT_COMPILER_TARGET_ALT}"
|
||||||
|
RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET
|
||||||
|
RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT
|
||||||
|
|
||||||
|
build_summary_log() {
|
||||||
|
if [ -n "${BUILD_SUMMARY}" ]; then
|
||||||
|
if [ "${1}" -eq "0" ]; then
|
||||||
|
echo ${2} >> ${BUILD_SUCCESS}
|
||||||
|
else
|
||||||
|
echo ${2} >> ${BUILD_FAIL}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_opengl() {
|
||||||
|
if [ "${BUILD_LIBRETRO_GL}" ]; then
|
||||||
|
if [ "${ENABLE_GLES}" ]; then
|
||||||
|
echo '=== OpenGL ES enabled ==='
|
||||||
|
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-gles"
|
||||||
|
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
|
||||||
|
else
|
||||||
|
echo '=== OpenGL enabled ==='
|
||||||
|
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-opengl"
|
||||||
|
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo '=== OpenGL disabled in build ==='
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_compiler_targets() {
|
||||||
|
export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET
|
||||||
|
export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_pcsx_rearmed_interpreter() {
|
||||||
|
build_dir="${WORKDIR}/libretro-pcsx_rearmed"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo '=== Building PCSX ReARMed Interpreter ==='
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build PCSX ReARMed'
|
||||||
|
cp "pcsx_rearmed_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/pcsx_rearmed_interpreter${FORMAT}.${FORMAT_EXT}"
|
||||||
|
build_summary_log ${?} "pcsx_rearmed_interpreter"
|
||||||
|
else
|
||||||
|
echo 'PCSX ReARMed not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 is corename
|
||||||
|
# $2 is subcorename
|
||||||
|
# $3 is subdir. In case there is no subdir, enter "." here
|
||||||
|
# $4 is Makefile name
|
||||||
|
# $5 is preferred platform
|
||||||
|
build_libretro_generic_makefile_subcore() {
|
||||||
|
build_dir="${WORKDIR}/libretro-${1}"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo "=== Building ${2} ==="
|
||||||
|
cd "${build_dir}/${3}"
|
||||||
|
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
make -f ${4} platform=${5} -j$JOBS clean || die "Failed to clean ${2}"
|
||||||
|
fi
|
||||||
|
make -f ${4} platform=${5} -j$JOBS || die "Failed to build ${2}"
|
||||||
|
cp ${2}_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/${2}_libretro$FORMAT.${FORMAT_EXT}
|
||||||
|
build_summary_log ${?} ${2}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_fba_cps2() {
|
||||||
|
build_libretro_generic_makefile_subcore "fb_alpha" "fba_cores_cps2" "svn-current/trunk/fbacores/cps2" "makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_fba_neogeo() {
|
||||||
|
build_libretro_generic_makefile_subcore "fb_alpha" "fba_cores_neo" "svn-current/trunk/fbacores/neogeo" "makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_fba_cps1() {
|
||||||
|
build_libretro_generic_makefile_subcore "fb_alpha" "fba_cores_cps1" "svn-current/trunk/fbacores/cps1" "makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
copy_core_to_dist() {
|
||||||
|
if [ "$FORMAT_COMPILER_TARGET" = "theos_ios" ]; then
|
||||||
|
cp "objs/obj/${1}_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} ${1}
|
||||||
|
else
|
||||||
|
cp "${1}_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} ${1}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 is corename
|
||||||
|
# $2 is subdir. In case there is no subdir, enter "." here
|
||||||
|
# $3 is Makefile name
|
||||||
|
# $4 is preferred platform
|
||||||
|
build_libretro_generic_makefile() {
|
||||||
|
build_dir="${WORKDIR}/libretro-${1}"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo "=== Building ${1} ==="
|
||||||
|
cd "${build_dir}/${2}"
|
||||||
|
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f ${3} platform="${4}" ${COMPILER} "-j${JOBS}" clean || die "Failed to build ${1}"
|
||||||
|
fi
|
||||||
|
echo "${MAKE}" -f ${3} platform="${4}" ${COMPILER} "-j${JOBS}"
|
||||||
|
"${MAKE}" -f ${3} platform="${4}" ${COMPILER} "-j${JOBS}" || die "Failed to build ${1}"
|
||||||
|
if [ -z "${5}" ]; then
|
||||||
|
copy_core_to_dist $1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "${1} not fetched, skipping ..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_stonesoup() {
|
||||||
|
build_libretro_generic_makefile "stonesoup" "crawl-ref" "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_hatari() {
|
||||||
|
build_libretro_generic_makefile "hatari" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_prosystem() {
|
||||||
|
build_libretro_generic_makefile "prosystem" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_4do() {
|
||||||
|
build_libretro_generic_makefile "4do" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_o2em() {
|
||||||
|
build_libretro_generic_makefile "o2em" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_virtualjaguar() {
|
||||||
|
build_libretro_generic_makefile "virtualjaguar" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_tgbdual() {
|
||||||
|
build_libretro_generic_makefile "tgbdual" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_nx() {
|
||||||
|
build_libretro_generic_makefile "nxengine" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_catsfc() {
|
||||||
|
build_libretro_generic_makefile "catsfc" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_emux() {
|
||||||
|
build_libretro_generic_makefile "emux" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET} 1
|
||||||
|
copy_core_to_dist "emux_chip8"
|
||||||
|
copy_core_to_dist "emux_gb"
|
||||||
|
copy_core_to_dist "emux_nes"
|
||||||
|
copy_core_to_dist "emux_sms"
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_picodrive() {
|
||||||
|
build_libretro_generic_makefile "picodrive" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_tyrquake() {
|
||||||
|
build_libretro_generic_makefile "tyrquake" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_2048() {
|
||||||
|
build_libretro_generic_makefile "2048" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_vecx() {
|
||||||
|
build_libretro_generic_makefile "vecx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_stella() {
|
||||||
|
build_libretro_generic_makefile "stella" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_bluemsx() {
|
||||||
|
build_libretro_generic_makefile "bluemsx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_handy() {
|
||||||
|
build_libretro_generic_makefile "handy" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_fmsx() {
|
||||||
|
build_libretro_generic_makefile "fmsx" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_gpsp() {
|
||||||
|
build_libretro_generic_makefile "gpsp" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_vba_next() {
|
||||||
|
build_libretro_generic_makefile "vba_next" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_vbam() {
|
||||||
|
build_libretro_generic_makefile "vbam" "src/libretro" "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_snes9x_next() {
|
||||||
|
build_libretro_generic_makefile "snes9x_next" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_dinothawr() {
|
||||||
|
build_libretro_generic_makefile "dinothawr" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_genesis_plus_gx() {
|
||||||
|
build_libretro_generic_makefile "genesis_plus_gx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_mame078() {
|
||||||
|
build_libretro_generic_makefile "mame078" "." "makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_prboom() {
|
||||||
|
build_libretro_generic_makefile "prboom" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_pcsx_rearmed() {
|
||||||
|
build_libretro_generic_makefile "pcsx_rearmed" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_fceumm() {
|
||||||
|
build_libretro_generic_makefile "fceumm" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_snes() {
|
||||||
|
build_libretro_generic_makefile "mednafen_snes" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_lynx() {
|
||||||
|
build_libretro_generic_makefile "mednafen_lynx" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_wswan() {
|
||||||
|
build_libretro_generic_makefile "mednafen_wswan" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_gba() {
|
||||||
|
build_libretro_generic_makefile "mednafen_gba" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_ngp() {
|
||||||
|
build_libretro_generic_makefile "mednafen_ngp" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_pce_fast() {
|
||||||
|
build_libretro_generic_makefile "mednafen_pce_fast" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_vb() {
|
||||||
|
build_libretro_generic_makefile "mednafen_vb" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_pcfx() {
|
||||||
|
build_libretro_generic_makefile "mednafen_pcfx" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_psx() {
|
||||||
|
build_libretro_generic_makefile "beetle_psx" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_mednafen_psx() {
|
||||||
|
build_libretro_generic_makefile "mednafen_psx" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_beetle_supergrafx() {
|
||||||
|
build_libretro_generic_makefile "mednafen_supergrafx" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_meteor() {
|
||||||
|
build_libretro_generic_makefile "meteor" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_nestopia() {
|
||||||
|
build_libretro_generic_makefile "nestopia" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_gambatte() {
|
||||||
|
build_libretro_generic_makefile "gambatte" "libgambatte" "Makefile.libretro" ${FORMAT_COMPILER_TARGET_ALT}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_yabause() {
|
||||||
|
build_libretro_generic_makefile "yabause" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_desmume() {
|
||||||
|
build_libretro_generic_makefile "desmume" "desmume" "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_snes9x() {
|
||||||
|
build_libretro_generic_makefile "snes9x" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_quicknes() {
|
||||||
|
build_libretro_generic_makefile "quicknes" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_dosbox() {
|
||||||
|
build_libretro_generic_makefile "dosbox" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_fb_alpha() {
|
||||||
|
build_libretro_generic_makefile "fb_alpha" "svn-current/trunk" "makefile.libretro" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_ffmpeg() {
|
||||||
|
check_opengl
|
||||||
|
build_libretro_generic_makefile "ffmpeg" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
reset_compiler_targets
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_3dengine() {
|
||||||
|
check_opengl
|
||||||
|
build_libretro_generic_makefile "3dengine" "." "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
reset_compiler_targets
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_scummvm() {
|
||||||
|
build_libretro_generic_makefile "scummvm" "backends/platform/libretro/build" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_ppsspp() {
|
||||||
|
check_opengl
|
||||||
|
build_libretro_generic_makefile "ppsspp" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
|
||||||
|
reset_compiler_targets
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
build_libretro_mame() {
|
||||||
|
build_dir="${WORKDIR}/libretro-mame"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo ''
|
||||||
|
echo '=== Building MAME ==='
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
if [ "$IOS" ]; then
|
||||||
|
echo '=== Building MAME (iOS) ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools'
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} emulator "-j${JOBS}" || die 'Failed to build MAME (iOS)'
|
||||||
|
elif [ "$X86_64" = "true" ]; then
|
||||||
|
echo '=== Building MAME64 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
else
|
||||||
|
echo '=== Building MAME32 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
fi
|
||||||
|
cp "mame_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
else
|
||||||
|
echo 'MAME not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_mess() {
|
||||||
|
build_dir="${WORKDIR}/libretro-mame"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo ''
|
||||||
|
echo '=== Building MESS ==='
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
if [ "$X86_64" = "true" ]; then
|
||||||
|
echo '=== Building MESS64 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
else
|
||||||
|
echo '=== Building MESS32 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
fi
|
||||||
|
cp "mess_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} "mess"
|
||||||
|
else
|
||||||
|
echo 'MAME not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
rebuild_libretro_mess() {
|
||||||
|
build_dir="${WORKDIR}/libretro-mame"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo ''
|
||||||
|
echo '=== Building MESS ==='
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
if [ "$X86_64" = "true" ]; then
|
||||||
|
echo '=== Building MESS64 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
else
|
||||||
|
echo '=== Building MESS32 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mess" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
fi
|
||||||
|
cp "mess_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} "mess"
|
||||||
|
else
|
||||||
|
echo 'MAME not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_ume() {
|
||||||
|
build_dir="${WORKDIR}/libretro-mame"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo ''
|
||||||
|
echo '=== Building UME ==='
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
if [ "$X86_64" = "true" ]; then
|
||||||
|
echo '=== Building UME64 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
else
|
||||||
|
echo '=== Building UME32 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
fi
|
||||||
|
cp "ume_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} "ume"
|
||||||
|
else
|
||||||
|
echo 'MAME not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
rebuild_libretro_ume() {
|
||||||
|
build_dir="${WORKDIR}/libretro-mame"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo ''
|
||||||
|
echo '=== Building UME ==='
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
if [ "$X86_64" = "true" ]; then
|
||||||
|
echo '=== Building UME64 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
else
|
||||||
|
echo '=== Building UME32 ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=ume" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME'
|
||||||
|
fi
|
||||||
|
cp "ume_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} "ume"
|
||||||
|
else
|
||||||
|
echo 'MAME not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 is corename
|
||||||
|
# $2 is profile shortname.
|
||||||
|
# $3 is profile name
|
||||||
|
# $4 is compiler
|
||||||
|
build_libretro_bsnes_modern() {
|
||||||
|
build_dir="${WORKDIR}/libretro-${1}"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo "=== Building ${1} ${3} ==="
|
||||||
|
cd ${build_dir}
|
||||||
|
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
rm -f obj/*.{o,"${FORMAT_EXT}"}
|
||||||
|
rm -f out/*.{o,"${FORMAT_EXT}"}
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${4}" ui='target-libretro' profile="${3}" "-j${JOBS}" || die "Failed to build ${1} ${3} core"
|
||||||
|
cp -f "out/${1}_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${1}_${3}_libretro${FORMAT}.${FORMAT_EXT}"
|
||||||
|
build_summary_log ${?} "${1}_${3}"
|
||||||
|
else
|
||||||
|
echo "${1} ${3} not fetched, skipping ..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_bsnes() {
|
||||||
|
build_libretro_bsnes_modern "bsnes" "perf" "performance" ${CXX11}
|
||||||
|
build_libretro_bsnes_modern "bsnes" "balanced" "balanced" ${CXX11}
|
||||||
|
build_libretro_bsnes_modern "bsnes" "." "accuracy" ${CXX11}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_bsnes_mercury() {
|
||||||
|
build_libretro_bsnes_modern "bsnes_mercury" "perf" "performance" ${CXX11}
|
||||||
|
build_libretro_bsnes_modern "bsnes_mercury" "balanced" "balanced" ${CXX11}
|
||||||
|
build_libretro_bsnes_modern "bsnes_mercury" "." "accuracy" ${CXX11}
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_bsnes_cplusplus98() {
|
||||||
|
CORENAME="bsnes_cplusplus98"
|
||||||
|
build_dir="${WORKDIR}/libretro-${CORENAME}"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo "=== Building ${CORENAME} ==="
|
||||||
|
cd ${build_dir}
|
||||||
|
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" clean || die "Failed to clean ${CORENAME}"
|
||||||
|
fi
|
||||||
|
"${MAKE}" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}"
|
||||||
|
cp "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}"
|
||||||
|
build_summary_log ${?} ${CORENAME}
|
||||||
|
else
|
||||||
|
echo "${CORENAME} not fetched, skipping ..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_bnes() {
|
||||||
|
build_dir="${WORKDIR}/libretro-bnes"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
echo '=== Building bNES ==='
|
||||||
|
cd ${build_dir}
|
||||||
|
|
||||||
|
mkdir -p obj
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" -f Makefile "-j${JOBS}" clean || die 'Failed to clean bNES'
|
||||||
|
fi
|
||||||
|
"${MAKE}" -f Makefile ${COMPILER} "-j${JOBS}" compiler="${CXX11}" || die 'Failed to build bNES'
|
||||||
|
cp "libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/bnes_libretro${FORMAT}.${FORMAT_EXT}"
|
||||||
|
build_summary_log ${?} "bnes"
|
||||||
|
else
|
||||||
|
echo 'bNES not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_libretro_mupen64() {
|
||||||
|
check_opengl
|
||||||
|
build_dir="${WORKDIR}/libretro-mupen64plus"
|
||||||
|
if [ -d "${build_dir}" ]; then
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
mkdir -p obj
|
||||||
|
if [ "${X86}" ] && [ "${X86_64}" ]; then
|
||||||
|
echo '=== Building Mupen 64 Plus (x86_64 dynarec) ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" WITH_DYNAREC='x86_64' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (x86_64 dynarec)'
|
||||||
|
fi
|
||||||
|
"${MAKE}" WITH_DYNAREC='x86_64' platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64 (x86_64 dynarec)'
|
||||||
|
elif [ "${X86}" ]; then
|
||||||
|
echo '=== Building Mupen 64 Plus (x86 32bit dynarec) ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" WITH_DYNAREC='x86' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (x86 dynarec)'
|
||||||
|
fi
|
||||||
|
"${MAKE}" WITH_DYNAREC='x86' platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64 (x86 dynarec)'
|
||||||
|
elif [ "${CORTEX_A8}" ] || [ "${CORTEX_A9}" ] || [ "${IOS}" ]; then
|
||||||
|
echo '=== Building Mupen 64 Plus (ARM dynarec) ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" WITH_DYNAREC='arm' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (ARM dynarec)'
|
||||||
|
fi
|
||||||
|
"${MAKE}" WITH_DYNAREC='arm' platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64 (ARM dynarec)'
|
||||||
|
else
|
||||||
|
echo '=== Building Mupen 64 Plus ==='
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
"${MAKE}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64'
|
||||||
|
fi
|
||||||
|
"${MAKE}" platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64'
|
||||||
|
fi
|
||||||
|
cp "mupen64plus_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
|
||||||
|
build_summary_log ${?} "mupen64plus"
|
||||||
|
else
|
||||||
|
echo 'Mupen64 Plus not fetched, skipping ...'
|
||||||
|
fi
|
||||||
|
reset_compiler_targets
|
||||||
|
}
|
||||||
|
|
||||||
|
build_summary() {
|
||||||
|
if [ -z "${NOBUILD_SUMMARY}" ]; then
|
||||||
|
echo "=== Core Build Summary ===" > ${BUILD_SUMMARY}
|
||||||
|
if [ -r "${BUILD_SUCCESS}" ]; then
|
||||||
|
echo "`wc -l < ${BUILD_SUCCESS}` core(s) successfully built:" >> ${BUILD_SUMMARY}
|
||||||
|
${BUILD_SUMMARY_FMT} ${BUILD_SUCCESS} >> ${BUILD_SUMMARY}
|
||||||
|
else
|
||||||
|
echo " 0 cores successfully built. :(" >> ${BUILD_SUMMARY}
|
||||||
|
echo "`wc -l < ${BUILD_FAIL}` core(s) failed to build:"
|
||||||
|
fi
|
||||||
|
if [ -r "${BUILD_FAIL}" ]; then
|
||||||
|
echo "`wc -l < ${BUILD_FAIL}` core(s) failed to build:" >> ${BUILD_SUMMARY}
|
||||||
|
${BUILD_SUMMARY_FMT} ${BUILD_FAIL} >> ${BUILD_SUMMARY}
|
||||||
|
else
|
||||||
|
echo " 0 cores failed to build! :D" >> ${BUILD_SUMMARY}
|
||||||
|
fi
|
||||||
|
rm -f $BUILD_SUCCESS $BUILD_FAIL
|
||||||
|
cat ${BUILD_SUMMARY}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
create_dist_dir() {
|
||||||
|
if [ -d "${RARCH_DIST_DIR}" ]; then
|
||||||
|
echo "Directory ${RARCH_DIST_DIR} already exists, skipping creation..."
|
||||||
|
else
|
||||||
|
mkdir -p "${RARCH_DIST_DIR}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
create_dist_dir
|
||||||
|
|
|
@ -0,0 +1,161 @@
|
||||||
|
#! /bin/bash
|
||||||
|
# vi: sw=3 ts=3 et
|
||||||
|
|
||||||
|
# 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"`"
|
||||||
|
BASE_DIR="`dirname "${SCRIPT}"`"
|
||||||
|
WORKDIR="`pwd`"
|
||||||
|
|
||||||
|
. ${BASE_DIR}/libretro-config.sh
|
||||||
|
|
||||||
|
if [ -z "$RARCH_DIST_DIR" ]; then
|
||||||
|
RARCH_DIR="${WORKDIR}/dist"
|
||||||
|
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JOBS" ]; then
|
||||||
|
JOBS=7
|
||||||
|
fi
|
||||||
|
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
echo $1
|
||||||
|
#exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$HOST_CC" ]; then
|
||||||
|
CC="${HOST_CC}-gcc"
|
||||||
|
CXX="${HOST_CC}-g++"
|
||||||
|
CXX11="${HOST_CC}-g++"
|
||||||
|
STRIP="${HOST_CC}-strip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$MAKE" ]; then
|
||||||
|
if uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
||||||
|
MAKE=mingw32-make
|
||||||
|
else
|
||||||
|
if type gmake > /dev/null 2>&1; then
|
||||||
|
MAKE=gmake
|
||||||
|
else
|
||||||
|
MAKE=make
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$CC" ]; then
|
||||||
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
||||||
|
CC=cc
|
||||||
|
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
||||||
|
CC=mingw32-gcc
|
||||||
|
else
|
||||||
|
CC=gcc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$CXX" ]; then
|
||||||
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
||||||
|
CXX=c++
|
||||||
|
CXX11="clang++ -std=c++11 -stdlib=libc++"
|
||||||
|
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
||||||
|
CXX=mingw32-g++
|
||||||
|
CXX11=mingw32-g++
|
||||||
|
else
|
||||||
|
CXX=g++
|
||||||
|
CXX11=g++
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET
|
||||||
|
echo "CC = $CC"
|
||||||
|
echo "CXX = $CXX"
|
||||||
|
echo "STRIP = $STRIP"
|
||||||
|
|
||||||
|
. ${BASE_DIR}/libretro-build-common.sh
|
||||||
|
|
||||||
|
mkdir -p "$RARCH_DIST_DIR"
|
||||||
|
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
NOBUILD_SUMMARY=1
|
||||||
|
while [ -n "${1}" ]; do
|
||||||
|
"${1}"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
else
|
||||||
|
build_libretro_2048
|
||||||
|
build_libretro_4do
|
||||||
|
build_libretro_bluemsx
|
||||||
|
build_libretro_fmsx
|
||||||
|
build_libretro_bsnes_cplusplus98
|
||||||
|
build_libretro_bsnes
|
||||||
|
build_libretro_bsnes_mercury
|
||||||
|
build_libretro_beetle_lynx
|
||||||
|
build_libretro_beetle_gba
|
||||||
|
build_libretro_beetle_ngp
|
||||||
|
build_libretro_beetle_pce_fast
|
||||||
|
build_libretro_beetle_supergrafx
|
||||||
|
build_libretro_beetle_pcfx
|
||||||
|
build_libretro_beetle_vb
|
||||||
|
build_libretro_beetle_wswan
|
||||||
|
build_libretro_mednafen_psx
|
||||||
|
build_libretro_beetle_snes
|
||||||
|
build_libretro_catsfc
|
||||||
|
build_libretro_snes9x
|
||||||
|
build_libretro_snes9x_next
|
||||||
|
build_libretro_genesis_plus_gx
|
||||||
|
build_libretro_fb_alpha
|
||||||
|
build_libretro_vbam
|
||||||
|
build_libretro_vba_next
|
||||||
|
build_libretro_bnes
|
||||||
|
build_libretro_fceumm
|
||||||
|
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_mame078
|
||||||
|
build_libretro_mame
|
||||||
|
build_libretro_dosbox
|
||||||
|
build_libretro_scummvm
|
||||||
|
build_libretro_picodrive
|
||||||
|
build_libretro_handy
|
||||||
|
build_libretro_desmume
|
||||||
|
if [ $FORMAT_COMPILER_TARGET != "win" ]; then
|
||||||
|
build_libretro_pcsx_rearmed
|
||||||
|
fi
|
||||||
|
build_libretro_yabause
|
||||||
|
build_libretro_vecx
|
||||||
|
build_libretro_tgbdual
|
||||||
|
build_libretro_prosystem
|
||||||
|
build_libretro_dinothawr
|
||||||
|
build_libretro_virtualjaguar
|
||||||
|
build_libretro_mupen64
|
||||||
|
build_libretro_ffmpeg
|
||||||
|
build_libretro_3dengine
|
||||||
|
build_libretro_ppsspp
|
||||||
|
build_libretro_o2em
|
||||||
|
build_libretro_hatari
|
||||||
|
build_libretro_gpsp
|
||||||
|
build_libretro_emux
|
||||||
|
build_summary
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,222 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vi: ts=3 sw=3 et
|
||||||
|
|
||||||
|
# Architecture Assignment
|
||||||
|
config_cpu() {
|
||||||
|
[ -n "${2}" ] && ARCH=${1}
|
||||||
|
[ -z "${ARCH}" ] && ARCH="`uname -m`"
|
||||||
|
case "${ARCH}" in
|
||||||
|
x86_64)
|
||||||
|
X86=true
|
||||||
|
X86_64=true
|
||||||
|
;;
|
||||||
|
i386|i686)
|
||||||
|
X86=true
|
||||||
|
;;
|
||||||
|
armv*)
|
||||||
|
ARM=true
|
||||||
|
export FORMAT_COMPILER_TARGET=armv
|
||||||
|
export RARCHCFLAGS="${RARCHCFLAGS} -marm"
|
||||||
|
case "${ARCH}" in
|
||||||
|
armv5tel) ARMV5=true ;;
|
||||||
|
armv6l) ARMV6=true ;;
|
||||||
|
armv7l) ARMV7=true ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [ -n "${PROCESSOR_ARCHITEW6432}" -a "${PROCESSOR_ARCHITEW6432}" = "AMD64" ]; then
|
||||||
|
ARCH=x86_64
|
||||||
|
X86=true && X86_64=true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Platform Assignment
|
||||||
|
config_platform() {
|
||||||
|
[ -n "${1}" ] && platform="${1}"
|
||||||
|
[ -z "${platform}" ] && platform="`uname`"
|
||||||
|
case "${platform}" in
|
||||||
|
*BSD*)
|
||||||
|
FORMAT_EXT="so"
|
||||||
|
FORMAT_COMPILER_TARGET="unix"
|
||||||
|
DIST_DIR="bsd"
|
||||||
|
;;
|
||||||
|
osx|*Darwin*)
|
||||||
|
FORMAT_EXT="dylib"
|
||||||
|
FORMAT_COMPILER_TARGET="osx"
|
||||||
|
DIST_DIR="osx"
|
||||||
|
;;
|
||||||
|
win|*mingw32*|*MINGW32*|*MSYS_NT*)
|
||||||
|
FORMAT_EXT="dll"
|
||||||
|
FORMAT_COMPILER_TARGET="win"
|
||||||
|
DIST_DIR="win_x86"
|
||||||
|
;;
|
||||||
|
win64|*mingw64*|*MINGW64*)
|
||||||
|
FORMAT_EXT="dll"
|
||||||
|
FORMAT_COMPILER_TARGET="win"
|
||||||
|
DIST_DIR="win_x64"
|
||||||
|
;;
|
||||||
|
*psp1*)
|
||||||
|
FORMAT_EXT="a"
|
||||||
|
FORMAT_COMPILER_TARGET="psp1"
|
||||||
|
DIST_DIR="psp1"
|
||||||
|
;;
|
||||||
|
*ios|theos_ios*)
|
||||||
|
FORMAT_EXT="dylib"
|
||||||
|
FORMAT_COMPILER_TARGET="theos_ios"
|
||||||
|
DIST_DIR="theos"
|
||||||
|
;;
|
||||||
|
android)
|
||||||
|
FORMAT_EXT="so"
|
||||||
|
FORMAT_COMPILER_TARGET="android"
|
||||||
|
DIST_DIR="android"
|
||||||
|
;;
|
||||||
|
*android-armv7*)
|
||||||
|
FORMAT_EXT="so"
|
||||||
|
FORMAT_COMPILER_TARGET="android-armv7"
|
||||||
|
DIST_DIR="android/armeabi-v7a"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
FORMAT_EXT="so"
|
||||||
|
FORMAT_COMPILER_TARGET="unix"
|
||||||
|
DIST_DIR="unix"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
export FORMAT_COMPILER_TARGET_ALT="$FORMAT_COMPILER_TARGET"
|
||||||
|
}
|
||||||
|
|
||||||
|
config_log_build_host() {
|
||||||
|
echo "PLATFORM: ${platform}"
|
||||||
|
echo "ARCHITECTURE: ${ARCH}"
|
||||||
|
echo "TARGET: ${FORMAT_COMPILER_TARGET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
config_cpu
|
||||||
|
config_platform
|
||||||
|
config_log_build_host
|
||||||
|
|
||||||
|
if [ -z "${JOBS}" ]; then
|
||||||
|
if command -v nproc >/dev/null; then
|
||||||
|
JOBS=`nproc`
|
||||||
|
else
|
||||||
|
JOBS=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#if uncommented, will fetch repos with read+write access. Useful for committers
|
||||||
|
#export WRITERIGHTS=1
|
||||||
|
|
||||||
|
|
||||||
|
#if uncommented, will build experimental cores as well which are not yet fit for release.
|
||||||
|
#export BUILD_EXPERIMENTAL=1
|
||||||
|
|
||||||
|
#ARM DEFINES
|
||||||
|
#===========
|
||||||
|
|
||||||
|
#if uncommented, will build cores with Cortex A8 compiler optimizations
|
||||||
|
#export CORTEX_A8=1
|
||||||
|
|
||||||
|
#if uncommented, will build cores with Cortex A9 compiler optimizations
|
||||||
|
#export CORTEX_A9=1
|
||||||
|
|
||||||
|
#if uncommented, will build cores with ARM hardfloat ABI
|
||||||
|
#export ARM_HARDFLOAT=1
|
||||||
|
|
||||||
|
#if uncommented, will build cores with ARM softfloat ABI
|
||||||
|
#export ARM_SOFTFLOAT=1
|
||||||
|
|
||||||
|
#if uncommented, will build cores with ARM NEON support (ARMv7+ only)
|
||||||
|
#export ARM_NEON=1
|
||||||
|
|
||||||
|
#OPENGL DEFINES
|
||||||
|
#==============
|
||||||
|
|
||||||
|
#if uncommented, will build libretro GL cores. Ignored for mobile platforms - GL cores will always be built there.
|
||||||
|
export BUILD_LIBRETRO_GL=1
|
||||||
|
|
||||||
|
#if uncommented, will build cores with OpenGL ES 2 support. Not needed
|
||||||
|
#for platform-specific cores - only for generic core builds (ie. libretro-build.sh)
|
||||||
|
#export ENABLE_GLES=1
|
||||||
|
|
||||||
|
#ANDROID DEFINES
|
||||||
|
#================
|
||||||
|
|
||||||
|
export TARGET_ABIS="armeabi armeabi-v7a x86"
|
||||||
|
|
||||||
|
#uncomment to define NDK standalone toolchain for ARM
|
||||||
|
#export NDK_ROOT_DIR_ARM =
|
||||||
|
|
||||||
|
#uncomment to define NDK standalone toolchain for MIPS
|
||||||
|
#export NDK_ROOT_DIR_MIPS =
|
||||||
|
|
||||||
|
#uncomment to define NDK standalone toolchain for x86
|
||||||
|
#export NDK_ROOT_DIR_X86 =
|
||||||
|
|
||||||
|
# android version target if GLES is in use
|
||||||
|
export NDK_GL_HEADER_VER=android-18
|
||||||
|
|
||||||
|
# android version target if GLES is not in use
|
||||||
|
export NDK_NO_GL_HEADER_VER=android-9
|
||||||
|
|
||||||
|
# Retroarch target android API level
|
||||||
|
export RA_ANDROID_API=android-18
|
||||||
|
|
||||||
|
# Retroarch minimum API level (defines low end android version compatability)
|
||||||
|
export RA_ANDROID_MIN_API=android-9
|
||||||
|
|
||||||
|
#OSX DEFINES
|
||||||
|
#===========
|
||||||
|
|
||||||
|
# Define this to skip the universal build
|
||||||
|
# export NOUNIVERSAL=1
|
||||||
|
|
||||||
|
# ARCHFLAGS is a very convenient way of doing this for simple/obvious cores
|
||||||
|
# that don't need anything defined on the command line for 32 vs 64 bit
|
||||||
|
# systems, however it won't work for anything that does. For that, you need
|
||||||
|
# to do two separate builds, one for each arch, and then do something like:
|
||||||
|
# lipo -create core_i386.dylib core_x86_64.dylib -output core_ub.dylib
|
||||||
|
#
|
||||||
|
# If building on 10.5/10.6, it's possible that you could actually build a UB
|
||||||
|
# for Intel/PowerPC, but please don't. ;) Consider this a proof of concept
|
||||||
|
# for now just to test a few cores.
|
||||||
|
|
||||||
|
if [[ "${FORMAT_COMPILER_TARGET}" = "osx" && -z "${NOUNIVERSAL}" ]]; then
|
||||||
|
case "${ARCH}" in
|
||||||
|
i385|x86_64)
|
||||||
|
export ARCHFLAGS="-arch i386 -arch x86_64"
|
||||||
|
;;
|
||||||
|
ppc|ppc64)
|
||||||
|
export ARCHFLAGS="-arch ppc -arch ppc64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Universal build requested with unknown ARCH=\"${ARCH}\""
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
#CORE BUILD SUMMARY
|
||||||
|
#==================
|
||||||
|
|
||||||
|
# Remove this to enable the core build summary
|
||||||
|
export BUILD_SUMMARY=1
|
||||||
|
|
||||||
|
BUILD_SUMMARY=${WORKDIR}/build-summary.log
|
||||||
|
BUILD_SUCCESS=${WORKDIR}/build-success.log
|
||||||
|
BUILD_FAIL=${WORKDIR}/build-fail.log
|
||||||
|
if [ -z "${BUILD_SUMMARY_FMT}" ]; then
|
||||||
|
if command -v column >/dev/null; then
|
||||||
|
BUILD_SUMMARY_FMT=column
|
||||||
|
else
|
||||||
|
BUILD_SUMMARY_FMT=cat
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#USER DEFINES
|
||||||
|
#------------
|
||||||
|
#These options should be defined inside your own
|
||||||
|
#local libretro-config-user.sh file rather than here.
|
||||||
|
#The following below is just a sample.
|
||||||
|
|
||||||
|
if [ -f "${WORKDIR}/libretro-config-user.sh" ]; then
|
||||||
|
. ${WORKDIR}/libretro-config-user.sh
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,458 @@
|
||||||
|
#! /bin/bash
|
||||||
|
# vi: sw=3 ts=3 et
|
||||||
|
|
||||||
|
# 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"`"
|
||||||
|
BASE_DIR="`dirname "${SCRIPT}"`"
|
||||||
|
|
||||||
|
. ${BASE_DIR}/libretro-config.sh
|
||||||
|
|
||||||
|
WORKDIR=$(pwd)
|
||||||
|
|
||||||
|
DATESTAMP_FMT="%Y-%m-%d_%H:%M:%S"
|
||||||
|
|
||||||
|
if [ -z $WRITERIGHTS ]; then
|
||||||
|
REPO_BASE="https://github.com"
|
||||||
|
else
|
||||||
|
REPO_BASE="git://github.com"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
log_verbose() {
|
||||||
|
if [ -n "${VERBOSE}" ]; then
|
||||||
|
echo "$(date -u +${DATESTAMP_FMT}):${@}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# fetch_git <repository> <local directory>
|
||||||
|
# Clones or pulls updates from a git repository into a local directory
|
||||||
|
fetch_git() {
|
||||||
|
fetch_dir="${WORKDIR}/${2}"
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
echo "=== Fetching ${3} ==="
|
||||||
|
fi
|
||||||
|
if [ -d "${fetch_dir}/.git" ]; then
|
||||||
|
log_verbose "${fetch_dir}:git pull"
|
||||||
|
cd "${fetch_dir}"
|
||||||
|
git pull
|
||||||
|
else
|
||||||
|
log_verbose "git clone \"${1}\" \"${fetch_dir}\""
|
||||||
|
git clone "${1}" "${fetch_dir}"
|
||||||
|
fi
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
echo "=== Fetched ==="
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# fetch_git_submodules <repository> <local directory>
|
||||||
|
# Clones or pulls updates from a git repository (and its submodules, if any)
|
||||||
|
# into a local directory
|
||||||
|
fetch_git_submodules() {
|
||||||
|
fetch_dir="${WORKDIR}/${2}"
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
echo "=== Fetching ${3} ==="
|
||||||
|
fi
|
||||||
|
if [ -d "${fetch_dir}/.git" ]; then
|
||||||
|
cd "${fetch_dir}"
|
||||||
|
log_verbose "${fetch_dir}:git pull"
|
||||||
|
git pull
|
||||||
|
log_verbose "${fetch_dir}:git submodule foreach git pull origin master"
|
||||||
|
git submodule foreach git pull origin master
|
||||||
|
else
|
||||||
|
log_verbose "git clone \"${1}\" \"${fetch_dir}\""
|
||||||
|
git clone "${1}" "${fetch_dir}"
|
||||||
|
cd "${fetch_dir}"
|
||||||
|
log_verbose "${fetch_dir}:git submodule update --init"
|
||||||
|
git submodule update --init
|
||||||
|
fi
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
echo "=== Fetched ==="
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# fetch_git_submodules_no_update <repository> <local directory>
|
||||||
|
# Clones a repository (and its submodules, if any) into a local directory,
|
||||||
|
# updates only the main repo on update.
|
||||||
|
#
|
||||||
|
# Basically if the core has a ton of external dependencies, you may not want
|
||||||
|
# them updated automatically
|
||||||
|
fetch_git_submodules_no_update() {
|
||||||
|
fetch_dir="${WORKDIR}/${2}"
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
echo "=== Fetching ${3} ==="
|
||||||
|
fi
|
||||||
|
if [ -d "${fetch_dir}/.git" ]; then
|
||||||
|
cd "${fetch_dir}"
|
||||||
|
log_verbose "${fetch_dir}:git pull"
|
||||||
|
git pull
|
||||||
|
else
|
||||||
|
log_verbose "git clone \"${1}\" \"${fetch_dir}\""
|
||||||
|
git clone "${1}" "${fetch_dir}"
|
||||||
|
cd "${fetch_dir}"
|
||||||
|
log_verbose "${fetch_dir}:git submodule update --init"
|
||||||
|
git submodule update --init
|
||||||
|
fi
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
echo "=== Fetched ==="
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep three copies so we don't have to rebuild stuff all the time.
|
||||||
|
fetch_project_bsnes()
|
||||||
|
{
|
||||||
|
echo "=== Fetching ${3} ==="
|
||||||
|
fetch_git "${1}" "${2}"
|
||||||
|
fetch_git "${WORKDIR}/${2}" "${2}/perf"
|
||||||
|
fetch_git "${WORKDIR}/${2}" "${2}/balanced"
|
||||||
|
echo "=== Fetched ==="
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fetch_retroarch() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/RetroArch.git" "retroarch" "libretro/RetroArch"
|
||||||
|
fetch_git "$REPO_BASE/libretro/common-shaders.git" "retroarch/media/shaders_cg" "libretro/common-shaders"
|
||||||
|
fetch_git "$REPO_BASE/libretro/common-overlays.git" "retroarch/media/overlays" "libretro/common-overlays"
|
||||||
|
fetch_git "$REPO_BASE/libretro/retroarch-assets.git" "retroarch/media/assets" "libretro/retroarch-assets"
|
||||||
|
fetch_git "$REPO_BASE/libretro/retroarch-joypad-autoconfig.git" "retroarch/media/autoconfig" "libretro/joypad-autoconfig"
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-database.git" "retroarch/media/libretrodb" "libretro/libretro-database"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_tools() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-manifest.git" "libretro-manifest" "libretro/libretro-manifest"
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretrodb.git" "libretrodb" "libretro/libretrodb"
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-dat-pull.git" "libretro-dat-pull" "libretro/libretro-dat-pull"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fetch_libretro_bsnes() {
|
||||||
|
fetch_project_bsnes "$REPO_BASE/libretro/bsnes-libretro.git" "libretro-bsnes" "libretro/bSNES"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_snes9x() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/snes9x.git" "libretro-snes9x" "libretro/SNES9x"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_snes9x_next() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/snes9x-next.git" "libretro-snes9x_next" "libretro/SNES9x-Next"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_genesis_plus_gx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/Genesis-Plus-GX.git" "libretro-genesis_plus_gx" "libretro/Genplus GX"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_fb_alpha() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/fba-libretro.git" "libretro-fb_alpha" "libretro/FBA"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_vba_next() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/vba-next.git" "libretro-vba_next" "libretro/VBA Next"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_vbam() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/vbam-libretro.git" "libretro-vbam" "libretro/VBA-M"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_handy() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-handy.git" "libretro-handy" "libretro/Handy"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_bnes() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/bnes-libretro.git" "libretro-bnes" "libretro/bNES"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_fceumm() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-fceumm.git" "libretro-fceumm" "libretro/FCEUmm"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_gambatte() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/gambatte-libretro.git" "libretro-gambatte" "libretro/Gambatte"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_meteor() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/meteor-libretro.git" "libretro-meteor" "libretro/Meteor"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_nxengine() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/nxengine-libretro.git" "libretro-nxengine" "libretro/NX"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_prboom() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-prboom.git" "libretro-prboom" "libretro/PRBoom"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_stella() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/stella-libretro.git" "libretro-stella" "libretro/Stella"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_desmume() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/desmume.git" "libretro-desmume" "libretro/Desmume"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_quicknes() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/QuickNES_Core.git" "libretro-quicknes" "libretro/QuickNES"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_nestopia() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/nestopia.git" "libretro-nestopia" "libretro/Nestopia"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_tyrquake() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/tyrquake.git" "libretro-tyrquake" "libretro/tyrquake"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_pcsx_rearmed() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/pcsx_rearmed.git" "libretro-pcsx_rearmed" "libretro/pcsx_rearmed"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_gba() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-gba-libretro.git" "libretro-mednafen_gba" "libretro/Beetle GBA"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_lynx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-lynx-libretro.git" "libretro-mednafen_lynx" "libretro/Beetle Lynx"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_ngp() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-ngp-libretro.git" "libretro-mednafen_ngp" "libretro/Beetle NGP"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_pce_fast() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-pce-fast-libretro.git" "libretro-mednafen_pce_fast" "libretro/Beetle PCE Fast"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_supergrafx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-supergrafx-libretro.git" "libretro-mednafen_supergrafx" "libretro/Beetle SuperGrafx"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_psx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/mednafen-psx-libretro.git" "libretro-mednafen_psx" "libretro/Mednafen PSX"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_pcfx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-pcfx-libretro.git" "libretro-mednafen_pcfx" "libretro/Beetle PCFX"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_snes() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-bsnes-libretro.git" "libretro-mednafen_snes" "libretro/Beetle bSNES"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_vb() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-vb-libretro.git" "libretro-mednafen_vb" "libretro/Beetle VB"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mednafen_wswan() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/beetle-wswan-libretro.git" "libretro-mednafen_wswan" "libretro/Beetle WSwan"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_scummvm() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/scummvm.git" "libretro-scummvm" "libretro/scummvm"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_yabause() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/yabause.git" "libretro-yabause" "libretro/yabause"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_dosbox() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/dosbox-libretro.git" "libretro-dosbox" "libretro/dosbox"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_virtualjaguar() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/virtualjaguar-libretro.git" "libretro-virtualjaguar" "libretro/virtualjaguar"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mame078() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/mame2003-libretro.git" "libretro-mame078" "libretro/mame078"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mame139() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/mame2010-libretro.git" "libretro-mame139" "libretro/mame139"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mame() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/mame.git" "libretro-mame" "libretro/mame"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_ffmpeg() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/FFmpeg.git" "libretro-ffmpeg" "libretro/FFmpeg"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_bsnes_cplusplus98() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/bsnes-libretro-cplusplus98.git" "libretro-bsnes_cplusplus98" "libretro/bsnes-cplusplus98"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_bsnes_mercury() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/bsnes-mercury.git" "libretro-bsnes_mercury" "libretro/bsnes-mercury"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_picodrive() {
|
||||||
|
fetch_git_submodules "$REPO_BASE/libretro/picodrive.git" "libretro-picodrive" "libretro/picodrive"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_tgbdual() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/tgbdual-libretro.git" "libretro-tgbdual" "libretro/tgbdual"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_mupen64plus() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/mupen64plus-libretro.git" "libretro-mupen64plus" "libretro/mupen64plus"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_dinothawr() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/Dinothawr.git" "libretro-dinothawr" "libretro/Dinothawr"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_uae() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-uae.git" "libretro-uae" "libretro/UAE"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_3dengine() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-3dengine.git" "libretro-3dengine" "libretro/3DEngine"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_remotejoy() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-remotejoy.git" "libretro-remotejoy" "libretro/RemoteJoy"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_bluemsx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/blueMSX-libretro.git" "libretro-bluemsx" "libretro/blueMSX"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_fmsx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/fmsx-libretro.git" "libretro-fmsx" "libretro/fmsx"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_2048() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-2048.git" "libretro-2048" "libretro/2048"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_vecx() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-vecx.git" "libretro-vecx" "libretro/vecx"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_ppsspp() {
|
||||||
|
fetch_git_submodules "$REPO_BASE/libretro/ppsspp.git" "libretro-ppsspp" "libretro/ppsspp"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_prosystem() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/prosystem-libretro.git" "libretro-prosystem" "libretro/prosystem"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_o2em() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/libretro-o2em.git" "libretro-o2em" "libretro/o2em"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_4do() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/4do-libretro.git" "libretro-4do" "libretro/4do"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_catsfc() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/CATSFC-libretro.git" "libretro-catsfc" "libretro/CATSFC"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_stonesoup() {
|
||||||
|
fetch_git_submodules_no_update "$REPO_BASE/libretro/crawl-ref.git" "libretro-stonesoup" "libretro/DungeonCrawler StoneSoup"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_hatari() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/hatari.git" "libretro-hatari" "libretro/hatari"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_tempgba() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/TempGBA-libretro.git" "libretro-tempgba" "libretro/TempGBA"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_gpsp() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/gpsp.git" "libretro-gpsp" "libretro/gpsp"
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_libretro_emux() {
|
||||||
|
fetch_git "$REPO_BASE/libretro/emux.git" "libretro-emux" "libretro/Emux"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
while [ -n "${1}" ]; do
|
||||||
|
"${1}"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
else
|
||||||
|
fetch_retroarch
|
||||||
|
fetch_tools
|
||||||
|
fetch_libretro_bsnes
|
||||||
|
fetch_libretro_snes9x
|
||||||
|
fetch_libretro_snes9x_next
|
||||||
|
fetch_libretro_genesis_plus_gx
|
||||||
|
fetch_libretro_fb_alpha
|
||||||
|
fetch_libretro_vba_next
|
||||||
|
fetch_libretro_vbam
|
||||||
|
fetch_libretro_handy
|
||||||
|
fetch_libretro_bnes
|
||||||
|
fetch_libretro_fceumm
|
||||||
|
fetch_libretro_gambatte
|
||||||
|
fetch_libretro_meteor
|
||||||
|
fetch_libretro_nxengine
|
||||||
|
fetch_libretro_prboom
|
||||||
|
fetch_libretro_stella
|
||||||
|
fetch_libretro_desmume
|
||||||
|
fetch_libretro_quicknes
|
||||||
|
fetch_libretro_nestopia
|
||||||
|
fetch_libretro_tyrquake
|
||||||
|
fetch_libretro_pcsx_rearmed
|
||||||
|
fetch_libretro_mednafen_gba
|
||||||
|
fetch_libretro_mednafen_lynx
|
||||||
|
fetch_libretro_mednafen_ngp
|
||||||
|
fetch_libretro_mednafen_pce_fast
|
||||||
|
fetch_libretro_mednafen_supergrafx
|
||||||
|
fetch_libretro_mednafen_psx
|
||||||
|
fetch_libretro_mednafen_pcfx
|
||||||
|
fetch_libretro_mednafen_snes
|
||||||
|
fetch_libretro_mednafen_vb
|
||||||
|
fetch_libretro_mednafen_wswan
|
||||||
|
fetch_libretro_scummvm
|
||||||
|
fetch_libretro_yabause
|
||||||
|
fetch_libretro_dosbox
|
||||||
|
fetch_libretro_virtualjaguar
|
||||||
|
fetch_libretro_mame078
|
||||||
|
fetch_libretro_mame139
|
||||||
|
fetch_libretro_mame
|
||||||
|
fetch_libretro_ffmpeg
|
||||||
|
fetch_libretro_bsnes_cplusplus98
|
||||||
|
fetch_libretro_bsnes_mercury
|
||||||
|
fetch_libretro_picodrive
|
||||||
|
fetch_libretro_tgbdual
|
||||||
|
fetch_libretro_mupen64plus
|
||||||
|
fetch_libretro_dinothawr
|
||||||
|
fetch_libretro_uae
|
||||||
|
fetch_libretro_3dengine
|
||||||
|
fetch_libretro_remotejoy
|
||||||
|
fetch_libretro_bluemsx
|
||||||
|
fetch_libretro_fmsx
|
||||||
|
fetch_libretro_2048
|
||||||
|
fetch_libretro_vecx
|
||||||
|
fetch_libretro_ppsspp
|
||||||
|
fetch_libretro_prosystem
|
||||||
|
fetch_libretro_o2em
|
||||||
|
fetch_libretro_4do
|
||||||
|
fetch_libretro_catsfc
|
||||||
|
fetch_libretro_stonesoup
|
||||||
|
fetch_libretro_hatari
|
||||||
|
fetch_libretro_tempgba
|
||||||
|
fetch_libretro_gpsp
|
||||||
|
fetch_libretro_emux
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ./libretro-config.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")
|
||||||
|
if [ -z "$RARCH_DIST_DIR" ]; then
|
||||||
|
RARCH_DIR="$BASE_DIR/dist"
|
||||||
|
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
echo $1
|
||||||
|
#exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$HOST_CC" ]; then
|
||||||
|
CC="${HOST_CC}-gcc"
|
||||||
|
CXX="${HOST_CC}-g++"
|
||||||
|
STRIP="${HOST_CC}-strip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$MAKE" ]; then
|
||||||
|
if [ "$(expr substr $(uname -s) 1 7)" = "MINGW32" ]; then
|
||||||
|
MAKE=mingw32-make
|
||||||
|
else
|
||||||
|
MAKE=make
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$CC" ]; then
|
||||||
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
||||||
|
CC=clang
|
||||||
|
elif [ "$(expr substr $(uname -s) 1 7)" = "MINGW32" ]; then
|
||||||
|
CC=mingw32-gcc
|
||||||
|
else
|
||||||
|
CC=gcc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$CXX" ]; then
|
||||||
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
||||||
|
CXX=clang++
|
||||||
|
elif [ "$(expr substr $(uname -s) 1 7)" = "MINGW32" ]; then
|
||||||
|
CXX=mingw32-g++
|
||||||
|
else
|
||||||
|
CXX=g++
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "CC = $CC"
|
||||||
|
echo "CXX = $CXX"
|
||||||
|
echo "STRIP = $STRIP"
|
||||||
|
|
||||||
|
mkdir -p "$RARCH_DIST_DIR"
|
||||||
|
|
||||||
|
export RARCHCFLAGS=""
|
||||||
|
|
||||||
|
check_deps()
|
||||||
|
{
|
||||||
|
if [ $ENABLE_GLES ]; then
|
||||||
|
echo "=== Enabling OpenGL ES ==="
|
||||||
|
export ENABLE_GLES="--enable-gles"
|
||||||
|
fi
|
||||||
|
if [ $ARM_NEON ]; then
|
||||||
|
echo "=== Enabling ARM NEON support ==="
|
||||||
|
export ENABLE_NEON="--enable-neon"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ARM_HARDFLOAT ]; then
|
||||||
|
echo "=== Enabling ARM Hard float ABI support ==="
|
||||||
|
export RARCHCFLAGS="${RARCHCFLAGS} -mfloat-abi=hard"
|
||||||
|
fi
|
||||||
|
if [ $ARM_SOFTFLOAT ]; then
|
||||||
|
echo "=== Enabling ARM Soft float ABI support ==="
|
||||||
|
export RARCHCFLAGS="${RARCHCFLAGS} -mfloat-abi=softfp"
|
||||||
|
fi
|
||||||
|
if [ "$CORTEX_A8" ]; then
|
||||||
|
echo "=== Enabling Cortex A8 CFLAGS ==="
|
||||||
|
export RARCHCFLAGS="${RARCHCFLAGS} -mcpu=cortex-a8 -mtune=cortex-a8"
|
||||||
|
fi
|
||||||
|
if [ "$CORTEX_A9" ]; then
|
||||||
|
echo "=== Enabling Cortex A9 CFLAGS ==="
|
||||||
|
export RARCHCFLAGS="${RARCHCFLAGS} -mcpu=cortex-a9 -mtune=cortex-a9"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ARM_NEON ]; then
|
||||||
|
echo "=== Enabling ARM NEON support (CFLAGS) ==="
|
||||||
|
export RARCHCFLAGS="${RARCHCFLAGS} -mfpu=neon"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
build_retroarch()
|
||||||
|
{
|
||||||
|
cd "$BASE_DIR"
|
||||||
|
pwd
|
||||||
|
if [ -d "retroarch" ]; then
|
||||||
|
echo "=== Building RetroArch ==="
|
||||||
|
cd retroarch
|
||||||
|
check_deps
|
||||||
|
|
||||||
|
if [ -z "${NOCLEAN}" ]; then
|
||||||
|
./configure $ENABLE_GLES $ENABLE_NEON
|
||||||
|
${MAKE} -f Makefile platform=${FORMAT_COMPILER_TARGET} CC="gcc ${RARCHCFLAGS}" $COMPILER -j$JOBS clean || die "Failed to clean RetroArch"
|
||||||
|
fi
|
||||||
|
${MAKE} -f Makefile platform=${FORMAT_COMPILER_TARGET} CC="gcc ${RARCHCFLAGS}" $COMPILER -j$JOBS || die "Failed to build RetroArch"
|
||||||
|
else
|
||||||
|
echo "RetroArch not fetched, skipping ..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $1 ]; then
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
build_retroarch
|
||||||
|
fi
|
Loading…
Reference in New Issue