From 1a9ef99de928f8d0aaed6c9957af925d5f483ea1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 22 Aug 2014 12:33:53 +0200 Subject: [PATCH] Refactor more code in libretro-build-common.sh --- libretro-build-android-mk.sh | 4 +-- libretro-build-common.sh | 54 +++++++----------------------------- libretro-fetch.sh | 2 +- 3 files changed, 13 insertions(+), 47 deletions(-) diff --git a/libretro-build-android-mk.sh b/libretro-build-android-mk.sh index 8ca727f3..e99f5ef3 100755 --- a/libretro-build-android-mk.sh +++ b/libretro-build-android-mk.sh @@ -533,7 +533,7 @@ build_libretro_nestopia() build_libretro_pcsx_rearmed() { - CORENAME="pcsx-rearmed" + CORENAME="pcsx_rearmed" cd $BASE_DIR pwd if [ -d "libretro-${CORENAME}" ]; then @@ -545,7 +545,7 @@ build_libretro_pcsx_rearmed() 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.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/pcsx_rearmed_libretro_neon${FORMAT}.${FORMAT_EXT} + cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro_neon${FORMAT}.${FORMAT_EXT} done else echo "${CORENAME} not fetched, skipping ..." diff --git a/libretro-build-common.sh b/libretro-build-common.sh index f51f2a99..9fdf58f7 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -146,21 +146,6 @@ build_libretro_fba_neogeo() fi } -build_libretro_pcsx_rearmed() { - cd "${BASE_DIR}" - if [ -d 'libretro-pcsx-rearmed' ]; then - echo '=== Building PCSX ReARMed ===' - cd libretro-pcsx-rearmed - - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed' - fi - "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build PCSX ReARMed' - cp "pcsx_rearmed_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" - else - echo 'PCSX ReARMed not fetched, skipping ...' - fi -} build_libretro_pcsx_rearmed_interpreter() { cd "${BASE_DIR}" @@ -473,23 +458,19 @@ build_libretro_dinothawr() { } build_libretro_genesis_plus_gx() { - cd "${BASE_DIR}" - if [ -d 'libretro-genesis_plus_gx' ]; then - echo '=== Building Genplus GX ===' - cd libretro-genesis_plus_gx/ - - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean Genplus GX' - fi - "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Genplus GX' - cp "genesis_plus_gx_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" - else - echo 'Genplus GX not fetched, skipping ...' - fi + build_libretro_generic_makefile_rootdir "genesis_plus_gx" "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_mame078() { - build_libretro_generic_makefile_rootdir "mame078" "makefile" + build_libretro_generic_makefile_rootdir "mame078" "makefile" ${FORMAT_COMPILER_TARGET} +} + +build_libretro_prboom() { + build_libretro_generic_makefile_rootdir "prboom" "Makefile" ${FORMAT_COMPILER_TARGET_ALT} +} + +build_libretro_pcsx_rearmed() { + build_libretro_generic_makefile_rootdir "pcsx_rearmed" "Makefile.libretro" ${FORMAT_COMPILER_TARGET} } build_libretro_mame() { @@ -679,21 +660,6 @@ build_libretro_gambatte() { } -build_libretro_prboom() { - cd "${BASE_DIR}" - if [ -d 'libretro-prboom' ]; then - echo '=== Building PRBoom ===' - cd libretro-prboom - - if [ -z "${NOCLEAN}" ]; then - "${MAKE}" platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean PRBoom' - fi - "${MAKE}" platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build PRBoom' - cp "prboom_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" - else - echo 'PRBoom not fetched, skipping ...' - fi -} build_libretro_meteor() { diff --git a/libretro-fetch.sh b/libretro-fetch.sh index a62926a5..8989ae80 100755 --- a/libretro-fetch.sh +++ b/libretro-fetch.sh @@ -128,7 +128,7 @@ fetch_project "$REPO_BASE/libretro/desmume.git" "libretro-desmume" "libretro/Des fetch_project "$REPO_BASE/libretro/QuickNES_Core.git" "libretro-quicknes" "libretro/QuickNES" fetch_project "$REPO_BASE/libretro/nestopia.git" "libretro-nestopia" "libretro/Nestopia" fetch_project "$REPO_BASE/libretro/tyrquake.git" "libretro-tyrquake" "libretro/tyrquake" -fetch_project "$REPO_BASE/libretro/pcsx_rearmed.git" "libretro-pcsx-rearmed" "libretro/pcsx_rearmed" +fetch_project "$REPO_BASE/libretro/pcsx_rearmed.git" "libretro-pcsx_rearmed" "libretro/pcsx_rearmed" fetch_project "$REPO_BASE/libretro/beetle-gba-libretro.git" "libretro-beetle-gba" "libretro/Beetle GBA" fetch_project "$REPO_BASE/libretro/beetle-lynx-libretro.git" "libretro-beetle-lynx" "libretro/Beetle Lynx" fetch_project "$REPO_BASE/libretro/beetle-ngp-libretro.git" "libretro-beetle-ngp" "libretro/Beetle NGP"