From 4b6033f3aac6e9f209b779ab292023591389ecfa Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 24 Feb 2015 18:38:00 -0800 Subject: [PATCH 1/2] Move core fetch rule variables to their own file --- core-rules.sh | 192 +++++++++++++++++++++++++++++++++++++++++++++ libretro-fetch.sh | 194 +--------------------------------------------- 2 files changed, 194 insertions(+), 192 deletions(-) create mode 100644 core-rules.sh diff --git a/core-rules.sh b/core-rules.sh new file mode 100644 index 00000000..f1af6284 --- /dev/null +++ b/core-rules.sh @@ -0,0 +1,192 @@ +# vim: set ts=3 sw=3 noet ft=sh : bash + + +libretro_bsnes_fetch_url="https://github.com/libretro/bsnes-libretro.git" +libretro_bsnes_name="bsnes/higan" + +libretro_snes9x_fetch_url="https://github.com/libretro/snes9x.git" +libretro_snes9x_name="SNES9x" + +libretro_snes9x_next_fetch_url="https://github.com/libretro/snes9x-next.git" +libretro_snes9x_next_name="SNES9x Next" + +libretro_genesis_plus_gx_fetch_url="https://github.com/libretro/Genesis-Plus-GX.git" +libretro_genesis_plus_gx_name="Genesis Plus GX" + +libretro_fb_alpha_fetch_url="https://github.com/libretro/fba-libretro.git" +libretro_fb_alpha_name="Final Burn Alpha" + +libretro_vba_next_fetch_url="https://github.com/libretro/vba-next.git" +libretro_vba_next_name="VBA Next" + +libretro_vbam_fetch_url="https://github.com/libretro/vbam-libretro.git" +libretro_vbam_name="VBA-M" + +libretro_handy_fetch_url="https://github.com/libretro/libretro-handy.git" +libretro_handy_name="Handy" + +libretro_bnes_fetch_url="https://github.com/libretro/bnes-libretro.git" +libretro_bnes_name="bnes/higan" + +libretro_fceumm_fetch_url="https://github.com/libretro/libretro-fceumm.git" +libretro_fceumm_name="FCEUmm" + +libretro_gambatte_fetch_url="https://github.com/libretro/gambatte-libretro.git" +libretro_gambatte_name="Gambatte" + +libretro_meteor_fetch_url="https://github.com/libretro/meteor-libretro.git" +libretro_meteor_name="Meteor" + +libretro_nxengine_fetch_url="https://github.com/libretro/nxengine-libretro.git" +libretro_nxengine_name="NXEngine" + +libretro_prboom_fetch_url="https://github.com/libretro/libretro-prboom.git" +libretro_prboom_name="PrBoom" + +libretro_stella_fetch_url="https://github.com/libretro/stella-libretro.git" +libretro_stella_name="Stella" + +libretro_desmume_fetch_url="https://github.com/libretro/desmume.git" +libretro_desmume_name="DeSmuME" + +libretro_quicknes_fetch_url="https://github.com/libretro/QuickNES_Core.git" +libretro_quicknes_name="QuickNES" + +libretro_nestopia_fetch_url="https://github.com/libretro/nestopia.git" +libretro_nestopia_name="Nestopia" + +libretro_tyrquake_fetch_url="https://github.com/libretro/tyrquake.git" +libretro_tyrquake_name="TyrQuake" + +libretro_pcsx_rearmed_fetch_url="https://github.com/libretro/pcsx_rearmed.git" +libretro_pcsx_rearmed_name="PCSX ReARMed" + +libretro_mednafen_gba_fetch_url="https://github.com/libretro/beetle-gba-libretro.git" +libretro_mednafen_gba_name="Mednafen/Beetle GBA" + +libretro_mednafen_lynx_fetch_url="https://github.com/libretro/beetle-lynx-libretro.git" +libretro_mednafen_lynx_name="Mednafen/Beetle Lynx" + +libretro_mednafen_ngp_fetch_url="https://github.com/libretro/beetle-ngp-libretro.git" +libretro_mednafen_ngp_name="Mednafen/Beetle NeoPop" + +libretro_mednafen_pce_fast_fetch_url="https://github.com/libretro/beetle-pce-fast-libretro.git" +libretro_mednafen_pce_fast_name="Mednafen/Beetle PCE FAST" + +libretro_mednafen_supergrafx_fetch_url="https://github.com/libretro/beetle-supergrafx-libretro.git" +libretro_mednafen_supergrafx_name="Mednafen/Beetle SuperGrafx" + +libretro_mednafen_psx_fetch_url="https://github.com/libretro/mednafen-psx-libretro.git" +libretro_mednafen_psx_name="Mednafen PSX" + +libretro_mednafen_pcfx_fetch_url="https://github.com/libretro/beetle-pcfx-libretro.git" +libretro_mednafen_pcfx_name="Mednafen/Beetle PC-FX" + +libretro_mednafen_snes_fetch_url="https://github.com/libretro/beetle-bsnes-libretro.git" +libretro_mednafen_snes_name="Mednafen/Beetle bsnes" + +libretro_mednafen_vb_fetch_url="https://github.com/libretro/beetle-vb-libretro.git" +libretro_mednafen_vb_name="Mednafen/Beetle VB" + +libretro_mednafen_wswan_fetch_url="https://github.com/libretro/beetle-wswan-libretro.git" +libretro_mednafen_wswan_name="Mednafen/Beetle WonderSwan" + +libretro_scummvm_fetch_url="https://github.com/libretro/scummvm.git" +libretro_scummvm_name="ScummVM" + +libretro_yabause_fetch_url="https://github.com/libretro/yabause.git" +libretro_yabause_name="Yabause" + +libretro_dosbox_fetch_url="https://github.com/libretro/dosbox-libretro.git" +libretro_dosbox_name="DOSBox" + +libretro_virtualjaguar_fetch_url="https://github.com/libretro/virtualjaguar-libretro.git" +libretro_virtualjaguar_name="Virtual Jaguar" + +libretro_mame078_fetch_url="https://github.com/libretro/mame2003-libretro.git" +libretro_mame078_name="MAME 2003 (0.78)" + +libretro_mame139_fetch_url="https://github.com/libretro/mame2010-libretro.git" +libretro_mame139_name="MAME 2010 (0.139)" + +libretro_mame_fetch_url="https://github.com/libretro/mame.git" +libretro_mame_name="MAME (git)" + +libretro_ffmpeg_fetch_url="https://github.com/libretro/FFmpeg.git" +libretro_ffmpeg_name="FFmpeg" + +libretro_bsnes_cplusplus98_fetch_url="https://github.com/libretro/bsnes-libretro-cplusplus98.git" +libretro_bsnes_cplusplus98_name="bsnes C++98 (v0.85)" + +libretro_bsnes_mercury_fetch_url="https://github.com/libretro/bsnes-mercury.git" +libretro_bsnes_mercury_name="bsnes-mercury" + +libretro_picodrive_fetch_url="https://github.com/libretro/picodrive.git" +libretro_picodrive_name="Picodrive" +libretro_picodrive_git_submodules="1" +libretro_picodrive_git_submodules_update="1" + +libretro_tgbdual_fetch_url="https://github.com/libretro/tgbdual-libretro.git" +libretro_tgbdual_name="TGB Dual" + +libretro_mupen64plus_fetch_url="https://github.com/libretro/mupen64plus-libretro.git" +libretro_mupen64plus_name="Mupen64Plus" + +libretro_dinothawr_fetch_url="https://github.com/libretro/Dinothawr.git" +libretro_dinothawr_name="Dinothawr" + +libretro_uae_fetch_url="https://github.com/libretro/libretro-uae.git" +libretro_uae_name="UAE" + +libretro_3dengine_fetch_url="https://github.com/libretro/libretro-3dengine.git" +libretro_3dengine_name="3DEngine" + +libretro_remotejoy_fetch_url="https://github.com/libretro/libretro-remotejoy.git" +libretro_remotejoy_name="RemoteJoy" + +libretro_bluemsx_fetch_url="https://github.com/libretro/blueMSX-libretro.git" +libretro_bluemsx_name="blueMSX" + +libretro_fmsx_fetch_url="https://github.com/libretro/fmsx-libretro.git" +libretro_fmsx_name="fMSX" + +libretro_2048_fetch_url="https://github.com/libretro/libretro-2048.git" + +libretro_vecx_fetch_url="https://github.com/libretro/libretro-vecx.git" + +libretro_ppsspp_fetch_url="https://github.com/libretro/ppsspp.git" +libretro_ppsspp_name="PPSSPP" +libretro_ppsspp_git_submodules="1" +libretro_ppsspp_git_submodules_update="1" + +libretro_prosystem_fetch_url="https://github.com/libretro/prosystem-libretro.git" +libretro_prosystem_name="ProSystem" + +libretro_o2em_fetch_url="https://github.com/libretro/libretro-o2em.git" +libretro_o2em_name="O2EM" + +libretro_4do_fetch_url="https://github.com/libretro/4do-libretro.git" +libretro_4do_name="4DO" + +libretro_catsfc_fetch_url="https://github.com/libretro/CATSFC-libretro.git" +libretro_catsfc_name="CATSFC" + +libretro_stonesoup_fetch_url="https://github.com/libretro/crawl-ref.git" +libretro_stonesoup_name="Dungeon Crawl Stone Soup" +libretro_stonesoup_git_submodules="1" + +libretro_hatari_fetch_url="https://github.com/libretro/hatari.git" +libretro_hatari_name="Hatari" + +libretro_tempgba_fetch_url="https://github.com/libretro/TempGBA-libretro.git" +libretro_tempgba_name="TempGBA" + +libretro_gpsp_fetch_url="https://github.com/libretro/gpsp.git" +libretro_gpsp_name="gpSP" + +libretro_emux_fetch_url="https://github.com/libretro/emux.git" +libretro_emux_name="Emux" + +libretro_fuse_fetch_url="https://github.com/libretro/fuse-libretro.git" +libretro_fuse_name="Fuse" + diff --git a/libretro-fetch.sh b/libretro-fetch.sh index fd303474..b1b42077 100755 --- a/libretro-fetch.sh +++ b/libretro-fetch.sh @@ -17,198 +17,8 @@ fi . "$BASE_DIR/libretro-config.sh" . "$BASE_DIR/script-modules/fetch-rules.sh" - -# TODO: Move all of these rules to their own file - -libretro_bsnes_fetch_url="https://github.com/libretro/bsnes-libretro.git" -libretro_bsnes_name="bsnes/higan" - -libretro_snes9x_fetch_url="https://github.com/libretro/snes9x.git" -libretro_snes9x_name="SNES9x" - -libretro_snes9x_next_fetch_url="https://github.com/libretro/snes9x-next.git" -libretro_snes9x_next_name="SNES9x Next" - -libretro_genesis_plus_gx_fetch_url="https://github.com/libretro/Genesis-Plus-GX.git" -libretro_genesis_plus_gx_name="Genesis Plus GX" - -libretro_fb_alpha_fetch_url="https://github.com/libretro/fba-libretro.git" -libretro_fb_alpha_name="Final Burn Alpha" - -libretro_vba_next_fetch_url="https://github.com/libretro/vba-next.git" -libretro_vba_next_name="VBA Next" - -libretro_vbam_fetch_url="https://github.com/libretro/vbam-libretro.git" -libretro_vbam_name="VBA-M" - -libretro_handy_fetch_url="https://github.com/libretro/libretro-handy.git" -libretro_handy_name="Handy" - -libretro_bnes_fetch_url="https://github.com/libretro/bnes-libretro.git" -libretro_bnes_name="bnes/higan" - -libretro_fceumm_fetch_url="https://github.com/libretro/libretro-fceumm.git" -libretro_fceumm_name="FCEUmm" - -libretro_gambatte_fetch_url="https://github.com/libretro/gambatte-libretro.git" -libretro_gambatte_name="Gambatte" - -libretro_meteor_fetch_url="https://github.com/libretro/meteor-libretro.git" -libretro_meteor_name="Meteor" - -libretro_nxengine_fetch_url="https://github.com/libretro/nxengine-libretro.git" -libretro_nxengine_name="NXEngine" - -libretro_prboom_fetch_url="https://github.com/libretro/libretro-prboom.git" -libretro_prboom_name="PrBoom" - -libretro_stella_fetch_url="https://github.com/libretro/stella-libretro.git" -libretro_stella_name="Stella" - -libretro_desmume_fetch_url="https://github.com/libretro/desmume.git" -libretro_desmume_name="DeSmuME" - -libretro_quicknes_fetch_url="https://github.com/libretro/QuickNES_Core.git" -libretro_quicknes_name="QuickNES" - -libretro_nestopia_fetch_url="https://github.com/libretro/nestopia.git" -libretro_nestopia_name="Nestopia" - -libretro_tyrquake_fetch_url="https://github.com/libretro/tyrquake.git" -libretro_tyrquake_name="TyrQuake" - -libretro_pcsx_rearmed_fetch_url="https://github.com/libretro/pcsx_rearmed.git" -libretro_pcsx_rearmed_name="PCSX ReARMed" - -libretro_mednafen_gba_fetch_url="https://github.com/libretro/beetle-gba-libretro.git" -libretro_mednafen_gba_name="Mednafen/Beetle GBA" - -libretro_mednafen_lynx_fetch_url="https://github.com/libretro/beetle-lynx-libretro.git" -libretro_mednafen_lynx_name="Mednafen/Beetle Lynx" - -libretro_mednafen_ngp_fetch_url="https://github.com/libretro/beetle-ngp-libretro.git" -libretro_mednafen_ngp_name="Mednafen/Beetle NeoPop" - -libretro_mednafen_pce_fast_fetch_url="https://github.com/libretro/beetle-pce-fast-libretro.git" -libretro_mednafen_pce_fast_name="Mednafen/Beetle PCE FAST" - -libretro_mednafen_supergrafx_fetch_url="https://github.com/libretro/beetle-supergrafx-libretro.git" -libretro_mednafen_supergrafx_name="Mednafen/Beetle SuperGrafx" - -libretro_mednafen_psx_fetch_url="https://github.com/libretro/mednafen-psx-libretro.git" -libretro_mednafen_psx_name="Mednafen PSX" - -libretro_mednafen_pcfx_fetch_url="https://github.com/libretro/beetle-pcfx-libretro.git" -libretro_mednafen_pcfx_name="Mednafen/Beetle PC-FX" - -libretro_mednafen_snes_fetch_url="https://github.com/libretro/beetle-bsnes-libretro.git" -libretro_mednafen_snes_name="Mednafen/Beetle bsnes" - -libretro_mednafen_vb_fetch_url="https://github.com/libretro/beetle-vb-libretro.git" -libretro_mednafen_vb_name="Mednafen/Beetle VB" - -libretro_mednafen_wswan_fetch_url="https://github.com/libretro/beetle-wswan-libretro.git" -libretro_mednafen_wswan_name="Mednafen/Beetle WonderSwan" - -libretro_scummvm_fetch_url="https://github.com/libretro/scummvm.git" -libretro_scummvm_name="ScummVM" - -libretro_yabause_fetch_url="https://github.com/libretro/yabause.git" -libretro_yabause_name="Yabause" - -libretro_dosbox_fetch_url="https://github.com/libretro/dosbox-libretro.git" -libretro_dosbox_name="DOSBox" - -libretro_virtualjaguar_fetch_url="https://github.com/libretro/virtualjaguar-libretro.git" -libretro_virtualjaguar_name="Virtual Jaguar" - -libretro_mame078_fetch_url="https://github.com/libretro/mame2003-libretro.git" -libretro_mame078_name="MAME 2003 (0.78)" - -libretro_mame139_fetch_url="https://github.com/libretro/mame2010-libretro.git" -libretro_mame139_name="MAME 2010 (0.139)" - -libretro_mame_fetch_url="https://github.com/libretro/mame.git" -libretro_mame_name="MAME (git)" - -libretro_ffmpeg_fetch_url="https://github.com/libretro/FFmpeg.git" -libretro_ffmpeg_name="FFmpeg" - -libretro_bsnes_cplusplus98_fetch_url="https://github.com/libretro/bsnes-libretro-cplusplus98.git" -libretro_bsnes_cplusplus98_name="bsnes C++98 (v0.85)" - -libretro_bsnes_mercury_fetch_url="https://github.com/libretro/bsnes-mercury.git" -libretro_bsnes_mercury_name="bsnes-mercury" - -libretro_picodrive_fetch_url="https://github.com/libretro/picodrive.git" -libretro_picodrive_name="Picodrive" -libretro_picodrive_git_submodules="1" -libretro_picodrive_git_submodules_update="1" - -libretro_tgbdual_fetch_url="https://github.com/libretro/tgbdual-libretro.git" -libretro_tgbdual_name="TGB Dual" - -libretro_mupen64plus_fetch_url="https://github.com/libretro/mupen64plus-libretro.git" -libretro_mupen64plus_name="Mupen64Plus" - -libretro_dinothawr_fetch_url="https://github.com/libretro/Dinothawr.git" -libretro_dinothawr_name="Dinothawr" - -libretro_uae_fetch_url="https://github.com/libretro/libretro-uae.git" -libretro_uae_name="UAE" - -libretro_3dengine_fetch_url="https://github.com/libretro/libretro-3dengine.git" -libretro_3dengine_name="3DEngine" - -libretro_remotejoy_fetch_url="https://github.com/libretro/libretro-remotejoy.git" -libretro_remotejoy_name="RemoteJoy" - -libretro_bluemsx_fetch_url="https://github.com/libretro/blueMSX-libretro.git" -libretro_bluemsx_name="blueMSX" - -libretro_fmsx_fetch_url="https://github.com/libretro/fmsx-libretro.git" -libretro_fmsx_name="fMSX" - -libretro_2048_fetch_url="https://github.com/libretro/libretro-2048.git" - -libretro_vecx_fetch_url="https://github.com/libretro/libretro-vecx.git" - -libretro_ppsspp_fetch_url="https://github.com/libretro/ppsspp.git" -libretro_ppsspp_name="PPSSPP" -libretro_ppsspp_git_submodules="1" -libretro_ppsspp_git_submodules_update="1" - -libretro_prosystem_fetch_url="https://github.com/libretro/prosystem-libretro.git" -libretro_prosystem_name="ProSystem" - -libretro_o2em_fetch_url="https://github.com/libretro/libretro-o2em.git" -libretro_o2em_name="O2EM" - -libretro_4do_fetch_url="https://github.com/libretro/4do-libretro.git" -libretro_4do_name="4DO" - -libretro_catsfc_fetch_url="https://github.com/libretro/CATSFC-libretro.git" -libretro_catsfc_name="CATSFC" - -libretro_stonesoup_fetch_url="https://github.com/libretro/crawl-ref.git" -libretro_stonesoup_name="Dungeon Crawl Stone Soup" -libretro_stonesoup_git_submodules="1" - -libretro_hatari_fetch_url="https://github.com/libretro/hatari.git" -libretro_hatari_name="Hatari" - -libretro_tempgba_fetch_url="https://github.com/libretro/TempGBA-libretro.git" -libretro_tempgba_name="TempGBA" - -libretro_gpsp_fetch_url="https://github.com/libretro/gpsp.git" -libretro_gpsp_name="gpSP" - -libretro_emux_fetch_url="https://github.com/libretro/emux.git" -libretro_emux_name="Emux" - -libretro_fuse_fetch_url="https://github.com/libretro/fuse-libretro.git" -libretro_fuse_name="Fuse" - +# Rules for fetching cores are in this file: +. "$BASE_DIR/core-rules.sh" # libretro_fetch_core: Download the given core using its fetch rules # From 2a35b32016aba8e2119937c5a10d51c8931a0ec3 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Wed, 25 Feb 2015 19:38:52 -0800 Subject: [PATCH 2/2] check_opengl now returns a value we can use --- libretro-build-common.sh | 104 ++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 44 deletions(-) diff --git a/libretro-build-common.sh b/libretro-build-common.sh index def7d978..2d4385cc 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -78,8 +78,8 @@ build_save_revision() { check_opengl() { - if [ "${BUILD_LIBRETRO_GL}" ]; then - if [ "${ENABLE_GLES}" ]; then + 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" @@ -90,7 +90,10 @@ check_opengl() { fi else echo '=== OpenGL disabled in build ===' + return 1 fi + + return 0 } reset_compiler_targets() { @@ -100,6 +103,12 @@ reset_compiler_targets() { build_libretro_pcsx_rearmed_interpreter() { build_dir="$WORKDIR/libretro-pcsx_rearmed" + + if build_should_skip "pcsx_rearmed_interpreter" "$build_dir"; then + echo "Core test is already built, skipping..." + return + fi + if [ -d "$build_dir" ]; then echo '=== Building PCSX ReARMed Interpreter ===' echo_cmd "cd \"$build_dir\"" @@ -110,6 +119,7 @@ build_libretro_pcsx_rearmed_interpreter() { echo_cmd "$MAKE -f Makefile.libretro USE_DYNAREC=0 platform=\"$FORMAT_COMPILER_TARGET\" $COMPILER \"-j$JOBS\"" || die 'Failed to build PCSX ReARMed' echo_cmd "cp \"pcsx_rearmed$CORE_SUFFIX\" \"$RARCH_DIST_DIR/pcsx_rearmed_interpreter${FORMAT}.$FORMAT_EXT\"" build_summary_log $? "pcsx_rearmed_interpreter" + build_save_revision $? "pcsx_rearmed_interpreter" else echo 'PCSX ReARMed not fetched, skipping ...' fi @@ -206,8 +216,10 @@ build_libretro_test() { if [ -d "$build_dir" ]; then echo "=== Building RetroArch test cores ===" - build_libretro_generic "retroarch" "libretro-test-gl" "Makefile" $FORMAT_COMPILER_TARGET "$build_dir" - copy_core_to_dist "testgl" + if check_opengl; then + build_libretro_generic "retroarch" "libretro-test-gl" "Makefile" $FORMAT_COMPILER_TARGET "$build_dir" + copy_core_to_dist "testgl" + fi build_libretro_generic "retroarch" "libretro-test" "Makefile" $FORMAT_COMPILER_TARGET "$build_dir" copy_core_to_dist "test" @@ -428,15 +440,17 @@ build_libretro_fb_alpha() { } build_libretro_ffmpeg() { - check_opengl - build_libretro_generic_makefile "ffmpeg" "libretro" "Makefile" $FORMAT_COMPILER_TARGET - reset_compiler_targets + if check_opengl; then + build_libretro_generic_makefile "ffmpeg" "libretro" "Makefile" $FORMAT_COMPILER_TARGET + reset_compiler_targets + fi } build_libretro_3dengine() { - check_opengl - build_libretro_generic_makefile "3dengine" "." "Makefile" $FORMAT_COMPILER_TARGET - reset_compiler_targets + if check_opengl; then + build_libretro_generic_makefile "3dengine" "." "Makefile" $FORMAT_COMPILER_TARGET + reset_compiler_targets + fi } build_libretro_scummvm() { @@ -444,9 +458,10 @@ build_libretro_scummvm() { } build_libretro_ppsspp() { - check_opengl - build_libretro_generic_makefile "ppsspp" "libretro" "Makefile" $FORMAT_COMPILER_TARGET - reset_compiler_targets + if check_opengl; then + build_libretro_generic_makefile "ppsspp" "libretro" "Makefile" $FORMAT_COMPILER_TARGET + reset_compiler_targets + fi } build_libretro_mame_modern() { @@ -617,42 +632,43 @@ build_libretro_bnes() { } build_libretro_mupen64() { - check_opengl - build_dir="$WORKDIR/libretro-mupen64plus" + if check_opengl; then + build_dir="$WORKDIR/libretro-mupen64plus" - if build_should_skip mupen64plus "$build_dir"; then - echo "Core mupen64plus is already built, skipping..." - return - fi - - if [ -d "$build_dir" ]; then - echo_cmd "cd \"$build_dir\"" - - mkdir -p obj - - if iscpu_x86_64 $ARCH; then - dynarec="WITH_DYNAREC=x86_64" - elif iscpu_x86 $ARCH; then - dynarec="WITH_DYNAREC=x86" - elif [ "${CORTEX_A8}" ] || [ "${CORTEX_A9}" ] || [ "$platform" = "ios" ]; then - dynarec="WITH_DYNAREC=arm" + if build_should_skip mupen64plus "$build_dir"; then + echo "Core mupen64plus is already built, skipping..." + return fi - echo '=== Building Mupen 64 Plus ===' - if [ -z "$NOCLEAN" ]; then - echo_cmd "$MAKE $dynarec platform=\"$FORMAT_COMPILER_TARGET_ALT\" \"-j$JOBS\" clean" || die 'Failed to clean Mupen 64' + if [ -d "$build_dir" ]; then + echo_cmd "cd \"$build_dir\"" + + mkdir -p obj + + if iscpu_x86_64 $ARCH; then + dynarec="WITH_DYNAREC=x86_64" + elif iscpu_x86 $ARCH; then + dynarec="WITH_DYNAREC=x86" + elif [ "${CORTEX_A8}" ] || [ "${CORTEX_A9}" ] || [ "$platform" = "ios" ]; then + dynarec="WITH_DYNAREC=arm" + fi + + echo '=== Building Mupen 64 Plus ===' + if [ -z "$NOCLEAN" ]; then + echo_cmd "$MAKE $dynarec platform=\"$FORMAT_COMPILER_TARGET_ALT\" \"-j$JOBS\" clean" || die 'Failed to clean Mupen 64' + fi + + echo_cmd "$MAKE $dynarec platform=\"$FORMAT_COMPILER_TARGET_ALT\" $COMPILER \"-j$JOBS\"" || die 'Failed to build Mupen 64' + + echo_cmd "cp \"mupen64plus$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" + ret=$? + build_summary_log $ret "mupen64plus" + build_save_revision $ret "mupen64plus" + else + echo 'Mupen64 Plus not fetched, skipping ...' fi - - echo_cmd "$MAKE $dynarec platform=\"$FORMAT_COMPILER_TARGET_ALT\" $COMPILER \"-j$JOBS\"" || die 'Failed to build Mupen 64' - - echo_cmd "cp \"mupen64plus$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" - ret=$? - build_summary_log $ret "mupen64plus" - build_save_revision $ret "mupen64plus" - else - echo 'Mupen64 Plus not fetched, skipping ...' + reset_compiler_targets fi - reset_compiler_targets } build_summary() {