From 498bc87f9a3492ee87d98b9ecef9422fd0712127 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Mon, 16 Feb 2015 19:19:30 -0800 Subject: [PATCH] Try to make whitespace consistently 3 space tabs in shell scripts, also use env for bash --- .gitignore | 1 + iKarith-libretro-build-common.sh | 470 +++---- iKarith-libretro-build.sh | 198 +-- iKarith-libretro-config.sh | 198 +-- iKarith-retroarch-build.sh | 134 +- libretro-build-android-mk.sh | 367 +++--- libretro-build-common-gx.sh | 10 +- libretro-build-common-xdk.sh | 92 +- libretro-build-common.sh | 750 +++++------ libretro-build-database.sh | 369 +++--- libretro-build-ios-theos.sh | 111 +- libretro-build-ios.sh | 111 +- libretro-build-ngc.sh | 51 +- libretro-build-ps3.sh | 53 +- libretro-build-psp1.sh | 71 +- libretro-build-qnx.sh | 107 +- libretro-build-wii.sh | 53 +- libretro-build-win.sh | 61 +- libretro-build-xdk1.sh | 131 +- libretro-build-xdk360.sh | 77 +- libretro-build.sh | 240 ++-- libretro-buildbot-recipe.sh | 2003 +++++++++++++++--------------- libretro-buildbot-task.sh | 1131 ++++++++--------- libretro-config.sh | 201 ++- libretro-header-update.sh | 67 +- libretro-install.sh | 47 +- retroarch-build.sh | 161 +-- 27 files changed, 3640 insertions(+), 3625 deletions(-) diff --git a/.gitignore b/.gitignore index fc1f612d..bff27ec1 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ /libretro-virtualjaguar/ /libretro-yabause/ /libretro-dat-pull/ +/libretro-sdk/ /libretrodb/ /retroarch/ /build-summary.log diff --git a/iKarith-libretro-build-common.sh b/iKarith-libretro-build-common.sh index 476ca6b5..c272231f 100755 --- a/iKarith-libretro-build-common.sh +++ b/iKarith-libretro-build-common.sh @@ -38,27 +38,27 @@ 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 + 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 + 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 ===' + echo '=== OpenGL disabled in build ===' fi } @@ -70,17 +70,17 @@ reset_compiler_targets() { build_libretro_pcsx_rearmed_interpreter() { build_dir="${WORKDIR}/libretro-pcsx_rearmed" if [ -d "${build_dir}" ]; then - echo '=== Building PCSX ReARMed Interpreter ===' - cd "${build_dir}" + echo '=== Building PCSX ReARMed Interpreter ===' + cd "${build_dir}" - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed' - fi - "${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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" + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed' + fi + "${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 ...' + echo 'PCSX ReARMed not fetched, skipping ...' fi } @@ -92,15 +92,15 @@ build_libretro_pcsx_rearmed_interpreter() { build_libretro_generic_makefile_subcore() { build_dir="${WORKDIR}/libretro-${1}" if [ -d "${build_dir}" ]; then - echo "=== Building ${2} ===" - cd "${build_dir}/${3}" + 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} + 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 } @@ -119,11 +119,11 @@ build_libretro_fba_cps1() { 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} + 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} + cp "${1}_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" + build_summary_log ${?} ${1} fi } @@ -134,19 +134,19 @@ copy_core_to_dist() { build_libretro_generic_makefile() { build_dir="${WORKDIR}/libretro-${1}" if [ -d "${build_dir}" ]; then - echo "=== Building ${1} ===" - cd "${build_dir}/${2}" + echo "=== Building ${1} ===" + cd "${build_dir}/${2}" - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die "Failed to build ${1}" - fi - echo "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" - "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die "Failed to build ${1}" - if [ -z "${5}" ]; then - copy_core_to_dist $1 - fi + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die "Failed to build ${1}" + fi + echo "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" + "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die "Failed to build ${1}" + if [ -z "${5}" ]; then + copy_core_to_dist $1 + fi else - echo "${1} not fetched, skipping ..." + echo "${1} not fetched, skipping ..." fi } @@ -372,141 +372,141 @@ build_libretro_ppsspp() { build_libretro_mame() { build_dir="${WORKDIR}/libretro-mame" if [ -d "${build_dir}" ]; then - echo '' - echo '=== Building MAME ===' - cd "${build_dir}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools' - "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME' - fi - cp "mame_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" + if [ "$IOS" ]; then + echo '=== Building MAME (iOS) ===' + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools' + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME' + fi + cp "mame_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" else - echo 'MAME not fetched, skipping ...' + 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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 ...' + if [ "$X86_64" = "true" ]; then + echo '=== Building MESS64 ===' + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 ...' + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 [ -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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + if [ "$X86_64" = "true" ]; then + echo '=== Building UME64 ===' + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 - "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 ...' + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 } @@ -517,18 +517,18 @@ rebuild_libretro_ume() { 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="$CXX11" 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 ..." + 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="$CXX11" 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 } @@ -548,35 +548,35 @@ build_libretro_bsnes_cplusplus98() { CORENAME="bsnes_cplusplus98" build_dir="${WORKDIR}/libretro-${CORENAME}" if [ -d "${build_dir}" ]; then - echo "=== Building ${CORENAME} ===" - cd ${build_dir} + echo "=== Building ${CORENAME} ===" + cd ${build_dir} - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" clean || die "Failed to clean ${CORENAME}" - fi - "${MAKE}" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 ..." + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" clean || die "Failed to clean ${CORENAME}" + fi + "${MAKE}" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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} + 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 CC="$CC" CXX="$CXX" "-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 ...' + mkdir -p obj + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f Makefile "-j${JOBS}" clean || die 'Failed to clean bNES' + fi + "${MAKE}" -f Makefile CC="$CC" CXX="$CXX" "-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 } @@ -584,68 +584,68 @@ build_libretro_mupen64() { check_opengl build_dir="${WORKDIR}/libretro-mupen64plus" if [ -d "${build_dir}" ]; then - cd "${build_dir}" + 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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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 ...' + 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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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} + 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..." + echo "Directory ${RARCH_DIST_DIR} already exists, skipping creation..." else - mkdir -p "${RARCH_DIST_DIR}" + mkdir -p "${RARCH_DIST_DIR}" fi } diff --git a/iKarith-libretro-build.sh b/iKarith-libretro-build.sh index b2c892c2..85be9c70 100755 --- a/iKarith-libretro-build.sh +++ b/iKarith-libretro-build.sh @@ -17,61 +17,61 @@ fi . ${BASE_DIR}/iKarith-libretro-config.sh if [ -z "$RARCH_DIST_DIR" ]; then - RARCH_DIR="${WORKDIR}/dist" - RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" + RARCH_DIR="${WORKDIR}/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" fi if [ -z "$JOBS" ]; then - JOBS=7 + JOBS=7 fi die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - CXX11="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" + 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 + 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 + 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 + 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 @@ -84,70 +84,70 @@ echo "STRIP = $STRIP" mkdir -p "$RARCH_DIST_DIR" if [ -n "${1}" ]; then - NOBUILD_SUMMARY=1 - while [ -n "${1}" ]; do - "${1}" - shift - done + 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 + 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 diff --git a/iKarith-libretro-config.sh b/iKarith-libretro-config.sh index 4981ed02..bdb59c4a 100755 --- a/iKarith-libretro-config.sh +++ b/iKarith-libretro-config.sh @@ -2,91 +2,91 @@ # 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 + [ -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" + [ -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}" + echo "PLATFORM: ${platform}" + echo "ARCHITECTURE: ${ARCH}" + echo "TARGET: ${FORMAT_COMPILER_TARGET}" } config_cpu @@ -94,11 +94,11 @@ config_platform config_log_build_host if [ -z "${JOBS}" ]; then - if command -v nproc >/dev/null; then - JOBS=`nproc` - else - JOBS=1 - fi + 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 @@ -179,16 +179,16 @@ export RA_ANDROID_MIN_API=android-9 # 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 + 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 @@ -201,11 +201,11 @@ 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 + if command -v column >/dev/null; then + BUILD_SUMMARY_FMT=column + else + BUILD_SUMMARY_FMT=cat + fi fi @@ -216,6 +216,6 @@ fi #The following below is just a sample. if [ -f "${WORKDIR}/libretro-config-user.sh" ]; then - . ${WORKDIR}/libretro-config-user.sh + . ${WORKDIR}/libretro-config-user.sh fi diff --git a/iKarith-retroarch-build.sh b/iKarith-retroarch-build.sh index 4aa91169..5d5671c5 100755 --- a/iKarith-retroarch-build.sh +++ b/iKarith-retroarch-build.sh @@ -17,48 +17,48 @@ fi . $BASE_DIR/iKarith-libretro-config.sh if [ -z "$RARCH_DIST_DIR" ]; then - RARCH_DIR="$BASE_DIR/dist" - RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" + RARCH_DIR="$BASE_DIR/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" fi die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" + 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 + 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 + 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 + elif [ "$(expr substr $(uname -s) 1 7)" = "MINGW32" ]; then + CXX=mingw32-g++ + else + CXX=g++ + fi fi echo "CC = $CC" @@ -71,59 +71,59 @@ 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 [ $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_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 + 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 + 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 + $1 else - build_retroarch + build_retroarch fi diff --git a/libretro-build-android-mk.sh b/libretro-build-android-mk.sh index c5f59800..4d3cb483 100755 --- a/libretro-build-android-mk.sh +++ b/libretro-build-android-mk.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash . ./libretro-config.sh @@ -8,20 +9,20 @@ IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" # BSDs don't have readlink -f read_link() { - TARGET_FILE="$1" - cd $(dirname "$TARGET_FILE") - TARGET_FILE=$(basename "$TARGET_FILE") + 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 + 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 + PHYS_DIR=$(pwd -P) + RESULT="$PHYS_DIR/$TARGET_FILE" + echo $RESULT } SCRIPT=$(read_link "$0") @@ -34,8 +35,8 @@ FORMAT_EXT=so die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } @@ -44,273 +45,273 @@ die() # $2 is subdir (if there's no subdir, put "." here) build_libretro_generic_makefile() { - cd $BASE_DIR - if [ -d "libretro-${1}" ]; then - echo "=== Building ${1} ===" - cd libretro-${1} - cd ${2} - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; then - ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${1}" - fi - ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${1}" - cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT} - done - else - echo "${1} not fetched, skipping ..." - fi + cd $BASE_DIR + if [ -d "libretro-${1}" ]; then + echo "=== Building ${1} ===" + cd libretro-${1} + cd ${2} + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; then + ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${1}" + fi + ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${1}" + cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT} + done + else + echo "${1} not fetched, skipping ..." + fi } build_libretro_2048() { - build_libretro_generic_makefile "2048" "jni" + build_libretro_generic_makefile "2048" "jni" } build_libretro_4do() { - build_libretro_generic_makefile "4do" "jni" + build_libretro_generic_makefile "4do" "jni" } build_libretro_bluemsx() { - build_libretro_generic_makefile "bluemsx" "jni" + build_libretro_generic_makefile "bluemsx" "jni" } build_libretro_fmsx() { - build_libretro_generic_makefile "fmsx" "jni" + build_libretro_generic_makefile "fmsx" "jni" } build_libretro_dosbox() { - build_libretro_generic_makefile "dosbox" "jni" + build_libretro_generic_makefile "dosbox" "jni" } build_libretro_stella() { - build_libretro_generic_makefile "stella" "jni" + build_libretro_generic_makefile "stella" "jni" } build_libretro_genesis_plus_gx() { - build_libretro_generic_makefile "genesis_plus_gx" "libretro/jni" + build_libretro_generic_makefile "genesis_plus_gx" "libretro/jni" } build_libretro_gpsp() { - build_libretro_generic_makefile "gpsp" "jni" + build_libretro_generic_makefile "gpsp" "jni" } build_libretro_vba_next() { - build_libretro_generic_makefile "vba_next" "libretro/jni" + build_libretro_generic_makefile "vba_next" "libretro/jni" } build_libretro_vbam() { - build_libretro_generic_makefile "vbam" "src/libretro/jni" + build_libretro_generic_makefile "vbam" "src/libretro/jni" } build_libretro_catsfc() { - build_libretro_generic_makefile "catsfc" "jni" + build_libretro_generic_makefile "catsfc" "jni" } build_libretro_prosystem() { - build_libretro_generic_makefile "prosystem" "jni" + build_libretro_generic_makefile "prosystem" "jni" } build_libretro_tgbdual() { - build_libretro_generic_makefile "tgbdual" "libretro/jni" + build_libretro_generic_makefile "tgbdual" "libretro/jni" } build_libretro_snes9x() { - build_libretro_generic_makefile "snes9x" "libretro/jni" + build_libretro_generic_makefile "snes9x" "libretro/jni" } build_libretro_snes9x_next() { - build_libretro_generic_makefile "snes9x_next" "libretro/jni" + build_libretro_generic_makefile "snes9x_next" "libretro/jni" } build_libretro_beetle_bsnes() { - build_libretro_generic_makefile "mednafen_snes" "jni" + build_libretro_generic_makefile "mednafen_snes" "jni" } build_libretro_beetle_lynx() { - build_libretro_generic_makefile "mednafen_lynx" "jni" + build_libretro_generic_makefile "mednafen_lynx" "jni" } build_libretro_beetle_gba() { - build_libretro_generic_makefile "mednafen_gba" "jni" + build_libretro_generic_makefile "mednafen_gba" "jni" } build_libretro_beetle_ngp() { - build_libretro_generic_makefile "mednafen_ngp" "jni" + build_libretro_generic_makefile "mednafen_ngp" "jni" } build_libretro_beetle_wswan() { - build_libretro_generic_makefile "mednafen_wswan" "jni" + build_libretro_generic_makefile "mednafen_wswan" "jni" } build_libretro_beetle_psx() { - build_libretro_generic_makefile "mednafen_psx" "jni" + build_libretro_generic_makefile "mednafen_psx" "jni" } build_libretro_beetle_pcfx() { - build_libretro_generic_makefile "mednafen_pcfx" "jni" + build_libretro_generic_makefile "mednafen_pcfx" "jni" } build_libretro_beetle_vb() { - build_libretro_generic_makefile "mednafen_vb" "jni" + build_libretro_generic_makefile "mednafen_vb" "jni" } build_libretro_beetle_pce_fast() { - build_libretro_generic_makefile "mednafen_pce_fast" "jni" + build_libretro_generic_makefile "mednafen_pce_fast" "jni" } build_libretro_beetle_supergrafx() { - build_libretro_generic_makefile "mednafen_supergrafx" "jni" + build_libretro_generic_makefile "mednafen_supergrafx" "jni" } build_libretro_nx() { - build_libretro_generic_makefile "nxengine" "jni" + build_libretro_generic_makefile "nxengine" "jni" } build_libretro_prboom() { - build_libretro_generic_makefile "prboom" "libretro/jni" + build_libretro_generic_makefile "prboom" "libretro/jni" } build_libretro_nestopia() { - build_libretro_generic_makefile "nestopia" "libretro/jni" + build_libretro_generic_makefile "nestopia" "libretro/jni" } build_libretro_tyrquake() { - build_libretro_generic_makefile "tyrquake" "libretro/jni" + build_libretro_generic_makefile "tyrquake" "libretro/jni" } build_libretro_pcsx_rearmed() { - build_libretro_generic_makefile "pcsx_rearmed" "jni" + build_libretro_generic_makefile "pcsx_rearmed" "jni" } build_libretro_ppsspp() { - build_libretro_generic_makefile "ppsspp" "libretro/jni" + build_libretro_generic_makefile "ppsspp" "libretro/jni" } build_libretro_picodrive() { - build_libretro_generic_makefile "picodrive" "jni" + build_libretro_generic_makefile "picodrive" "jni" } build_libretro_quicknes() { - build_libretro_generic_makefile "quicknes" "libretro/jni" + build_libretro_generic_makefile "quicknes" "libretro/jni" } build_libretro_handy() { - build_libretro_generic_makefile "handy" "libretro/jni" + build_libretro_generic_makefile "handy" "libretro/jni" } build_libretro_yabause() { - build_libretro_generic_makefile "yabause" "libretro/jni" + build_libretro_generic_makefile "yabause" "libretro/jni" } build_libretro_vecx() { - build_libretro_generic_makefile "vecx" "libretro/jni" + build_libretro_generic_makefile "vecx" "libretro/jni" } build_libretro_mupen64() { - build_libretro_generic_makefile "mupen64plus" "libretro/jni" + build_libretro_generic_makefile "mupen64plus" "libretro/jni" } build_libretro_3dengine() { - build_libretro_generic_makefile "3dengine" "jni" + build_libretro_generic_makefile "3dengine" "jni" } build_libretro_o2em() { - build_libretro_generic_makefile "o2em" "jni" + build_libretro_generic_makefile "o2em" "jni" } build_libretro_fceumm() { - build_libretro_generic_makefile "fceumm" "src/drivers/libretro/jni" + build_libretro_generic_makefile "fceumm" "src/drivers/libretro/jni" } build_libretro_gambatte() { - build_libretro_generic_makefile "gambatte" "libgambatte/libretro/jni" + build_libretro_generic_makefile "gambatte" "libgambatte/libretro/jni" } build_libretro_meteor() { - build_libretro_generic_makefile "meteor" "libretro/jni" + build_libretro_generic_makefile "meteor" "libretro/jni" } build_libretro_dinothawr() { - build_libretro_generic_makefile "dinothawr" "android/eclipse/jni" + build_libretro_generic_makefile "dinothawr" "android/eclipse/jni" } build_libretro_virtualjaguar() { - build_libretro_generic_makefile "virtualjaguar" "jni" + build_libretro_generic_makefile "virtualjaguar" "jni" } build_libretro_desmume() { - build_libretro_generic_makefile "desmume" "desmume/src/libretro/jni" + build_libretro_generic_makefile "desmume" "desmume/src/libretro/jni" } build_libretro_fb_alpha() { - build_libretro_generic_makefile "fb_alpha" "svn-current/trunk/projectfiles/libretro-android/jni" + build_libretro_generic_makefile "fb_alpha" "svn-current/trunk/projectfiles/libretro-android/jni" } create_dist_dir() { - if [ -d $RARCH_DIR ]; then - echo "Directory $RARCH_DIR already exists, skipping creation..." - else - mkdir $RARCH_DIR - fi + if [ -d $RARCH_DIR ]; then + echo "Directory $RARCH_DIR already exists, skipping creation..." + else + mkdir $RARCH_DIR + fi - if [ -d $RARCH_DIST_DIR ]; then - echo "Directory $RARCH_DIST_DIR already exists, skipping creation..." - else - mkdir $RARCH_DIST_DIR - fi - - for a in "${ABIS[@]}"; do - if [ -d $RARCH_DIST_DIR/${a} ]; then - echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." - else - mkdir $RARCH_DIST_DIR/${a} - fi - done + if [ -d $RARCH_DIST_DIR ]; then + echo "Directory $RARCH_DIST_DIR already exists, skipping creation..." + else + mkdir $RARCH_DIST_DIR + fi + + for a in "${ABIS[@]}"; do + if [ -d $RARCH_DIST_DIR/${a} ]; then + echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." + else + mkdir $RARCH_DIST_DIR/${a} + fi + done } build_libretro_bsnes() { - CORENAME="bsnes" - #TODO - maybe accuracy/balanced cores as well - cd $BASE_DIR - if [ -d "libretro-${CORENAME}" ]; then - echo "=== Building ${CORENAME} ===" - cd libretro-${CORENAME}/ - cd target-libretro/jni - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; then - ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}" - fi - ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}" - cp ../libs/${a}/libretro_${CORENAME}_performance.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_performance_libretro${FORMAT}.${FORMAT_EXT} - done - else - echo "${CORENAME} not fetched, skipping ..." - fi + CORENAME="bsnes" + #TODO - maybe accuracy/balanced cores as well + cd $BASE_DIR + if [ -d "libretro-${CORENAME}" ]; then + echo "=== Building ${CORENAME} ===" + cd libretro-${CORENAME}/ + cd target-libretro/jni + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; then + ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}" + fi + ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}" + cp ../libs/${a}/libretro_${CORENAME}_performance.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_performance_libretro${FORMAT}.${FORMAT_EXT} + done + else + echo "${CORENAME} not fetched, skipping ..." + fi } build_libretro_bsnes_mercury() { - CORENAME="bsnes" - #TODO - maybe accuracy/balanced cores as well - cd $BASE_DIR - if [ -d "libretro-${CORENAME}" ]; then - echo "=== Building ${CORENAME}-mercury ===" - cd libretro-${CORENAME}/ - cd target-libretro/jni - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; then - ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}" - fi - ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}" - cp ../libs/${a}/libretro_${CORENAME}_performance.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_mercury_performance_libretro${FORMAT}.${FORMAT_EXT} - done - else - echo "${CORENAME} not fetched, skipping ..." - fi + CORENAME="bsnes" + #TODO - maybe accuracy/balanced cores as well + cd $BASE_DIR + if [ -d "libretro-${CORENAME}" ]; then + echo "=== Building ${CORENAME}-mercury ===" + cd libretro-${CORENAME}/ + cd target-libretro/jni + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; then + ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}" + fi + ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}" + cp ../libs/${a}/libretro_${CORENAME}_performance.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_mercury_performance_libretro${FORMAT}.${FORMAT_EXT} + done + else + echo "${CORENAME} not fetched, skipping ..." + fi } @@ -318,60 +319,60 @@ build_libretro_bsnes_mercury() create_dist_dir if [ $1 ]; then - $1 + $1 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_bsnes - 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 - build_libretro_pcsx_rearmed - 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_gpsp + 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_bsnes + 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 + build_libretro_pcsx_rearmed + 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_gpsp fi diff --git a/libretro-build-common-gx.sh b/libretro-build-common-gx.sh index cbdbccfe..2aa136da 100644 --- a/libretro-build-common-gx.sh +++ b/libretro-build-common-gx.sh @@ -1,9 +1,9 @@ -#!/bin/bash +# vim: set ts=3 sw=3 noet ft=sh : bash build_libretro_fba() { - build_libretro_fb_alpha - build_libretro_fba_cps1 - build_libretro_generic_makefile_subcore "fb_alpha" "fba_cores_cps2" "svn-old/trunk/fbacores/cps2" "makefile.libretro" ${FORMAT_COMPILER_TARGET} - build_libretro_fba_neogeo + build_libretro_fb_alpha + build_libretro_fba_cps1 + build_libretro_generic_makefile_subcore "fb_alpha" "fba_cores_cps2" "svn-old/trunk/fbacores/cps2" "makefile.libretro" ${FORMAT_COMPILER_TARGET} + build_libretro_fba_neogeo } diff --git a/libretro-build-common-xdk.sh b/libretro-build-common-xdk.sh index 7d519c75..0f1cb5df 100644 --- a/libretro-build-common-xdk.sh +++ b/libretro-build-common-xdk.sh @@ -1,130 +1,130 @@ -#!/bin/bash +# vim: set ts=3 sw=3 noet ft=sh : bash die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } # $1 is corename # $2 subdir. If there is no subdir, input "." here # $3 build configuration - ie. release or release_ltcg build_libretro_generic_makefile() { - cd "$BASE_DIR" - if [ -d "libretro-${1}" ]; then - echo "=== Building ${1} ===" - cd libretro-${1} - cd ${2} - cd msvc - cmd.exe /k $MSVC_NAME.bat - cp $MSVC_NAME/${3}/${MSVC_NAME}.${FORMAT_EXT} "$RARCH_DIST_DIR"/${1}_libretro$FORMAT.$FORMAT_EXT - else - echo "${1} not fetched, skipping ..." - fi + cd "$BASE_DIR" + if [ -d "libretro-${1}" ]; then + echo "=== Building ${1} ===" + cd libretro-${1} + cd ${2} + cd msvc + cmd.exe /k $MSVC_NAME.bat + cp $MSVC_NAME/${3}/${MSVC_NAME}.${FORMAT_EXT} "$RARCH_DIST_DIR"/${1}_libretro$FORMAT.$FORMAT_EXT + else + echo "${1} not fetched, skipping ..." + fi } build_libretro_beetle_bsnes() { - build_libretro_generic_makefile "mednafen_snes" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_snes" "." $RELEASE_LTCG } build_libretro_beetle_lynx() { - build_libretro_generic_makefile "mednafen_lynx" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_lynx" "." $RELEASE_LTCG } build_libretro_beetle_wswan() { - build_libretro_generic_makefile "mednafen_wswan" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_wswan" "." $RELEASE_LTCG } build_libretro_beetle_gba() { - build_libretro_generic_makefile "mednafen_gba" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_gba" "." $RELEASE_LTCG } build_libretro_beetle_ngp() { - build_libretro_generic_makefile "mednafen_ngp" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_ngp" "." $RELEASE_LTCG } build_libretro_beetle_pce_fast() { - build_libretro_generic_makefile "mednafen_pce_fast" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_pce_fast" "." $RELEASE_LTCG } build_libretro_beetle_supergrafx() { - build_libretro_generic_makefile "mednafen_supergrafx" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_supergrafx" "." $RELEASE_LTCG } build_libretro_beetle_pcfx() { - build_libretro_generic_makefile "mednafen_pcfx" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_pcfx" "." $RELEASE_LTCG } build_libretro_beetle_vb() { - build_libretro_generic_makefile "mednafen_vb" "." $RELEASE_LTCG + build_libretro_generic_makefile "mednafen_vb" "." $RELEASE_LTCG } build_libretro_snes9x() { - build_libretro_generic_makefile "snes9x" "libretro" $RELEASE_LTCG + build_libretro_generic_makefile "snes9x" "libretro" $RELEASE_LTCG } build_libretro_s9x_next() { - build_libretro_generic_makefile "snes9x_next" "libretro" $RELEASE_LTCG + build_libretro_generic_makefile "snes9x_next" "libretro" $RELEASE_LTCG } build_libretro_genesis_plus_gx() { - build_libretro_generic_makefile "genesis_plus_gx" "libretro" $RELEASE_LTCG + build_libretro_generic_makefile "genesis_plus_gx" "libretro" $RELEASE_LTCG } build_libretro_vba_next() { - build_libretro_generic_makefile "genesis_plus_gx" "libretro" $RELEASE + build_libretro_generic_makefile "genesis_plus_gx" "libretro" $RELEASE } build_libretro_mame078() { - build_libretro_generic_makefile "mame078" "libretro" $RELEASE + build_libretro_generic_makefile "mame078" "libretro" $RELEASE } build_libretro_fceumm() { - build_libretro_generic_makefile "fceumm" "src/drivers/libretro" $RELEASE_LTCG + build_libretro_generic_makefile "fceumm" "src/drivers/libretro" $RELEASE_LTCG } build_libretro_gambatte() { - build_libretro_generic_makefile "gambatte" "libgambatte/libretro" $RELEASE_LTCG + build_libretro_generic_makefile "gambatte" "libgambatte/libretro" $RELEASE_LTCG } build_libretro_nx() { - build_libretro_generic_makefile "nxengine" "nxengine-1.0.0.4/libretro" $RELEASE_LTCG + build_libretro_generic_makefile "nxengine" "nxengine-1.0.0.4/libretro" $RELEASE_LTCG } build_libretro_prboom() { - build_libretro_generic_makefile "prboom" "libretro" $RELEASE_LTCG + build_libretro_generic_makefile "prboom" "libretro" $RELEASE_LTCG } build_libretro_stella() { - build_libretro_generic_makefile "stella" "." $RELEASE_LTCG + build_libretro_generic_makefile "stella" "." $RELEASE_LTCG } build_libretro_picodrive() { - build_libretro_generic_makefile "picodrive" "platform/libretro" $RELEASE_LTCG + build_libretro_generic_makefile "picodrive" "platform/libretro" $RELEASE_LTCG } build_libretro_nestopia() { - build_libretro_generic_makefile "nestopia" "libretro" $RELEASE_LTCG + build_libretro_generic_makefile "nestopia" "libretro" $RELEASE_LTCG } build_libretro_tyrquake() { - build_libretro_generic_makefile "tyrquake" "libretro" $RELEASE_LTCG + build_libretro_generic_makefile "tyrquake" "libretro" $RELEASE_LTCG } create_dist_dir() { - if [ -d $RARCH_DIR ]; then - echo "Directory $RARCH_DIR already exists, skipping creation..." - else - mkdir $RARCH_DIR - fi + if [ -d $RARCH_DIR ]; then + echo "Directory $RARCH_DIR already exists, skipping creation..." + else + mkdir $RARCH_DIR + fi - if [ -d $RARCH_DIST_DIR ]; then - echo "Directory $RARCH_DIST_DIR already exists, skipping creation..." - else - mkdir $RARCH_DIST_DIR - fi + if [ -d $RARCH_DIST_DIR ]; then + echo "Directory $RARCH_DIST_DIR already exists, skipping creation..." + else + mkdir $RARCH_DIST_DIR + fi } create_dist_dir diff --git a/libretro-build-common.sh b/libretro-build-common.sh index b9d47676..4c705048 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -1,8 +1,8 @@ -# vi: ts=3 sw=3 et ft=sh +# vim: set ts=3 sw=3 noet ft=sh : bash die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } # @@ -15,9 +15,9 @@ die() { # Basically, if you use this variable, you should stop. :) # if [ "${CC}" ] && [ "${CXX}" ]; then - COMPILER="CC=\"${CC}\" CXX=\"${CXX}\"" + COMPILER="CC=\"${CC}\" CXX=\"${CXX}\"" else - COMPILER="" + COMPILER="" fi echo "Compiler: CC=\"$CC\" CXX=\"$CXX\"" @@ -37,51 +37,51 @@ 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 + 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 + 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 + 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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed' - fi - "${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed' + fi + "${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 @@ -90,51 +90,51 @@ build_libretro_pcsx_rearmed_interpreter() { # $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}" + 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 + 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_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_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} + 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 + 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 } build_libretro_generic() { - cd "${5}/${2}" + cd "${5}/${2}" - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die "Failed to build ${1}" - fi - echo "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" - "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die "Failed to build ${1}" + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die "Failed to build ${1}" + fi + echo "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" + "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die "Failed to build ${1}" } # $1 is corename @@ -142,531 +142,531 @@ build_libretro_generic() { # $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} ===" - build_libretro_generic $1 $2 $3 $4 $build_dir - copy_core_to_dist $1 - else - echo "${1} not fetched, skipping ..." - fi + build_dir="${WORKDIR}/libretro-${1}" + if [ -d "$build_dir" ]; then + echo "=== Building ${1} ===" + build_libretro_generic $1 $2 $3 $4 $build_dir + copy_core_to_dist $1 + else + echo "${1} not fetched, skipping ..." + fi } build_retroarch_generic_makefile() { - build_dir="${WORKDIR}/${1}" - if [ -d "$build_dir" ]; then - echo "=== Building ${2} ===" - build_libretro_generic $1 $2 $3 $4 $build_dir - copy_core_to_dist $5 - else - echo "${1} not fetched, skipping ..." - fi + build_dir="${WORKDIR}/${1}" + if [ -d "$build_dir" ]; then + echo "=== Building ${2} ===" + build_libretro_generic $1 $2 $3 $4 $build_dir + copy_core_to_dist $5 + else + echo "${1} not fetched, skipping ..." + fi } build_libretro_stonesoup() { - build_libretro_generic_makefile "stonesoup" "crawl-ref" "Makefile.libretro" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "hatari" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_prosystem() { - build_libretro_generic_makefile "prosystem" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "prosystem" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_4do() { - build_libretro_generic_makefile "4do" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "4do" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_o2em() { - build_libretro_generic_makefile "o2em" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "o2em" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_virtualjaguar() { - build_libretro_generic_makefile "virtualjaguar" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "virtualjaguar" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_tgbdual() { - build_libretro_generic_makefile "tgbdual" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "tgbdual" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_nx() { - build_libretro_generic_makefile "nxengine" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "nxengine" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_catsfc() { - build_libretro_generic_makefile "catsfc" "." "Makefile" ${FORMAT_COMPILER_TARGET} + 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_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_test() { - build_retroarch_generic_makefile "retroarch" "libretro-test" "Makefile" ${FORMAT_COMPILER_TARGET} "test" + build_retroarch_generic_makefile "retroarch" "libretro-test" "Makefile" ${FORMAT_COMPILER_TARGET} "test" } build_libretro_testgl() { - build_retroarch_generic_makefile "retroarch" "libretro-test-gl" "Makefile" ${FORMAT_COMPILER_TARGET} "testgl" + build_retroarch_generic_makefile "retroarch" "libretro-test-gl" "Makefile" ${FORMAT_COMPILER_TARGET} "testgl" } build_libretro_picodrive() { - build_libretro_generic_makefile "picodrive" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "tyrquake" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_2048() { - build_libretro_generic_makefile "2048" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "vecx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_stella() { - build_libretro_generic_makefile "stella" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "stella" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_bluemsx() { - build_libretro_generic_makefile "bluemsx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "bluemsx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_handy() { - build_libretro_generic_makefile "handy" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "handy" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_fmsx() { - build_libretro_generic_makefile "fmsx" "." "Makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "fmsx" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_gpsp() { - build_libretro_generic_makefile "gpsp" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT} + 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_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_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_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_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_generic_makefile "genesis_plus_gx" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_mame078() { - build_libretro_generic_makefile "mame078" "." "makefile" ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile "mame078" "." "makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_prboom() { - build_libretro_generic_makefile "prboom" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT} + 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_generic_makefile "pcsx_rearmed" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_fceumm() { - build_libretro_generic_makefile "fceumm" "." "Makefile.libretro" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "mednafen_snes" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_beetle_lynx() { - build_libretro_generic_makefile "mednafen_lynx" "." "Makefile" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "mednafen_wswan" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_beetle_gba() { - build_libretro_generic_makefile "mednafen_gba" "." "Makefile" ${FORMAT_COMPILER_TARGET} + 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_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_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_generic_makefile "mednafen_vb" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_beetle_pcfx() { - build_libretro_generic_makefile "mednafen_pcfx" "." "Makefile" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "beetle_psx" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_mednafen_psx() { - build_libretro_generic_makefile "mednafen_psx" "." "Makefile" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "mednafen_supergrafx" "." "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_meteor() { - build_libretro_generic_makefile "meteor" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET} + 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_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_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_generic_makefile "yabause" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_desmume() { - build_libretro_generic_makefile "desmume" "desmume" "Makefile.libretro" ${FORMAT_COMPILER_TARGET} + 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_generic_makefile "snes9x" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET} } build_libretro_quicknes() { - build_libretro_generic_makefile "quicknes" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET} + 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_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_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 + 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 + 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_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 + 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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools' - "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME' - fi - cp "mame_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" - else - echo 'MAME not fetched, skipping ...' - fi + if [ "$IOS" ]; then + echo '=== Building MAME (iOS) ===' + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools' + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 + if [ "$X86_64" = "true" ]; then + echo '=== Building MESS64 ===' + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + if [ "$X86_64" = "true" ]; then + echo '=== Building UME64 ===' + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 - "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' - fi - "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 + 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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME' + fi + "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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 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="$CXX11" 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_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="$CXX11" 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" - build_libretro_bsnes_modern "bsnes" "balanced" "balanced" - build_libretro_bsnes_modern "bsnes" "." "accuracy" + build_libretro_bsnes_modern "bsnes" "perf" "performance" + build_libretro_bsnes_modern "bsnes" "balanced" "balanced" + build_libretro_bsnes_modern "bsnes" "." "accuracy" } build_libretro_bsnes_mercury() { - build_libretro_bsnes_modern "bsnes_mercury" "perf" "performance" - build_libretro_bsnes_modern "bsnes_mercury" "balanced" "balanced" - build_libretro_bsnes_modern "bsnes_mercury" "." "accuracy" + build_libretro_bsnes_modern "bsnes_mercury" "perf" "performance" + build_libretro_bsnes_modern "bsnes_mercury" "balanced" "balanced" + build_libretro_bsnes_modern "bsnes_mercury" "." "accuracy" } build_libretro_bsnes_cplusplus98() { - CORENAME="bsnes_cplusplus98" - build_dir="${WORKDIR}/libretro-${CORENAME}" - if [ -d "${build_dir}" ]; then - echo "=== Building ${CORENAME} ===" - cd ${build_dir} + 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}" CC="$CC" CXX="$CXX" "-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 + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" clean || die "Failed to clean ${CORENAME}" + fi + "${MAKE}" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-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} + 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 CC="$CC" CXX="$CXX" "-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 + mkdir -p obj + if [ -z "${NOCLEAN}" ]; then + "${MAKE}" -f Makefile "-j${JOBS}" clean || die 'Failed to clean bNES' + fi + "${MAKE}" -f Makefile CC="$CC" CXX="$CXX" "-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}" + 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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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 + 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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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}" CC="$CC" CXX="$CXX" "-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 + 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 + 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 diff --git a/libretro-build-database.sh b/libretro-build-database.sh index 37e9de3a..4f9d24c5 100755 --- a/libretro-build-database.sh +++ b/libretro-build-database.sh @@ -1,22 +1,23 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash # BSDs don't have readlink -f read_link() { - TARGET_FILE="$1" - cd $(dirname "$TARGET_FILE") - TARGET_FILE=$(basename "$TARGET_FILE") + 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 + 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 + PHYS_DIR=$(pwd -P) + RESULT="$PHYS_DIR/$TARGET_FILE" + echo $RESULT } SCRIPT=$(read_link "$0") @@ -30,212 +31,212 @@ LIBRETRODATABASE_META_DAT_DIR=${LIBRETRODATABASE_BASE_DIR}/metadat die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } echo $LIBRETRODB_BASE build_libretrodb() { - cd $BASE_DIR - if [ -d "$LIBRETRODB_BASE_DIR" ]; then - echo "=== Building libretrodb ===" - cd ${LIBRETRODB_BASE_DIR}/ + cd $BASE_DIR + if [ -d "$LIBRETRODB_BASE_DIR" ]; then + echo "=== Building libretrodb ===" + cd ${LIBRETRODB_BASE_DIR}/ - if [ -z "${NOCLEAN}" ]; then - make -j$JOBS clean || die "Failed to clean ${2}" - fi - make -j$JOBS || die "Failed to build ${2}" - fi + if [ -z "${NOCLEAN}" ]; then + make -j$JOBS clean || die "Failed to clean ${2}" + fi + make -j$JOBS || die "Failed to build ${2}" + fi } # $1 is name # $2 is match key build_libretro_database() { - cd $BASE_DIR - if [ -d "$LIBRETRODB_BASE_DIR" ]; then - DBFILE=${BASE_DIR}/${LIBRETRODB_BASE_DIR}/db.rdb - cd ${LIBRETRODB_BASE_DIR}/ - echo "=== Building ${1} ===" - COMMAND='${BASE_DIR}/${LIBRETRODB_BASE_DIR}/dat_converter ${DBFILE} "${2}"' + cd $BASE_DIR + if [ -d "$LIBRETRODB_BASE_DIR" ]; then + DBFILE=${BASE_DIR}/${LIBRETRODB_BASE_DIR}/db.rdb + cd ${LIBRETRODB_BASE_DIR}/ + echo "=== Building ${1} ===" + COMMAND='${BASE_DIR}/${LIBRETRODB_BASE_DIR}/dat_converter ${DBFILE} "${2}"' - #Check if main DAT is there - if [ -f "${LIBRETRODATABASE_DAT_DIR}/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_DAT_DIR}/${1}.dat"' - fi + #Check if main DAT is there + if [ -f "${LIBRETRODATABASE_DAT_DIR}/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_DAT_DIR}/${1}.dat"' + fi - #Check if meta DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/${1}.dat"' - fi + #Check if meta DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/${1}.dat"' + fi - #Check if meta analog DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/analog/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/analog/${1}.dat"' - fi + #Check if meta analog DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/analog/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/analog/${1}.dat"' + fi - #Check if meta barcode DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/barcode/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/barcode/${1}.dat"' - fi + #Check if meta barcode DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/barcode/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/barcode/${1}.dat"' + fi - #Check if meta BBFC DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/bbfc/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/bbfc/${1}.dat"' - fi + #Check if meta BBFC DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/bbfc/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/bbfc/${1}.dat"' + fi - #Check if meta developer DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/developer/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/developer/${1}.dat"' - fi + #Check if meta developer DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/developer/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/developer/${1}.dat"' + fi - #Check if meta ELSPA DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/elspa/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/elspa/${1}.dat"' - fi + #Check if meta ELSPA DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/elspa/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/elspa/${1}.dat"' + fi - #Check if meta ESRB DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/esrb/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/esrb/${1}.dat"' - fi + #Check if meta ESRB DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/esrb/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/esrb/${1}.dat"' + fi - #Check if meta franchise DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/franchise/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/franchise/${1}.dat"' - fi + #Check if meta franchise DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/franchise/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/franchise/${1}.dat"' + fi - #Check if meta Famitsu magazine DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/magazine/famitsu/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/magazine/famitsu/${1}.dat"' - fi + #Check if meta Famitsu magazine DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/magazine/famitsu/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/magazine/famitsu/${1}.dat"' + fi - #Check if meta Edge magazine DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge/${1}.dat"' - fi + #Check if meta Edge magazine DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge/${1}.dat"' + fi - #Check if meta Edge magazine review DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge_review/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge_review/${1}.dat"' - fi + #Check if meta Edge magazine review DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge_review/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/magazine/edge_review/${1}.dat"' + fi - #Check if meta maxusers DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/maxusers/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/maxusers/${1}.dat"' - fi + #Check if meta maxusers DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/maxusers/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/maxusers/${1}.dat"' + fi - #Check if meta origin DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/origin/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/origin/${1}.dat"' - fi + #Check if meta origin DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/origin/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/origin/${1}.dat"' + fi - #Check if meta publisher DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/publisher/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/publisher/${1}.dat"' - fi + #Check if meta publisher DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/publisher/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/publisher/${1}.dat"' + fi - #Check if meta releasemonth DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/releasemonth/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/releasemonth/${1}.dat"' - fi + #Check if meta releasemonth DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/releasemonth/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/releasemonth/${1}.dat"' + fi - #Check if meta releaseyear DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/releaseyear/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/releaseyear/${1}.dat"' - fi + #Check if meta releaseyear DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/releaseyear/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/releaseyear/${1}.dat"' + fi - #Check if meta rumble DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/rumble/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/rumble/${1}.dat"' - fi + #Check if meta rumble DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/rumble/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/rumble/${1}.dat"' + fi - #Check if meta serial DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/serial/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/serial/${1}.dat"' - fi + #Check if meta serial DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/serial/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/serial/${1}.dat"' + fi - #Check if meta enhancement HW DAT is there - if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/enhancement_hw/${1}.dat" ]; then - COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/enhancement_hw/${1}.dat"' - fi + #Check if meta enhancement HW DAT is there + if [ -f "${LIBRETRODATABASE_META_DAT_DIR}/enhancement_hw/${1}.dat" ]; then + COMMAND+=' "${LIBRETRODATABASE_META_DAT_DIR}/enhancement_hw/${1}.dat"' + fi - eval ${COMMAND} - if [ -f ${DBFILE} ]; then - mv ${DBFILE} "${RDB_DIR}/${1}.rdb" - fi - fi + eval ${COMMAND} + if [ -f ${DBFILE} ]; then + mv ${DBFILE} "${RDB_DIR}/${1}.rdb" + fi + fi } build_libretro_databases() { - build_libretro_database "ScummVM" "rom.sha1" - build_libretro_database "Nintendo - Super Nintendo Entertainment System" "rom.crc" - build_libretro_database "Sony - PlayStation" "rom.serial" - build_libretro_database "Atari - Jaguar" "rom.crc" - build_libretro_database "Nintendo - Nintendo 64" "rom.crc" - build_libretro_database "Nintendo - Virtual Boy" "rom.crc" - build_libretro_database "Atari - 5200" "rom.crc" - build_libretro_database "Atari - 7800" "rom.crc" - build_libretro_database "Atari - Lynx" "rom.crc" - build_libretro_database "Atari - ST" "rom.crc" - build_libretro_database "Bandai - WonderSwan" "rom.crc" - build_libretro_database "Bandai - WonderSwan Color" "rom.crc" - build_libretro_database "Casio - Loopy" "rom.crc" - build_libretro_database "Casio - PV-1000" "rom.crc" - build_libretro_database "Coleco - ColecoVision" "rom.crc" - build_libretro_database "Emerson - Arcadia 2001" "rom.crc" - build_libretro_database "Entex - Adventure Vision" "rom.crc" - build_libretro_database "Epoch - Super Cassette Vision" "rom.crc" - build_libretro_database "Fairchild - Channel F" "rom.crc" - build_libretro_database "Funtech - Super Acan" "rom.crc" - build_libretro_database "GamePark - GP32" "rom.crc" - build_libretro_database "GCE - Vectrex" "rom.crc" - build_libretro_database "Hartung - Game Master" "rom.crc" - build_libretro_database "LeapFrog - Leapster Learning Game System" "rom.crc" - build_libretro_database "Magnavox - Odyssey2" "rom.crc" - build_libretro_database "Microsoft - MSX" "rom.crc" - build_libretro_database "Microsoft - MSX 2" "rom.crc" - build_libretro_database "NEC - PC Engine - TurboGrafx 16" "rom.crc" - build_libretro_database "NEC - Super Grafx" "rom.crc" - build_libretro_database "Nintendo - Famicom Disk System" "rom.crc" - build_libretro_database "Nintendo - Game Boy" "rom.crc" - build_libretro_database "Nintendo - Game Boy Advance" "rom.crc" - build_libretro_database "Nintendo - Game Boy Advance (e-Cards)" "rom.crc" - build_libretro_database "Nintendo - Game Boy Color" "rom.crc" - build_libretro_database "Nintendo - Nintendo 3DS" "rom.crc" - build_libretro_database "Nintendo - Nintendo 3DS (DLC)" "rom.crc" - build_libretro_database "Nintendo - Nintendo DS Decrypted" "rom.crc" - build_libretro_database "Nintendo - Nintendo DS (Download Play) (BETA)" "rom.crc" - build_libretro_database "Nintendo - Nintendo DSi Decrypted" "rom.crc" - build_libretro_database "Nintendo - Nintendo DSi (DLC)" "rom.crc" - build_libretro_database "Nintendo - Nintendo Entertainment System" "rom.crc" - build_libretro_database "Nintendo - Nintendo Wii (DLC)" "rom.crc" - build_libretro_database "Nintendo - Pokemon Mini" "rom.crc" - build_libretro_database "Nintendo - Satellaview" "rom.crc" - build_libretro_database "Nintendo - Sufami Turbo" "rom.crc" - build_libretro_database "Philips - Videopac+" "rom.crc" - build_libretro_database "RCA - Studio II" "rom.crc" - build_libretro_database "Sega - 32X" "rom.crc" - build_libretro_database "Sega - Game Gear" "rom.crc" - build_libretro_database "Sega - Master System - Mark III" "rom.crc" - build_libretro_database "Sega - Mega Drive - Genesis" "rom.crc" - build_libretro_database "Sega - PICO" "rom.crc" - build_libretro_database "Sega - SG-1000" "rom.crc" - build_libretro_database "Sinclair - ZX Spectrum +3" "rom.crc" - build_libretro_database "SNK - Neo Geo Pocket" "rom.crc" - build_libretro_database "SNK - Neo Geo Pocket Color" "rom.crc" - build_libretro_database "Sony - PlayStation 3 (DLC)" "rom.crc" - build_libretro_database "Sony - PlayStation 3 (Downloadable)" "rom.crc" - build_libretro_database "Sony - PlayStation 3 (PSN)" "rom.crc" - build_libretro_database "Sony - PlayStation Portable" "rom.serial" - build_libretro_database "Sony - PlayStation Portable (DLC)" "rom.crc" - build_libretro_database "Sony - PlayStation Portable (PSX2PSP)" "rom.crc" - build_libretro_database "Sony - PlayStation Portable (UMD Music)" "rom.crc" - build_libretro_database "Sony - PlayStation Portable (UMD Video)" "rom.crc" - build_libretro_database "Tiger - Game.com" "rom.crc" - build_libretro_database "VTech - CreatiVision" "rom.crc" - build_libretro_database "VTech - V.Smile" "rom.crc" - build_libretro_database "Watara - Supervision" "rom.crc" - build_libretro_database "MAME" "rom.name" + build_libretro_database "ScummVM" "rom.sha1" + build_libretro_database "Nintendo - Super Nintendo Entertainment System" "rom.crc" + build_libretro_database "Sony - PlayStation" "rom.serial" + build_libretro_database "Atari - Jaguar" "rom.crc" + build_libretro_database "Nintendo - Nintendo 64" "rom.crc" + build_libretro_database "Nintendo - Virtual Boy" "rom.crc" + build_libretro_database "Atari - 5200" "rom.crc" + build_libretro_database "Atari - 7800" "rom.crc" + build_libretro_database "Atari - Lynx" "rom.crc" + build_libretro_database "Atari - ST" "rom.crc" + build_libretro_database "Bandai - WonderSwan" "rom.crc" + build_libretro_database "Bandai - WonderSwan Color" "rom.crc" + build_libretro_database "Casio - Loopy" "rom.crc" + build_libretro_database "Casio - PV-1000" "rom.crc" + build_libretro_database "Coleco - ColecoVision" "rom.crc" + build_libretro_database "Emerson - Arcadia 2001" "rom.crc" + build_libretro_database "Entex - Adventure Vision" "rom.crc" + build_libretro_database "Epoch - Super Cassette Vision" "rom.crc" + build_libretro_database "Fairchild - Channel F" "rom.crc" + build_libretro_database "Funtech - Super Acan" "rom.crc" + build_libretro_database "GamePark - GP32" "rom.crc" + build_libretro_database "GCE - Vectrex" "rom.crc" + build_libretro_database "Hartung - Game Master" "rom.crc" + build_libretro_database "LeapFrog - Leapster Learning Game System" "rom.crc" + build_libretro_database "Magnavox - Odyssey2" "rom.crc" + build_libretro_database "Microsoft - MSX" "rom.crc" + build_libretro_database "Microsoft - MSX 2" "rom.crc" + build_libretro_database "NEC - PC Engine - TurboGrafx 16" "rom.crc" + build_libretro_database "NEC - Super Grafx" "rom.crc" + build_libretro_database "Nintendo - Famicom Disk System" "rom.crc" + build_libretro_database "Nintendo - Game Boy" "rom.crc" + build_libretro_database "Nintendo - Game Boy Advance" "rom.crc" + build_libretro_database "Nintendo - Game Boy Advance (e-Cards)" "rom.crc" + build_libretro_database "Nintendo - Game Boy Color" "rom.crc" + build_libretro_database "Nintendo - Nintendo 3DS" "rom.crc" + build_libretro_database "Nintendo - Nintendo 3DS (DLC)" "rom.crc" + build_libretro_database "Nintendo - Nintendo DS Decrypted" "rom.crc" + build_libretro_database "Nintendo - Nintendo DS (Download Play) (BETA)" "rom.crc" + build_libretro_database "Nintendo - Nintendo DSi Decrypted" "rom.crc" + build_libretro_database "Nintendo - Nintendo DSi (DLC)" "rom.crc" + build_libretro_database "Nintendo - Nintendo Entertainment System" "rom.crc" + build_libretro_database "Nintendo - Nintendo Wii (DLC)" "rom.crc" + build_libretro_database "Nintendo - Pokemon Mini" "rom.crc" + build_libretro_database "Nintendo - Satellaview" "rom.crc" + build_libretro_database "Nintendo - Sufami Turbo" "rom.crc" + build_libretro_database "Philips - Videopac+" "rom.crc" + build_libretro_database "RCA - Studio II" "rom.crc" + build_libretro_database "Sega - 32X" "rom.crc" + build_libretro_database "Sega - Game Gear" "rom.crc" + build_libretro_database "Sega - Master System - Mark III" "rom.crc" + build_libretro_database "Sega - Mega Drive - Genesis" "rom.crc" + build_libretro_database "Sega - PICO" "rom.crc" + build_libretro_database "Sega - SG-1000" "rom.crc" + build_libretro_database "Sinclair - ZX Spectrum +3" "rom.crc" + build_libretro_database "SNK - Neo Geo Pocket" "rom.crc" + build_libretro_database "SNK - Neo Geo Pocket Color" "rom.crc" + build_libretro_database "Sony - PlayStation 3 (DLC)" "rom.crc" + build_libretro_database "Sony - PlayStation 3 (Downloadable)" "rom.crc" + build_libretro_database "Sony - PlayStation 3 (PSN)" "rom.crc" + build_libretro_database "Sony - PlayStation Portable" "rom.serial" + build_libretro_database "Sony - PlayStation Portable (DLC)" "rom.crc" + build_libretro_database "Sony - PlayStation Portable (PSX2PSP)" "rom.crc" + build_libretro_database "Sony - PlayStation Portable (UMD Music)" "rom.crc" + build_libretro_database "Sony - PlayStation Portable (UMD Video)" "rom.crc" + build_libretro_database "Tiger - Game.com" "rom.crc" + build_libretro_database "VTech - CreatiVision" "rom.crc" + build_libretro_database "VTech - V.Smile" "rom.crc" + build_libretro_database "Watara - Supervision" "rom.crc" + build_libretro_database "MAME" "rom.name" } build_libretrodb diff --git a/libretro-build-ios-theos.sh b/libretro-build-ios-theos.sh index 0ebe7759..d8890187 100755 --- a/libretro-build-ios-theos.sh +++ b/libretro-build-ios-theos.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash set -e @@ -17,59 +18,59 @@ IOS=1 . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - build_libretro_2048 - build_libretro_bluemsx - build_libretro_fmsx - #build_libretro_bsnes_cplusplus98 - #build_libretro_bsnes - #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_bsnes - 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_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 - #build_libretro_pcsx_rearmed - #build_libretro_pcsx_rearmed_interpreter - #build_libretro_mupen64 - #build_libretro_yabause - #build_libretro_ffmpeg - build_libretro_3dengine - build_libretro_vecx - build_libretro_tgbdual - build_libretro_prosystem - #build_libretro_dinothawr - build_libretro_virtualjaguar - build_libretro_o2em - build_libretro_4do - build_libretro_gpsp - #build_libretro_emux + build_libretro_2048 + build_libretro_bluemsx + build_libretro_fmsx + #build_libretro_bsnes_cplusplus98 + #build_libretro_bsnes + #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_bsnes + 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_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 + #build_libretro_pcsx_rearmed + #build_libretro_pcsx_rearmed_interpreter + #build_libretro_mupen64 + #build_libretro_yabause + #build_libretro_ffmpeg + build_libretro_3dengine + build_libretro_vecx + build_libretro_tgbdual + build_libretro_prosystem + #build_libretro_dinothawr + build_libretro_virtualjaguar + build_libretro_o2em + build_libretro_4do + build_libretro_gpsp + #build_libretro_emux fi diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index 2b53702b..812a1f56 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash set -e @@ -26,59 +27,59 @@ export IOSSDK . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - build_libretro_2048 - build_libretro_bluemsx - build_libretro_fmsx - build_libretro_bsnes_cplusplus98 - build_libretro_bsnes - 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_bsnes - 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_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 - build_libretro_pcsx_rearmed - build_libretro_pcsx_rearmed_interpreter - build_libretro_mupen64 - build_libretro_yabause - #build_libretro_ffmpeg - build_libretro_3dengine - build_libretro_vecx - build_libretro_tgbdual - build_libretro_prosystem - build_libretro_dinothawr - build_libretro_virtualjaguar - build_libretro_o2em - build_libretro_4do - build_libretro_gpsp - build_libretro_emux + build_libretro_2048 + build_libretro_bluemsx + build_libretro_fmsx + build_libretro_bsnes_cplusplus98 + build_libretro_bsnes + 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_bsnes + 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_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 + build_libretro_pcsx_rearmed + build_libretro_pcsx_rearmed_interpreter + build_libretro_mupen64 + build_libretro_yabause + #build_libretro_ffmpeg + build_libretro_3dengine + build_libretro_vecx + build_libretro_tgbdual + build_libretro_prosystem + build_libretro_dinothawr + build_libretro_virtualjaguar + build_libretro_o2em + build_libretro_4do + build_libretro_gpsp + build_libretro_emux fi diff --git a/libretro-build-ngc.sh b/libretro-build-ngc.sh index 18fd0fb3..2bef8a62 100755 --- a/libretro-build-ngc.sh +++ b/libretro-build-ngc.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash SCRIPT=$(readlink -f $0) BASE_DIR=$(dirname $SCRIPT) @@ -15,29 +16,29 @@ MAKE=make . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - build_libretro_bluemsx - build_libretro_fmsx - 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_beetle_bsnes - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - build_libretro_fba - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - #build_libretro_yabause + build_libretro_bluemsx + build_libretro_fmsx + 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_beetle_bsnes + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + build_libretro_fba + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + build_libretro_quicknes + build_libretro_nestopia + build_libretro_tyrquake + #build_libretro_yabause fi diff --git a/libretro-build-ps3.sh b/libretro-build-ps3.sh index 50ad683d..8f387145 100755 --- a/libretro-build-ps3.sh +++ b/libretro-build-ps3.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash SCRIPT=$(readlink -f $0) BASE_DIR=$(dirname $SCRIPT) @@ -14,30 +15,30 @@ MAKE=make . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - 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_bsnes - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - build_libretro_fb_alpha - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - build_libretro_stella - build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - build_libretro_mame078 - build_libretro_handy + 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_bsnes + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + build_libretro_fb_alpha + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + build_libretro_stella + build_libretro_quicknes + build_libretro_nestopia + build_libretro_tyrquake + build_libretro_mame078 + build_libretro_handy fi diff --git a/libretro-build-psp1.sh b/libretro-build-psp1.sh index ec3356a6..88c8b607 100755 --- a/libretro-build-psp1.sh +++ b/libretro-build-psp1.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash SCRIPT=$(readlink -f $0) BASE_DIR=$(dirname $SCRIPT) @@ -14,39 +15,39 @@ MAKE=make . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - build_libretro_2048 - build_libretro_bluemsx - build_libretro_fmsx - 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_beetle_bsnes - build_libretro_mednafen - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - #build_libretro_fba_full - build_libretro_fba_cps2 - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - build_libretro_stella - build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - #build_libretro_mame078 - build_libretro_picodrive - build_libretro_handy - build_libretro_vecx - build_libretro_tgbdual - build_libretro_prosystem - build_libretro_o2em + build_libretro_2048 + build_libretro_bluemsx + build_libretro_fmsx + 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_beetle_bsnes + build_libretro_mednafen + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + #build_libretro_fba_full + build_libretro_fba_cps2 + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + build_libretro_stella + build_libretro_quicknes + build_libretro_nestopia + build_libretro_tyrquake + #build_libretro_mame078 + build_libretro_picodrive + build_libretro_handy + build_libretro_vecx + build_libretro_tgbdual + build_libretro_prosystem + build_libretro_o2em fi diff --git a/libretro-build-qnx.sh b/libretro-build-qnx.sh index 23739ad9..f994239f 100755 --- a/libretro-build-qnx.sh +++ b/libretro-build-qnx.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash SCRIPT=$(readlink -f $0) BASE_DIR=$(dirname $SCRIPT) @@ -14,57 +15,57 @@ MAKE=make . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - build_libretro_2048 - build_libretro_bluemsx - build_libretro_fmsx - build_libretro_bsnes_cplusplus98 - #build_libretro_bsnes - build_libretro_beetle_lynx - build_libretro_beetle_gba - 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 - build_libretro_pcsx_rearmed - build_libretro_mupen64 - #build_libretro_yabause - #build_libretro_ffmpeg - #build_libretro_dinothawr - build_libretro_3dengine - build_libretro_vecx - build_libretro_tgbdual - build_libretro_prosystem - build_libretro_virtualjaguar - build_libretro_o2em - build_libretro_4do - build_libretro_gpsp + build_libretro_2048 + build_libretro_bluemsx + build_libretro_fmsx + build_libretro_bsnes_cplusplus98 + #build_libretro_bsnes + build_libretro_beetle_lynx + build_libretro_beetle_gba + 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 + build_libretro_pcsx_rearmed + build_libretro_mupen64 + #build_libretro_yabause + #build_libretro_ffmpeg + #build_libretro_dinothawr + build_libretro_3dengine + build_libretro_vecx + build_libretro_tgbdual + build_libretro_prosystem + build_libretro_virtualjaguar + build_libretro_o2em + build_libretro_4do + build_libretro_gpsp fi diff --git a/libretro-build-wii.sh b/libretro-build-wii.sh index 78d7366d..73d16a87 100755 --- a/libretro-build-wii.sh +++ b/libretro-build-wii.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash SCRIPT=$(readlink -f $0) BASE_DIR=$(dirname $SCRIPT) @@ -15,30 +16,30 @@ MAKE=make . ./libretro-build-common.sh if [ $1 ]; then - $1 + $1 else - build_libretro_bluemsx - build_libretro_fmsx - 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_psx - build_libretro_beetle_vb - build_libretro_beetle_wswan - build_libretro_beetle_bsnes - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - build_libretro_fba - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - #build_libretro_yabause + build_libretro_bluemsx + build_libretro_fmsx + 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_psx + build_libretro_beetle_vb + build_libretro_beetle_wswan + build_libretro_beetle_bsnes + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + build_libretro_fba + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + build_libretro_quicknes + build_libretro_nestopia + build_libretro_tyrquake + #build_libretro_yabause fi diff --git a/libretro-build-win.sh b/libretro-build-win.sh index eef8c2a8..28306113 100644 --- a/libretro-build-win.sh +++ b/libretro-build-win.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash BASE_DIR=$(pwd) RARCH_DIR=$BASE_DIR/dist @@ -11,39 +12,39 @@ RELEASE=Release die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } source $BASE_DIR/libretro-build-common-xdk.sh if [ $1 ]; then - $1 + $1 else - #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_mednafen_psx - build_libretro_beetle_vb - build_libretro_beetle_wswan - #build_libretro_beetle_bsnes - build_libretro_snes9x - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - #build_libretro_fb_alpha - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - build_libretro_stella - #build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - build_libretro_mame078 - build_libretro_picodrive - #build_libretro_handy + #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_mednafen_psx + build_libretro_beetle_vb + build_libretro_beetle_wswan + #build_libretro_beetle_bsnes + build_libretro_snes9x + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + #build_libretro_fb_alpha + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + build_libretro_stella + #build_libretro_quicknes + build_libretro_nestopia + build_libretro_tyrquake + build_libretro_mame078 + build_libretro_picodrive + #build_libretro_handy fi diff --git a/libretro-build-xdk1.sh b/libretro-build-xdk1.sh index c11b7b31..d2269773 100644 --- a/libretro-build-xdk1.sh +++ b/libretro-build-xdk1.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash BASE_DIR=$(pwd) RARCH_DIR=$BASE_DIR/dist @@ -11,92 +12,92 @@ RELEASE=Release die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } build_libretro_fba_cps1() { - cd $BASE_DIR - if [ -d "libretro-fba" ]; then - echo "=== Building Final Burn Alpha Cores (CPS1) ===" - cd libretro-fba/ - cd svn-current/trunk - cd fbacores/cps1/projectfiles/visualstudio-2003-libretro-xbox1 - cmd.exe /k $MSVC_NAME.bat - cp $RELEASE_LTCG/fb_alpha_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/fba_cores_cps1_libretro$FORMAT.${FORMAT_EXT} - fi + cd $BASE_DIR + if [ -d "libretro-fba" ]; then + echo "=== Building Final Burn Alpha Cores (CPS1) ===" + cd libretro-fba/ + cd svn-current/trunk + cd fbacores/cps1/projectfiles/visualstudio-2003-libretro-xbox1 + cmd.exe /k $MSVC_NAME.bat + cp $RELEASE_LTCG/fb_alpha_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/fba_cores_cps1_libretro$FORMAT.${FORMAT_EXT} + fi } build_libretro_fba_cps2() { - cd $BASE_DIR - if [ -d "libretro-fba" ]; then - echo "=== Building Final Burn Alpha Cores (CPS2) ===" - cd libretro-fba/ - cd svn-old/trunk - cd fbacores/cps2/projectfiles/visualstudio-2003-libretro-xbox1 - cmd.exe /k $MSVC_NAME.bat - cp $RELEASE_LTCG/libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/fba_cores_cps2_libretro$FORMAT.${FORMAT_EXT} - fi + cd $BASE_DIR + if [ -d "libretro-fba" ]; then + echo "=== Building Final Burn Alpha Cores (CPS2) ===" + cd libretro-fba/ + cd svn-old/trunk + cd fbacores/cps2/projectfiles/visualstudio-2003-libretro-xbox1 + cmd.exe /k $MSVC_NAME.bat + cp $RELEASE_LTCG/libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/fba_cores_cps2_libretro$FORMAT.${FORMAT_EXT} + fi } build_libretro_fba_neogeo() { - cd $BASE_DIR - if [ -d "libretro-fba" ]; then - echo "=== Building Final Burn Alpha Cores (NeoGeo) ===" - cd libretro-fba/ - cd svn-current/trunk - cd fbacores/neogeo/projectfiles/visualstudio-2003-libretro-xbox1 - cmd.exe /k $MSVC_NAME.bat - cp $RELEASE_LTCG/libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/fba_cores_neo_libretro$FORMAT.${FORMAT_EXT} - fi + cd $BASE_DIR + if [ -d "libretro-fba" ]; then + echo "=== Building Final Burn Alpha Cores (NeoGeo) ===" + cd libretro-fba/ + cd svn-current/trunk + cd fbacores/neogeo/projectfiles/visualstudio-2003-libretro-xbox1 + cmd.exe /k $MSVC_NAME.bat + cp $RELEASE_LTCG/libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/fba_cores_neo_libretro$FORMAT.${FORMAT_EXT} + fi } build_libretro_fba() { - cd $BASE_DIR - if [ -d "libretro-fba" ]; then - echo "=== Building Final Burn Alpha ===" - cd libretro-fba/ - cd svn-current/trunk - cd projectfiles/visualstudio-2003-libretro-xbox1 - cmd.exe /k $MSVC_NAME.bat - cp $RELEASE_LTCG/fb_alpha_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR + cd $BASE_DIR + if [ -d "libretro-fba" ]; then + echo "=== Building Final Burn Alpha ===" + cd libretro-fba/ + cd svn-current/trunk + cd projectfiles/visualstudio-2003-libretro-xbox1 + cmd.exe /k $MSVC_NAME.bat + cp $RELEASE_LTCG/fb_alpha_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR - build_libretro_fba_cps1 - build_libretro_fba_cps2 - build_libretro_fba_neogeo - else - echo "Final Burn Alpha not fetched, skipping ..." - fi + build_libretro_fba_cps1 + build_libretro_fba_cps2 + build_libretro_fba_neogeo + else + echo "Final Burn Alpha not fetched, skipping ..." + fi } source $BASE_DIR/libretro-build-common-xdk.sh if [ $1 ]; then - $1 + $1 else - #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_mednafen_psx - build_libretro_beetle_vb - build_libretro_beetle_wswan - #build_libretro_beetle_bsnes - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - build_libretro_fba - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - build_libretro_nestopia - build_libretro_tyrquake + #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_mednafen_psx + build_libretro_beetle_vb + build_libretro_beetle_wswan + #build_libretro_beetle_bsnes + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + build_libretro_fba + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + build_libretro_nestopia + build_libretro_tyrquake fi diff --git a/libretro-build-xdk360.sh b/libretro-build-xdk360.sh index 276bc512..77398322 100644 --- a/libretro-build-xdk360.sh +++ b/libretro-build-xdk360.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash BASE_DIR=$(pwd) RARCH_DIR=$BASE_DIR/dist @@ -11,51 +12,51 @@ RELEASE=Release die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } build_libretro_fba() { - cd $BASE_DIR - if [ -d "libretro-fba" ]; then - echo "=== Building Final Burn Alpha ===" - cd libretro-fba/ - cd svn-current/trunk - cd projectfiles/visualstudio-2010-libretro-360 - cmd.exe /k $MSVC_NAME.bat - cp $RELEASE_LTCG/fb_alpha_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR - else - echo "Final Burn Alpha not fetched, skipping ..." - fi + cd $BASE_DIR + if [ -d "libretro-fba" ]; then + echo "=== Building Final Burn Alpha ===" + cd libretro-fba/ + cd svn-current/trunk + cd projectfiles/visualstudio-2010-libretro-360 + cmd.exe /k $MSVC_NAME.bat + cp $RELEASE_LTCG/fb_alpha_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR + else + echo "Final Burn Alpha not fetched, skipping ..." + fi } source $BASE_DIR/libretro-build-common-xdk.sh if [ $1 ]; then - $1 + $1 else - #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_mednafen_psx - build_libretro_beetle_vb - build_libretro_beetle_wswan - #build_libretro_beetle_bsnes - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - build_libretro_fb_alpha - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_nx - build_libretro_prboom - #build_libretro_stella - #build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - build_libretro_mame078 + #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_mednafen_psx + build_libretro_beetle_vb + build_libretro_beetle_wswan + #build_libretro_beetle_bsnes + build_libretro_snes9x_next + build_libretro_genesis_plus_gx + build_libretro_fb_alpha + build_libretro_vba_next + build_libretro_fceumm + build_libretro_gambatte + build_libretro_nx + build_libretro_prboom + #build_libretro_stella + #build_libretro_quicknes + build_libretro_nestopia + build_libretro_tyrquake + build_libretro_mame078 fi diff --git a/libretro-build.sh b/libretro-build.sh index a074cbc2..e889f1a8 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -1,22 +1,22 @@ -#! /bin/bash -# vi: sw=3 ts=3 et +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash # BSDs don't have readlink -f read_link() { - TARGET_FILE="${1}" - cd "`dirname "${TARGET_FILE}"`" - TARGET_FILE="`basename "${TARGET_FILE}"`" + 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 + 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} + PHYS_DIR="`pwd -P`" + RESULT="${PHYS_DIR}/${TARGET_FILE}" + echo ${RESULT} } SCRIPT="`read_link "$0"`" BASE_DIR="`dirname "${SCRIPT}"`" @@ -25,67 +25,67 @@ WORKDIR="`pwd`" . ${BASE_DIR}/libretro-config.sh if [ -z "$RARCH_DIST_DIR" ]; then - RARCH_DIR="${WORKDIR}/dist" - RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" + RARCH_DIR="${WORKDIR}/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" fi if [ -z "$JOBS" ]; then - JOBS=7 + JOBS=7 fi die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - CXX11="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" + 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 + 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 + 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++" - # FIXME: Do this right later. - if [ "$ARCH" = "i386" ]; then - CC="cc -arch i386" - CXX="c++ -arch i386" - CXX11="clang++ -arch i386 -std=c++11 -stdlib=libc++" - fi - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then - CXX=mingw32-g++ - CXX11=mingw32-g++ - else - CXX=g++ - CXX11=g++ - fi + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + CXX=c++ + CXX11="clang++ -std=c++11 -stdlib=libc++" + # FIXME: Do this right later. + if [ "$ARCH" = "i386" ]; then + CC="cc -arch i386" + CXX="c++ -arch i386" + CXX11="clang++ -arch i386 -std=c++11 -stdlib=libc++" + fi + 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 @@ -99,72 +99,72 @@ echo "STRIP = $STRIP" mkdir -p "$RARCH_DIST_DIR" if [ -n "${1}" ]; then - NOBUILD_SUMMARY=1 - while [ -n "${1}" ]; do - "${1}" - shift - done + 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_libretro_test - build_libretro_testgl - build_summary + 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_libretro_test + build_libretro_testgl + build_summary fi diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 689bc53a..396e2c2a 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -1,5 +1,4 @@ - -#!/bin/bash +# vim: set ts=3 sw=3 noet ft=sh : bash ####usage: # ./libretro-fetch-and-build.sh configfile @@ -18,18 +17,18 @@ WORK=$PWD echo Original PATH: $PATH while read line; do - KEY=`echo $line | cut --fields=1 --delimiter=" "` - VALUE=`echo $line | cut --fields=2 --delimiter=" "` + KEY=`echo $line | cut --fields=1 --delimiter=" "` + VALUE=`echo $line | cut --fields=2 --delimiter=" "` - if [ "${KEY}" == "PATH" ]; - then - export PATH=${VALUE}:${ORIGPATH} - echo New PATH: $PATH + if [ "${KEY}" == "PATH" ]; + then + export PATH=${VALUE}:${ORIGPATH} + echo New PATH: $PATH - else - export ${KEY}=${VALUE} - echo $KEY: $VALUE - fi + else + export ${KEY}=${VALUE} + echo $KEY: $VALUE + fi done < $1.conf echo echo @@ -47,26 +46,26 @@ echo # 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 + 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" + RARCH_DIR="$BASE_DIR/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" fi mkdir -v -p "$RARCH_DIST_DIR" @@ -76,56 +75,56 @@ then IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" for a in "${ABIS[@]}"; do - echo $a - if [ -d $RARCH_DIST_DIR/${a} ]; then - echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." - else - mkdir $RARCH_DIST_DIR/${a} - fi + echo $a + if [ -d $RARCH_DIST_DIR/${a} ]; then + echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." + else + mkdir $RARCH_DIST_DIR/${a} + fi done fi if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - CXX11="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" + 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 + 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 + CC=cc elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then - CC=mingw32-gcc + CC=mingw32-gcc else - CC=gcc + CC=gcc fi fi if [ -z "$CXX" ]; then if [ $FORMAT_COMPILER_TARGET = "osx" ]; then - CXX=c++ - CXX11="clang++ -std=c++11 -stdlib=libc++" + 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++ + CXX=mingw32-g++ + CXX11=mingw32-g++ else - CXX=g++ - CXX11=g++ + CXX=g++ + CXX11=g++ fi fi @@ -150,17 +149,17 @@ RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT 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 + 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 ===' + echo '=== OpenGL disabled in build ===' fi } @@ -176,8 +175,8 @@ cd "${BASE_DIR}" ####build commands buildbot_log() { - HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut --fields=2 --delimiter=" "` - curl --data "message=$1&sign=$HASH" $LOGURL + HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut --fields=2 --delimiter=" "` + curl --data "message=$1&sign=$HASH" $LOGURL } @@ -185,273 +184,273 @@ buildbot_log() { build_libretro_generic_makefile() { - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - cd $DIR - cd $SUBDIR + cd $DIR + cd $SUBDIR - if [ "${NAME}" == "mame078" ]; - then - OLDJ=$JOBS - JOBS=1 - fi + if [ "${NAME}" == "mame078" ]; + then + OLDJ=$JOBS + JOBS=1 + fi - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." - if [ -z "${ARGS}" ] - then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} - else - if [ "${NAME}" == "mame2010" ]; - then + echo "compiling..." + if [ -z "${ARGS}" ] + then + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} + else + if [ "${NAME}" == "mame2010" ]; + then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools - fi - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} - fi + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools + fi + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} - else - MESSAGE="$1 build failed ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" - JOBS=$OLDJ + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} + else + MESSAGE="$1 build failed ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" + JOBS=$OLDJ } build_libretro_generic_theos() { - echo PARAMETERS: DIR $2, SUBDIR: $3, MAKEFILE: $4 + echo PARAMETERS: DIR $2, SUBDIR: $3, MAKEFILE: $4 - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - cd $DIR - cd $SUBDIR + cd $DIR + cd $SUBDIR - ln -s $THEOS theos + ln -s $THEOS theos - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." - if [ -z "${ARGS}" ] - then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} - else - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} - fi + echo "compiling..." + if [ -z "${ARGS}" ] + then + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} + else + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v objs/obj/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v objs/obj/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" } build_libretro_generic_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 + echo PARAMETERS: DIR $2, SUBDIR: $3 - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - cd ${DIR}/${SUBDIR} + cd ${DIR}/${SUBDIR} - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" - ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $a $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $a $1 cleanup failure! - fi - fi + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" + ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $a $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $a $1 cleanup failure! + fi + fi - echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" - ${NDK} -j${JOBS} APP_ABI=${a} - else - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " - ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} - fi - if [ $? -eq 0 ]; - then - MESSAGE="$1-$a build successful ($jobid)" - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" - cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT} - else - MESSAGE="$1-$a build failure ($jobid)" - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" - fi - done - - + echo "compiling for ${a}..." + if [ -z "${ARGS}" ] + then + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" + ${NDK} -j${JOBS} APP_ABI=${a} + else + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " + ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} + fi + if [ $? -eq 0 ]; + then + MESSAGE="$1-$a build successful ($jobid)" + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" + cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT} + else + MESSAGE="$1-$a build failure ($jobid)" + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" + fi + done + + } build_libretro_bsnes_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 + echo PARAMETERS: DIR $2, SUBDIR: $3 - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - PROFILE=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + PROFILE=$6 - CORENAME=bsnes + CORENAME=bsnes - cd ${DIR}/${SUBDIR} + cd ${DIR}/${SUBDIR} - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" - ${NDK} -j${JOBS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" + ${NDK} -j${JOBS} APP_ABI=${a} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" - ${NDK} -j${JOBS} APP_ABI=${a} - else - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" - ${NDK} -j${JOBS} APP_ABI=${a} - fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v ../libs/${a}/libretro_${CORENAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT} - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + echo "compiling for ${a}..." + if [ -z "${ARGS}" ] + then + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" + ${NDK} -j${JOBS} APP_ABI=${a} + else + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" + ${NDK} -j${JOBS} APP_ABI=${a} + fi + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v ../libs/${a}/libretro_${CORENAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT} + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" - done + done } build_libretro_generic_gl_makefile() { - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - check_opengl + check_opengl - cd $DIR - cd $SUBDIR + cd $DIR + cd $SUBDIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." - if [ -z "${ARGS}" ]; - then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} - else - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} - fi + echo "compiling..." + if [ -z "${ARGS}" ]; + then + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} + else + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" - reset_compiler_targets + reset_compiler_targets } @@ -460,71 +459,71 @@ build_libretro_generic_gl_makefile() { build_libretro_bsnes() { - NAME=$1 - DIR=$2 - PROFILE=$3 - MAKEFILE=$4 - PLATFORM=$5 - BSNESCOMPILER=$6 + NAME=$1 + DIR=$2 + PROFILE=$3 + MAKEFILE=$4 + PLATFORM=$5 + BSNESCOMPILER=$6 - cd $DIR + cd $DIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." - rm -f obj/*.{o,"${FORMAT_EXT}"} - rm -f out/*.{o,"${FORMAT_EXT}"} + rm -f obj/*.{o,"${FORMAT_EXT}"} + rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; - then - ${MAKE} clean - fi + if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; + then + ${MAKE} clean + fi - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." + echo "compiling..." - if [ "${PROFILE}" == "cpp98" ]; - then - ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" - elif [ "${PROFILE}" == "bnes" ]; - then - echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} - ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} - else - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} - fi + if [ "${PROFILE}" == "cpp98" ]; + then + ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" + elif [ "${PROFILE}" == "bnes" ]; + then + echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} + ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} + else + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - if [ "${PROFILE}" == "cpp98" ]; - then - cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - elif [ "${PROFILE}" == "bnes" ]; - then - cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - else - cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - fi - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + if [ "${PROFILE}" == "cpp98" ]; + then + cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + elif [ "${PROFILE}" == "bnes" ]; + then + cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + else + cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + fi + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" } @@ -537,189 +536,189 @@ echo echo while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - COMMAND=`echo $line | cut --fields=6 --delimiter=" "` - MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` - SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + COMMAND=`echo $line | cut --fields=6 --delimiter=" "` + MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` + SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED - echo COMMAND: $COMMAND - echo MAKEFILE: $MAKEFILE - echo DIR: $DIR - echo SUBDIR: $SUBDIR + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED + echo COMMAND: $COMMAND + echo MAKEFILE: $MAKEFILE + echo DIR: $DIR + echo SUBDIR: $SUBDIR - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS - echo - echo + echo ARGS: $ARGS + echo + echo - if [ "${TYPE}" == "PROJECT" ]; - then - if [ -d "${DIR}/.git" ]; - then + if [ "${TYPE}" == "PROJECT" ]; + then + if [ -d "${DIR}/.git" ]; + then - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi - if [ "${PREVCORE}" == "bsnes" -a "${PREVBUILD}" == "YES" -a "${COMMAND}" == "BSNES" ]; then - FORCE="YES" - BUILD="YES" - fi + if [ "${PREVCORE}" == "bsnes" -a "${PREVBUILD}" == "YES" -a "${COMMAND}" == "BSNES" ]; then + FORCE="YES" + BUILD="YES" + fi - if [ "${PREVCORE}" == "mame" -a "${PREVBUILD}" == "YES" -a "${NAME}" == "mess" ]; then - FORCE="YES" - BUILD="YES" - fi + if [ "${PREVCORE}" == "mame" -a "${PREVBUILD}" == "YES" -a "${NAME}" == "mess" ]; then + FORCE="YES" + BUILD="YES" + fi - if [ "${PREVCORE}" == "mess" -a "${PREVBUILD}" == "YES" -a "${NAME}" == "ume" ]; then - FORCE="YES" - BUILD="YES" - fi + if [ "${PREVCORE}" == "mess" -a "${PREVBUILD}" == "YES" -a "${NAME}" == "ume" ]; then + FORCE="YES" + BUILD="YES" + fi - cd .. + cd .. - else - echo "cloning repo..." - git clone --depth=1 "$URL" "$DIR" - BUILD="YES" - fi - elif [ "${TYPE}" == "psp_hw_render" ]; - then - if [ -d "${DIR}/.git" ]; - then + else + echo "cloning repo..." + git clone --depth=1 "$URL" "$DIR" + BUILD="YES" + fi + elif [ "${TYPE}" == "psp_hw_render" ]; + then + if [ -d "${DIR}/.git" ]; + then - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi - cd .. + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + cd .. - else - echo "cloning repo..." - git clone "$URL" "$DIR" --depth=1 - cd $DIR - git checkout $TYPE - cd .. - BUILD="YES" - fi + else + echo "cloning repo..." + git clone "$URL" "$DIR" --depth=1 + cd $DIR + git checkout $TYPE + cd .. + BUILD="YES" + fi - elif [ "${TYPE}" == "SUBMODULE" ]; - then - if [ -d "${DIR}/.git" ]; - then + elif [ "${TYPE}" == "SUBMODULE" ]; + then + if [ -d "${DIR}/.git" ]; + then - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi - OUT=`git submodule foreach git pull origin master` - cd .. - else - echo "cloning repo..." - git clone --depth=1 "$URL" "$DIR" - cd $DIR - git submodule update --init - BUILD="YES" - fi - fi + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + OUT=`git submodule foreach git pull origin master` + cd .. + else + echo "cloning repo..." + git clone --depth=1 "$URL" "$DIR" + cd $DIR + git submodule update --init + BUILD="YES" + fi + fi - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then - echo building core... - if [ "${COMMAND}" == "GENERIC" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_GL" ]; then - build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_ALT" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_JNI" ]; then - build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES_JNI" ]; then - build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then - build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES" ]; then - build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then + echo building core... + if [ "${COMMAND}" == "GENERIC" ]; then + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_GL" ]; then + build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_ALT" ]; then + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_JNI" ]; then + build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "BSNES_JNI" ]; then + build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then + build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "BSNES" ]; then + build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} - fi - else - echo BUILDBOT JOB: $jobid $NAME already up-to-date... - fi - echo + fi + else + echo BUILDBOT JOB: $jobid $NAME already up-to-date... + fi + echo - fi + fi - cd "${BASE_DIR}" - PREVCORE=$NAME - PREVBUILD=$BUILD + cd "${BASE_DIR}" + PREVCORE=$NAME + PREVBUILD=$BUILD done < $1 @@ -731,555 +730,555 @@ BUILD="" if [ "${PLATFORM}" == "psp1" ]; then - while read line; do + while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo NAME: $NAME - echo DIR: $DIR - echo SUBDIR: $SUBDIR - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo NAME: $NAME + echo DIR: $DIR + echo SUBDIR: $SUBDIR + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS + echo ARGS: $ARGS - if [ -d "${DIR}/.git" ]; - then + if [ -d "${DIR}/.git" ]; + then - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - echo $OUT - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi - cd .. + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + echo $OUT + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + cd .. - else - echo "cloning repo..." - git clone "$URL" "$DIR" --depth=1 - cd $DIR - BUILD="YES" - cd .. - fi - fi + else + echo "cloning repo..." + git clone "$URL" "$DIR" --depth=1 + cd $DIR + BUILD="YES" + cd .. + fi + fi - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then - cd $DIR - rm -rfv psp1/pkg/ - cd dist-scripts - rm *.a - cp -v $RARCH_DIST_DIR/* . - sh ./psp1-cores.sh - fi + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then + cd $DIR + rm -rfv psp1/pkg/ + cd dist-scripts + rm *.a + cp -v $RARCH_DIST_DIR/* . + sh ./psp1-cores.sh + fi - done < $1.ra + done < $1.ra fi if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then - while read line; do + while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo NAME: $NAME - echo DIR: $DIR - echo PARENT: $PARENTDIR - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo NAME: $NAME + echo DIR: $DIR + echo PARENT: $PARENTDIR + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS + echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then - cd $PARENTDIR - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then - RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi - fi - cd $WORK + if [ -d "${PARENTDIR}/${DIR}/.git" ]; + then + cd $PARENTDIR + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + echo $OUT + if [ "${TYPE}" == "PROJECT" ]; + then + RADIR=$DIR + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + fi + cd $WORK - else - echo "cloning repo..." - cd $PARENTDIR - git clone "$URL" "$DIR" --depth=1 - cd $DIR - if [ "${TYPE}" == "PROJECT" ]; - then - BUILD="YES" - RADIR=$DIR + else + echo "cloning repo..." + cd $PARENTDIR + git clone "$URL" "$DIR" --depth=1 + cd $DIR + if [ "${TYPE}" == "PROJECT" ]; + then + BUILD="YES" + RADIR=$DIR - fi - cd $WORK - fi - fi + fi + cd $WORK + fi + fi - echo - echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Compiling Shaders" - echo + echo + echo + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Compiling Shaders" + echo - echo RADIR $RADIR - cd $RADIR - $MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON + echo RADIR $RADIR + cd $RADIR + $MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON - echo "BUILDBOT JOB: $jobid Processing Assets" - echo + echo "BUILDBOT JOB: $jobid Processing Assets" + echo - rm -Rfv android/phoenix/assets/overlays - cp -Rfv media/overlays android/phoenix/assets/ - rm -Rfv android/phoenix/assets/shaders_glsl - cp -Rfv media/shaders_glsl android/phoenix/assets/ - rm -Rfv android/phoenix/assets/autoconfig - cp -Rfv media/autoconfig android/phoenix/assets/ - rm -Rfv android/phoenix/assets/info - cp -Rfv $RARCH_DIR/info android/phoenix/assets/ + rm -Rfv android/phoenix/assets/overlays + cp -Rfv media/overlays android/phoenix/assets/ + rm -Rfv android/phoenix/assets/shaders_glsl + cp -Rfv media/shaders_glsl android/phoenix/assets/ + rm -Rfv android/phoenix/assets/autoconfig + cp -Rfv media/autoconfig android/phoenix/assets/ + rm -Rfv android/phoenix/assets/info + cp -Rfv $RARCH_DIR/info android/phoenix/assets/ - echo "BUILDBOT JOB: $jobid Building" - echo - cd android/phoenix - rm bin/*.apk + echo "BUILDBOT JOB: $jobid Building" + echo + cd android/phoenix + rm bin/*.apk - $NDK clean - $NDK -j${JOBS} - ant clean - android update project --path . --target android-21 - android update project --path libs/googleplay --target android-21 - android update project --path libs/appcompat --target android-21 - ant debug - fi + $NDK clean + $NDK -j${JOBS} + ant clean + android update project --path . --target android-21 + android update project --path libs/googleplay --target android-21 + android update project --path libs/appcompat --target android-21 + ant debug + fi fi if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then - while read line; do + while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo NAME: $NAME - echo DIR: $DIR - echo PARENT: $PARENTDIR - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo NAME: $NAME + echo DIR: $DIR + echo PARENT: $PARENTDIR + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS + echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then - cd $PARENTDIR - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then - RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi - fi - cd $WORK + if [ -d "${PARENTDIR}/${DIR}/.git" ]; + then + cd $PARENTDIR + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + echo $OUT + if [ "${TYPE}" == "PROJECT" ]; + then + RADIR=$DIR + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + fi + cd $WORK - else - echo "cloning repo..." - cd $PARENTDIR - git clone "$URL" "$DIR" --depth=1 - cd $DIR - if [ "${TYPE}" == "PROJECT" ]; - then - BUILD="YES" - RADIR=$DIR + else + echo "cloning repo..." + cd $PARENTDIR + git clone "$URL" "$DIR" --depth=1 + cd $DIR + if [ "${TYPE}" == "PROJECT" ]; + then + BUILD="YES" + RADIR=$DIR - fi - cd $WORK - fi - fi + fi + cd $WORK + fi + fi - echo - echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Compiling Shaders" - echo + echo + echo + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Compiling Shaders" + echo - echo RADIR $RADIR - cd $RADIR - $MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON + echo RADIR $RADIR + cd $RADIR + $MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON - echo "BUILDBOT JOB: $jobid Processing Assets" - echo + echo "BUILDBOT JOB: $jobid Processing Assets" + echo - echo "BUILDBOT JOB: $jobid Building" - echo - cd apple/iOS - rm RetroArch.app -rf + echo "BUILDBOT JOB: $jobid Building" + echo + cd apple/iOS + rm RetroArch.app -rf - rm -rfv *.deb - ln -s $THEOS theos - export PRODUCT_NAME=RetroArch - $MAKE clean - $MAKE -j8 - ./package.sh + rm -rfv *.deb + ln -s $THEOS theos + export PRODUCT_NAME=RetroArch + $MAKE clean + $MAKE -j8 + ./package.sh - mkdir obj/RetroArch.app/modules - cp -rfv ../../../dist/theos/*.* obj/RetroArch.app/modules - cp -rfv ../../../dist/info/*.* obj/RetroArch.app/modules + mkdir obj/RetroArch.app/modules + cp -rfv ../../../dist/theos/*.* obj/RetroArch.app/modules + cp -rfv ../../../dist/info/*.* obj/RetroArch.app/modules - $MAKE package + $MAKE package - cp -r *.deb /home/buildbot/www/.radius/ - fi + cp -r *.deb /home/buildbot/www/.radius/ + fi fi if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; then - while read line; do + while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo NAME: $NAME - echo DIR: $DIR - echo PARENT: $PARENTDIR - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo NAME: $NAME + echo DIR: $DIR + echo PARENT: $PARENTDIR + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS + echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then - cd $PARENTDIR - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then - RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" - fi - fi - cd $WORK - else - echo "cloning repo..." - cd $PARENTDIR - git clone "$URL" "$DIR" --depth=1 - cd $DIR - - if [ "${TYPE}" == "PROJECT" ]; - then - BUILD="YES" - RADIR=$DIR + if [ -d "${PARENTDIR}/${DIR}/.git" ]; + then + cd $PARENTDIR + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + echo $OUT + if [ "${TYPE}" == "PROJECT" ]; + then + RADIR=$DIR + if [[ $OUT == *"Already up-to-date"* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + fi + cd $WORK + else + echo "cloning repo..." + cd $PARENTDIR + git clone "$URL" "$DIR" --depth=1 + cd $DIR + + if [ "${TYPE}" == "PROJECT" ]; + then + BUILD="YES" + RADIR=$DIR - fi - cd $WORK - fi - fi + fi + cd $WORK + fi + fi - echo - echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + echo + echo + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then - cd $RADIR - echo "BUILDBOT JOB: $jobid Building" - echo + cd $RADIR + echo "BUILDBOT JOB: $jobid Building" + echo - echo "compiling audio filters" - cd audio/audio_filters - echo "audio filter build command: ${MAKE}" - $MAKE - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid audio filter build success! - else - echo BUILDBOT JOB: $jobid audio filter build failure! - fi - - cd .. - cd .. - - echo "compiling video filters" - cd gfx/video_filters - echo "audio filter build command: ${MAKE}" - $MAKE - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid video filter build success! - else - echo BUILDBOT JOB: $jobid video filter build failure! - fi - - cd .. - cd .. - - echo "cleaning up..." - echo "cleanup command: $MAKE clean" - $MAKE clean - - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid retroarch cleanup success! - else - echo BUILDBOT JOB: $jobid retroarch cleanup failure! - fi + echo "compiling audio filters" + cd audio/audio_filters + echo "audio filter build command: ${MAKE}" + $MAKE + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid audio filter build success! + else + echo BUILDBOT JOB: $jobid audio filter build failure! + fi + + cd .. + cd .. + + echo "compiling video filters" + cd gfx/video_filters + echo "audio filter build command: ${MAKE}" + $MAKE + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid video filter build success! + else + echo BUILDBOT JOB: $jobid video filter build failure! + fi + + cd .. + cd .. + + echo "cleaning up..." + echo "cleanup command: $MAKE clean" + $MAKE clean + + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid retroarch cleanup success! + else + echo BUILDBOT JOB: $jobid retroarch cleanup failure! + fi - echo "configuring..." - echo "configure command: $CONFIGURE" - ${CONFIGURE} - - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid retroarch configure success! - else - echo BUILDBOT JOB: $jobid retroarch configure failure! - fi + echo "configuring..." + echo "configure command: $CONFIGURE" + ${CONFIGURE} + + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid retroarch configure success! + else + echo BUILDBOT JOB: $jobid retroarch configure failure! + fi - echo "building..." - echo "build command: $MAKE -j${JOBS}" - $MAKE -j${JOBS} - - if [ $? -eq 0 ]; - then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE - buildbot_log "$MESSAGE" - - echo "Packaging" - echo ============================================ - cp retroarch.cfg retroarch.default.cfg + echo "building..." + echo "build command: $MAKE -j${JOBS}" + $MAKE -j${JOBS} + + if [ $? -eq 0 ]; + then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE + buildbot_log "$MESSAGE" + + echo "Packaging" + echo ============================================ + cp retroarch.cfg retroarch.default.cfg cat << EOF > retroarch.cfg libretro_directory = ":\cores" screenshot_directory = ":\screenshots" @@ -1301,44 +1300,44 @@ cheat_database_path = ":\cheats" video_driver = "gl" EOF - - - rm -rfv windows - mkdir -p windows - mkdir -p windows/overlays - mkdir -p windows/shaders - mkdir -p windows/autoconfig - mkdir -p windows/filters - mkdir -p windows/filters/video - mkdir -p windows/filters/audio - mkdir -p windows/assets - mkdir -p windows/cheats - mkdir -p windows/database - mkdir -p windows/database/cursors - mkdir -p windows/database/rdb - - cp -v *.cfg windows/ - cp -v *.exe tools/*.exe windows/ - cp -Rfv media/overlays/* windows/overlays - cp -Rfv media/shaders_cg/* windows/shaders - cp -Rfv media/autoconfig/* windows/autoconfig - cp -Rfv media/assets/* windows/assets - cp -Rfv media/libretrodb/cht/* windows/cheats - cp -Rfv media/libretrodb/rdb/* windows/database/rdb - cp -Rfv media/libretrodb/cursors/* windows/database/cursors - cp -Rfv $RARCH_DIR/info windows/cores - cp -Rfv audio/audio_filters/*.dll windows/filters/audio - cp -Rfv audio/audio_filters/*.dsp windows/filters/audio - cp -Rfv gfx/video_filters/*.dll windows/filters/video - cp -Rfv gfx/video_filters/*.filt windows/filters/video - - else - MESSAGE="retroarch build failed ($jobid)" - echo $MESSAGE - buildbot_log "$MESSAGE" - fi + + + rm -rfv windows + mkdir -p windows + mkdir -p windows/overlays + mkdir -p windows/shaders + mkdir -p windows/autoconfig + mkdir -p windows/filters + mkdir -p windows/filters/video + mkdir -p windows/filters/audio + mkdir -p windows/assets + mkdir -p windows/cheats + mkdir -p windows/database + mkdir -p windows/database/cursors + mkdir -p windows/database/rdb + + cp -v *.cfg windows/ + cp -v *.exe tools/*.exe windows/ + cp -Rfv media/overlays/* windows/overlays + cp -Rfv media/shaders_cg/* windows/shaders + cp -Rfv media/autoconfig/* windows/autoconfig + cp -Rfv media/assets/* windows/assets + cp -Rfv media/libretrodb/cht/* windows/cheats + cp -Rfv media/libretrodb/rdb/* windows/database/rdb + cp -Rfv media/libretrodb/cursors/* windows/database/cursors + cp -Rfv $RARCH_DIR/info windows/cores + cp -Rfv audio/audio_filters/*.dll windows/filters/audio + cp -Rfv audio/audio_filters/*.dsp windows/filters/audio + cp -Rfv gfx/video_filters/*.dll windows/filters/video + cp -Rfv gfx/video_filters/*.filt windows/filters/video + + else + MESSAGE="retroarch build failed ($jobid)" + echo $MESSAGE + buildbot_log "$MESSAGE" + fi - fi + fi fi diff --git a/libretro-buildbot-task.sh b/libretro-buildbot-task.sh index b27aa005..96d8d025 100644 --- a/libretro-buildbot-task.sh +++ b/libretro-buildbot-task.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash #$1 recipe #$2 jobname @@ -21,18 +22,18 @@ WORK=$PWD echo Original PATH: $PATH while read line; do - KEY=`echo $line | cut --fields=1 --delimiter=" "` - VALUE=`echo $line | cut --fields=2 --delimiter=" "` + KEY=`echo $line | cut --fields=1 --delimiter=" "` + VALUE=`echo $line | cut --fields=2 --delimiter=" "` - if [ "${KEY}" == "PATH" ]; - then - export PATH=${VALUE}:${ORIGPATH} - echo New PATH: $PATH + if [ "${KEY}" == "PATH" ]; + then + export PATH=${VALUE}:${ORIGPATH} + echo New PATH: $PATH - else - export ${KEY}=${VALUE} - echo $KEY: $VALUE - fi + else + export ${KEY}=${VALUE} + echo $KEY: $VALUE + fi done < $1.conf echo echo @@ -50,26 +51,26 @@ echo # 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 + 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" + RARCH_DIR="$BASE_DIR/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" fi mkdir -v -p "$RARCH_DIST_DIR" @@ -80,55 +81,55 @@ then IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" for a in "${ABIS[@]}"; do echo $a - if [ -d $RARCH_DIST_DIR/${a} ]; then - echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." - else - mkdir $RARCH_DIST_DIR/${a} - fi + if [ -d $RARCH_DIST_DIR/${a} ]; then + echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." + else + mkdir $RARCH_DIST_DIR/${a} + fi done fi if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - CXX11="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" + 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 + 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 + CC=cc elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then - CC=mingw32-gcc + CC=mingw32-gcc else - CC=gcc + CC=gcc fi fi if [ -z "$CXX" ]; then if [ $FORMAT_COMPILER_TARGET = "osx" ]; then - CXX=c++ - CXX11="clang++ -std=c++11 -stdlib=libc++" + 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++ + CXX=mingw32-g++ + CXX11=mingw32-g++ else - CXX=g++ - CXX11=g++ + CXX=g++ + CXX11=g++ fi fi @@ -153,17 +154,17 @@ RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT 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 ===' + 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 } @@ -179,8 +180,8 @@ cd "${BASE_DIR}" ####build commands buildbot_log() { - HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut --fields=2 --delimiter=" "` - curl --data "message=$1&sign=$HASH" $LOGURL + HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut --fields=2 --delimiter=" "` + curl --data "message=$1&sign=$HASH" $LOGURL } @@ -188,273 +189,273 @@ buildbot_log() { build_libretro_generic_makefile() { - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - cd $DIR - cd $SUBDIR + cd $DIR + cd $SUBDIR - if [ "${NAME}" == "mame078" ]; - then - OLDJ=$JOBS - JOBS=1 - fi + if [ "${NAME}" == "mame078" ]; + then + OLDJ=$JOBS + JOBS=1 + fi - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." - if [ -z "${ARGS}" ] - then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} - else - if [ "${NAME}" == "mame2010" ]; - then + echo "compiling..." + if [ -z "${ARGS}" ] + then + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} + else + if [ "${NAME}" == "mame2010" ]; + then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools - fi - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} - fi + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools + fi + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} - else - MESSAGE="$1 build failed ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" - JOBS=$OLDJ + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} + else + MESSAGE="$1 build failed ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" + JOBS=$OLDJ } build_libretro_generic_theos() { - echo PARAMETERS: DIR $2, SUBDIR: $3, MAKEFILE: $4 + echo PARAMETERS: DIR $2, SUBDIR: $3, MAKEFILE: $4 - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - cd $DIR - cd $SUBDIR + cd $DIR + cd $SUBDIR - ln -s $THEOS theos + ln -s $THEOS theos - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." - if [ -z "${ARGS}" ] - then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} - else - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} - fi + echo "compiling..." + if [ -z "${ARGS}" ] + then + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} + else + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v objs/obj/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v objs/obj/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" } build_libretro_generic_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 + echo PARAMETERS: DIR $2, SUBDIR: $3 - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - cd ${DIR}/${SUBDIR} + cd ${DIR}/${SUBDIR} - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" - ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $a $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $a $1 cleanup failure! - fi - fi + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" + ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $a $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $a $1 cleanup failure! + fi + fi - echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" - ${NDK} -j${JOBS} APP_ABI=${a} - else - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " - ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} - fi - if [ $? -eq 0 ]; - then - MESSAGE="$1-$a build successful ($jobid)" - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" - cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT} - else - MESSAGE="$1-$a build failure ($jobid)" - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" - fi - done - - + echo "compiling for ${a}..." + if [ -z "${ARGS}" ] + then + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" + ${NDK} -j${JOBS} APP_ABI=${a} + else + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " + ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} + fi + if [ $? -eq 0 ]; + then + MESSAGE="$1-$a build successful ($jobid)" + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" + cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT} + else + MESSAGE="$1-$a build failure ($jobid)" + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" + fi + done + + } build_libretro_bsnes_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 + echo PARAMETERS: DIR $2, SUBDIR: $3 - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - PROFILE=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + PROFILE=$6 - CORENAME=bsnes + CORENAME=bsnes - cd ${DIR}/${SUBDIR} + cd ${DIR}/${SUBDIR} - for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" - ${NDK} -j${JOBS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + for a in "${ABIS[@]}"; do + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" + ${NDK} -j${JOBS} APP_ABI=${a} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" - ${NDK} -j${JOBS} APP_ABI=${a} - else - echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" - ${NDK} -j${JOBS} APP_ABI=${a} - fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v ../libs/${a}/libretro_${CORENAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT} - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + echo "compiling for ${a}..." + if [ -z "${ARGS}" ] + then + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" + ${NDK} -j${JOBS} APP_ABI=${a} + else + echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" + ${NDK} -j${JOBS} APP_ABI=${a} + fi + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v ../libs/${a}/libretro_${CORENAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT} + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" - done + done } build_libretro_generic_gl_makefile() { - NAME=$1 - DIR=$2 - SUBDIR=$3 - MAKEFILE=$4 - PLATFORM=$5 - ARGS=$6 + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 - check_opengl + check_opengl - cd $DIR - cd $SUBDIR + cd $DIR + cd $SUBDIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." - if [ -z "${ARGS}" ]; - then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} - else - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} - fi + echo "compiling..." + if [ -z "${ARGS}" ]; + then + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} + else + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" - reset_compiler_targets + reset_compiler_targets } @@ -463,71 +464,71 @@ build_libretro_generic_gl_makefile() { build_libretro_bsnes() { - NAME=$1 - DIR=$2 - PROFILE=$3 - MAKEFILE=$4 - PLATFORM=$5 - BSNESCOMPILER=$6 + NAME=$1 + DIR=$2 + PROFILE=$3 + MAKEFILE=$4 + PLATFORM=$5 + BSNESCOMPILER=$6 - cd $DIR + cd $DIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." - rm -f obj/*.{o,"${FORMAT_EXT}"} - rm -f out/*.{o,"${FORMAT_EXT}"} + rm -f obj/*.{o,"${FORMAT_EXT}"} + rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; - then - ${MAKE} clean - fi + if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; + then + ${MAKE} clean + fi - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi - fi + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi + fi - echo "compiling..." + echo "compiling..." - if [ "${PROFILE}" == "cpp98" ]; - then - ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" - elif [ "${PROFILE}" == "bnes" ]; - then - echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} - ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} - else - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} - fi + if [ "${PROFILE}" == "cpp98" ]; + then + ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" + elif [ "${PROFILE}" == "bnes" ]; + then + echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} + ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} + else + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} + fi - if [ $? -eq 0 ]; - then - MESSAGE="$1 build successful ($jobid)" - if [ "${PROFILE}" == "cpp98" ]; - then - cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - elif [ "${PROFILE}" == "bnes" ]; - then - cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - else - cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - fi - else - MESSAGE="$1 build failure ($jobid)" - fi - echo BUILDBOT JOB: $MESSAGE - buildbot_log "$MESSAGE" + if [ $? -eq 0 ]; + then + MESSAGE="$1 build successful ($jobid)" + if [ "${PROFILE}" == "cpp98" ]; + then + cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + elif [ "${PROFILE}" == "bnes" ]; + then + cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + else + cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + fi + else + MESSAGE="$1 build failure ($jobid)" + fi + echo BUILDBOT JOB: $MESSAGE + buildbot_log "$MESSAGE" } @@ -538,10 +539,10 @@ export jobid=$1 if [ -z "$2" ] then - echo no argument supplied + echo no argument supplied else - echo processing $2 only - TASK=$2 + echo processing $2 only + TASK=$2 fi @@ -549,112 +550,112 @@ echo echo while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - COMMAND=`echo $line | cut --fields=6 --delimiter=" "` - MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` - SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + COMMAND=`echo $line | cut --fields=6 --delimiter=" "` + MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` + SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` - if [ ! -z "$TASK" ] - then - if [ "${TASK}" != "${NAME}" ] - then - continue - fi - fi + if [ ! -z "$TASK" ] + then + if [ "${TASK}" != "${NAME}" ] + then + continue + fi + fi - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED - echo COMMAND: $COMMAND - echo MAKEFILE: $MAKEFILE - echo DIR: $DIR - echo SUBDIR: $SUBDIR - DIR=$3 + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED + echo COMMAND: $COMMAND + echo MAKEFILE: $MAKEFILE + echo DIR: $DIR + echo SUBDIR: $SUBDIR + DIR=$3 - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS - echo - echo + echo ARGS: $ARGS + echo + echo - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then - echo building core... - if [ "${COMMAND}" == "GENERIC" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_GL" ]; then - build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_ALT" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_JNI" ]; then - build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES_JNI" ]; then - build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then - build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES" ]; then - build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then + echo building core... + if [ "${COMMAND}" == "GENERIC" ]; then + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_GL" ]; then + build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_ALT" ]; then + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_JNI" ]; then + build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "BSNES_JNI" ]; then + build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then + build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "BSNES" ]; then + build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} - fi - else - echo BUILDBOT JOB: $jobid $NAME already up-to-date... - fi - echo + fi + else + echo BUILDBOT JOB: $jobid $NAME already up-to-date... + fi + echo - fi + fi - cd "${BASE_DIR}" - PREVCORE=$NAME - PREVBUILD=$BUILD + cd "${BASE_DIR}" + PREVCORE=$NAME + PREVBUILD=$BUILD done < $1 @@ -665,162 +666,162 @@ BUILD="" if [ ! -z "$TASK" ] then - if [ "${TASK}" != "retroarch" ] - then - exit - fi + if [ "${TASK}" != "retroarch" ] + then + exit + fi fi if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; then - while read line; do + while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut --fields=1 --delimiter=" "` + DIR=`echo $line | cut --fields=2 --delimiter=" "` + URL=`echo $line | cut --fields=3 --delimiter=" "` + TYPE=`echo $line | cut --fields=4 --delimiter=" "` + ENABLED=`echo $line | cut --fields=5 --delimiter=" "` + PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ ! -z "$TASK" ] - then - if [ "${TASK}" != "${NAME}" ] - then - continue - fi - fi - if [ "${ENABLED}" == "YES" ]; - then - echo "BUILDBOT JOB: $jobid Processing $NAME" - echo - echo NAME: $NAME - echo DIR: $DIR - echo PARENT: $PARENTDIR - echo URL: $URL - echo REPO TYPE: $TYPE - echo ENABLED: $ENABLED + if [ ! -z "$TASK" ] + then + if [ "${TASK}" != "${NAME}" ] + then + continue + fi + fi + if [ "${ENABLED}" == "YES" ]; + then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo NAME: $NAME + echo DIR: $DIR + echo PARENT: $PARENTDIR + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED - ARGS="" + ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + TEMP=`echo $line | cut --fields=9 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=10 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=11 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=12 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=13 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut --fields=14 --delimiter=" "` + if [ -n ${TEMP} ]; + then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS + echo ARGS: $ARGS - fi + fi - echo - echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + echo + echo + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then - cd $3 - echo "BUILDBOT JOB: $jobid Building" - echo + cd $3 + echo "BUILDBOT JOB: $jobid Building" + echo - echo "compiling audio filters" - cd audio/audio_filters - echo "audio filter build command: ${MAKE}" - $MAKE - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid audio filter build success! - else - echo BUILDBOT JOB: $jobid audio filter build failure! - fi - - cd .. - cd .. - - echo "compiling video filters" - cd gfx/video_filters - echo "audio filter build command: ${MAKE}" - $MAKE - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid video filter build success! - else - echo BUILDBOT JOB: $jobid video filter build failure! - fi - - cd .. - cd .. - - echo "cleaning up..." - echo "cleanup command: $MAKE clean" - $MAKE clean - - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid retroarch cleanup success! - else - echo BUILDBOT JOB: $jobid retroarch cleanup failure! - fi + echo "compiling audio filters" + cd audio/audio_filters + echo "audio filter build command: ${MAKE}" + $MAKE + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid audio filter build success! + else + echo BUILDBOT JOB: $jobid audio filter build failure! + fi + + cd .. + cd .. + + echo "compiling video filters" + cd gfx/video_filters + echo "audio filter build command: ${MAKE}" + $MAKE + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid video filter build success! + else + echo BUILDBOT JOB: $jobid video filter build failure! + fi + + cd .. + cd .. + + echo "cleaning up..." + echo "cleanup command: $MAKE clean" + $MAKE clean + + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid retroarch cleanup success! + else + echo BUILDBOT JOB: $jobid retroarch cleanup failure! + fi - echo "configuring..." - echo "configure command: $CONFIGURE" - ${CONFIGURE} - - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid retroarch configure success! - else - echo BUILDBOT JOB: $jobid retroarch configure failure! - fi + echo "configuring..." + echo "configure command: $CONFIGURE" + ${CONFIGURE} + + if [ $? -eq 0 ]; + then + echo BUILDBOT JOB: $jobid retroarch configure success! + else + echo BUILDBOT JOB: $jobid retroarch configure failure! + fi - echo "building..." - echo "build command: $MAKE -j${JOBS}" - $MAKE -j${JOBS} - - if [ $? -eq 0 ]; - then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE - buildbot_log "$MESSAGE" - else - MESSAGE="retroarch build failed ($jobid)" - echo $MESSAGE - buildbot_log "$MESSAGE" - fi + echo "building..." + echo "build command: $MAKE -j${JOBS}" + $MAKE -j${JOBS} + + if [ $? -eq 0 ]; + then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE + buildbot_log "$MESSAGE" + else + MESSAGE="retroarch build failed ($jobid)" + echo $MESSAGE + buildbot_log "$MESSAGE" + fi - fi + fi fi diff --git a/libretro-config.sh b/libretro-config.sh index 83b86333..bdb59c4a 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -1,93 +1,92 @@ -#!/bin/bash -# vi: ts=3 sw=3 et +# vim: set ts=3 sw=3 noet ft=sh : bash # 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 + [ -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" + [ -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}" + echo "PLATFORM: ${platform}" + echo "ARCHITECTURE: ${ARCH}" + echo "TARGET: ${FORMAT_COMPILER_TARGET}" } config_cpu @@ -95,11 +94,11 @@ config_platform config_log_build_host if [ -z "${JOBS}" ]; then - if command -v nproc >/dev/null; then - JOBS=`nproc` - else - JOBS=1 - fi + 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 @@ -180,16 +179,16 @@ export RA_ANDROID_MIN_API=android-9 # 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 + 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 @@ -202,11 +201,11 @@ 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 + if command -v column >/dev/null; then + BUILD_SUMMARY_FMT=column + else + BUILD_SUMMARY_FMT=cat + fi fi @@ -217,6 +216,6 @@ fi #The following below is just a sample. if [ -f "${WORKDIR}/libretro-config-user.sh" ]; then - . ${WORKDIR}/libretro-config-user.sh + . ${WORKDIR}/libretro-config-user.sh fi diff --git a/libretro-header-update.sh b/libretro-header-update.sh index 37fcba8b..1282ad52 100755 --- a/libretro-header-update.sh +++ b/libretro-header-update.sh @@ -1,47 +1,48 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash update_header() { - if [ -d "$1" ]; then - if [ ! -f "$1/libretro.h" ]; then - echo "=== ERROR updating $2 ===" - else - echo "=== Updating $2 ===" - cp "libretro-arb/libretro.h" "$1/libretro.h" - cd "$1" - git add libretro.h - git commit -m "Update libretro.h" - git push - cd - - fi - else - echo "=== Skipping $2 because it is not checked out ===" - fi + if [ -d "$1" ]; then + if [ ! -f "$1/libretro.h" ]; then + echo "=== ERROR updating $2 ===" + else + echo "=== Updating $2 ===" + cp "libretro-arb/libretro.h" "$1/libretro.h" + cd "$1" + git add libretro.h + git commit -m "Update libretro.h" + git push + cd - + fi + else + echo "=== Skipping $2 because it is not checked out ===" + fi } update_header_batch() { - if [ ! -f "$1/libretro.h" ]; then - echo "=== ERROR updating $2 ===" - else - cp "libretro-arb/libretro.h" "$1/libretro.h" - cd "$1" - git add libretro.h - cd - - fi + if [ ! -f "$1/libretro.h" ]; then + echo "=== ERROR updating $2 ===" + else + cp "libretro-arb/libretro.h" "$1/libretro.h" + cd "$1" + git add libretro.h + cd - + fi } fetch_project() { - echo "=== Fetching $3 ===" - if [ -d "$2/.git" ]; then - cd "$2" - git pull - cd .. - else - git clone "$1" "$2" - fi - echo "=== Fetched ===" + echo "=== Fetching $3 ===" + if [ -d "$2/.git" ]; then + cd "$2" + git pull + cd .. + else + git clone "$1" "$2" + fi + echo "=== Fetched ===" } fetch_project "https://github.com/libretro/RetroArch.git" "retroarch" "libretro/libretro ARB" diff --git a/libretro-install.sh b/libretro-install.sh index 21b6fbed..d1f45411 100755 --- a/libretro-install.sh +++ b/libretro-install.sh @@ -1,24 +1,25 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash . ./libretro-config.sh # BSDs don't have readlink -f read_link() { - TARGET_FILE="$1" - cd $(dirname "$TARGET_FILE") - TARGET_FILE=$(basename "$TARGET_FILE") + 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 + 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 + PHYS_DIR=$(pwd -P) + RESULT="$PHYS_DIR/$TARGET_FILE" + echo $RESULT } SCRIPT=$(read_link "$0") @@ -27,25 +28,25 @@ RARCH_DIR="$BASE_DIR/dist" RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" if [ -z "$1" ]; then - LIBRETRO_DIR="/usr/local/lib/libretro" + LIBRETRO_DIR="/usr/local/lib/libretro" else - LIBRETRO_DIR="$1" + LIBRETRO_DIR="$1" fi mkdir -p "$LIBRETRO_DIR" for lib in "$RARCH_DIST_DIR"/* do - if [ -f "$lib" ]; then - install -v -m644 "$lib" "$LIBRETRO_DIR" - else - echo "Library $lib not found, skipping ..." - fi + if [ -f "$lib" ]; then + install -v -m644 "$lib" "$LIBRETRO_DIR" + else + echo "Library $lib not found, skipping ..." + fi done for infofile in "$RARCH_DIR"/info/*.info do - if [ -f "$infofile" ]; then - install -v -m644 "$infofile" "$LIBRETRO_DIR" - fi + if [ -f "$infofile" ]; then + install -v -m644 "$infofile" "$LIBRETRO_DIR" + fi done diff --git a/retroarch-build.sh b/retroarch-build.sh index 9d6d79bb..eb9504e2 100755 --- a/retroarch-build.sh +++ b/retroarch-build.sh @@ -1,72 +1,73 @@ -#!/bin/bash +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash . ./libretro-config.sh # BSDs don't have readlink -f read_link() { - TARGET_FILE="$1" - cd $(dirname "$TARGET_FILE") - TARGET_FILE=$(basename "$TARGET_FILE") + 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 + 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 + 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" + RARCH_DIR="$BASE_DIR/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" fi die() { - echo $1 - #exit 1 + echo $1 + #exit 1 } if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" + 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 + 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 + 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 + elif [ "$(expr substr $(uname -s) 1 7)" = "MINGW32" ]; then + CXX=mingw32-g++ + else + CXX=g++ + fi fi echo "CC = $CC" @@ -79,59 +80,59 @@ 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 [ $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_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 + 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 + 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 + $1 else - build_retroarch + build_retroarch fi