From 67b1aaea61fce1cad781c9851803b52f63355b53 Mon Sep 17 00:00:00 2001 From: AndresSM Date: Wed, 5 Nov 2014 21:34:54 -0800 Subject: [PATCH 1/4] Add more parameters, can now build MAME/MESS and MUPEN64 --- libretro-fetch-and-build.sh | 64 +++++++++++++++++++++++++++++++++---- recipes.win-mingw64-seh | 8 +++++ recipes.win-mingw64-sjlj | 3 ++ 3 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 recipes.win-mingw64-seh create mode 100644 recipes.win-mingw64-sjlj diff --git a/libretro-fetch-and-build.sh b/libretro-fetch-and-build.sh index 3decfe55..c0a364fd 100644 --- a/libretro-fetch-and-build.sh +++ b/libretro-fetch-and-build.sh @@ -11,6 +11,18 @@ echo configuring build environment . ./libretro-config.sh +echo +[[ "${ARM_NEON}" ]] && echo 'ARM NEON opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon" +[[ "${CORTEX_A8}" ]] && echo 'Cortex A8 opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa8" +[[ "${CORTEX_A9}" ]] && echo 'Cortex A9 opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa9" +[[ "${ARM_HARDFLOAT}" ]] && echo 'ARM hardfloat ABI enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-hardfloat" +[[ "${ARM_SOFTFLOAT}" ]] && echo 'ARM softfloat ABI enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-softfloat" +[[ "${IOS}" ]] && echo 'iOS detected...' + +echo "${FORMAT_COMPILER_TARGET}" +echo "${FORMAT_COMPILER_TARGET_ALT}" + + # BSDs don't have readlink -f read_link() { @@ -88,6 +100,32 @@ echo "CXX = $CXX" echo "STRIP = $STRIP" echo +RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET +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 ===' + fi +} + +reset_compiler_targets() { + export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET + export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT +} + + + cd "${BASE_DIR}" ####build commands @@ -99,7 +137,7 @@ build_libretro_generic_makefile() { SUBDIR=$3 MAKEFILE=$4 PLATFORM=$5 - SILENT=$5 + ARGS=$6 cd $DIR cd $SUBDIR @@ -118,8 +156,15 @@ build_libretro_generic_makefile() { fi echo "compiling..." - echo "buid command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS}" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} + if [ -z ${ARGS} ]; + then + echo "buid command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} + else + echo "buid command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS} + fi + if [ $? -eq 0 ]; then echo success! @@ -130,9 +175,12 @@ build_libretro_generic_makefile() { } - #fetch a project and mark it for building if there have been any changes +#sleep 10 +echo +echo + while read line; do NAME=`echo $line | cut --fields=1 --delimiter=" "` @@ -153,8 +201,6 @@ while read line; do echo ENABLED: $ENABLED echo COMMAND: $COMMAND echo MAKEFILE: $MAKEFILE - echo - echo ARGS="" @@ -177,6 +223,8 @@ while read line; do fi echo ARGS: $ARGS + echo + echo if [ -d "${DIR}/.git" ]; then @@ -202,15 +250,17 @@ while read line; do then echo building core... if [ "${COMMAND}" == "GENERIC" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" fi else echo core already up-to-date... fi + echo fi cd "${BASE_DIR}" + done < $1 diff --git a/recipes.win-mingw64-seh b/recipes.win-mingw64-seh new file mode 100644 index 00000000..c8960faa --- /dev/null +++ b/recipes.win-mingw64-seh @@ -0,0 +1,8 @@ +fb_alpha libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk +fba_cores_cps1 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps1 +fba_cores_cps2 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps2 +fba_cores_neo libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/neogeo +mupen64plus libretro-mupen64plus https://github.com/libretro/mupen64plus-libretro.git project NO GENERIC Makefile . WITH_DYNAREC='x86_64' +nestopia libretro-nestopia https://github.com/libretro/nestopia.git project NO GENERIC Makefile libretro +pcsx_rearmed libretro-pcsx_rearmed https://github.com/libretro/pcsx_rearmed.git project NO GENERIC Makefile.libretro . USE_DYNAREC=0 TEST=1 +tgbdual libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git project NO GENERIC Makefile . diff --git a/recipes.win-mingw64-sjlj b/recipes.win-mingw64-sjlj new file mode 100644 index 00000000..714be45b --- /dev/null +++ b/recipes.win-mingw64-sjlj @@ -0,0 +1,3 @@ +mame libretro-mame https://github.com/libretro/mame.git project YES GENERIC Makefile.libretro . TARGET=mame PTR64=1 +mame libretro-mame https://github.com/libretro/mame.git project YES GENERIC Makefile.libretro . TARGET=mess PTR64=1 +mame libretro-mame https://github.com/libretro/mame.git project YES GENERIC Makefile.libretro . TARGET=ume PTR64=1 From 9c4fc2819dc133e1dfbe6e964cb309afc59bece7 Mon Sep 17 00:00:00 2001 From: AndresSM Date: Wed, 5 Nov 2014 22:21:26 -0800 Subject: [PATCH 2/4] add additional recipes --- libretro-fetch-and-build.sh | 53 +++++++++++++++++++++++++++++++++++++ recipes.win-mingw64-seh | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/libretro-fetch-and-build.sh b/libretro-fetch-and-build.sh index c0a364fd..62b09121 100644 --- a/libretro-fetch-and-build.sh +++ b/libretro-fetch-and-build.sh @@ -175,6 +175,56 @@ build_libretro_generic_makefile() { } +build_libretro_generic_gl_makefile() { + + + NAME=$1 + DIR=$2 + SUBDIR=$3 + MAKEFILE=$4 + PLATFORM=$5 + ARGS=$6 + + cd $DIR + cd $SUBDIR + + check_opengl + + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} clean" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} clean + if [ $? -eq 0 ]; + then + echo success! + else + echo error while cleaning up + fi + fi + + echo "compiling..." + if [ -z ${ARGS} ]; + then + echo "buid command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} + else + echo "buid command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS} + fi + + if [ $? -eq 0 ]; + then + echo success! + cp ${NAME}_libretro$FORMAT.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro$FORMAT.${FORMAT_EXT} + else + echo error while compiling $1 + fi + + reset_compiler_targets + +} + #fetch a project and mark it for building if there have been any changes #sleep 10 @@ -251,6 +301,9 @@ while read line; do echo building core... if [ "${COMMAND}" == "GENERIC" ]; then build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + elif [ "${COMMAND}" == "GL" ]; then + build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + fi else echo core already up-to-date... diff --git a/recipes.win-mingw64-seh b/recipes.win-mingw64-seh index c8960faa..599043e5 100644 --- a/recipes.win-mingw64-seh +++ b/recipes.win-mingw64-seh @@ -2,7 +2,7 @@ fb_alpha libretro-fba https://github.com/libretro/fba-libretro.git project NO GE fba_cores_cps1 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps1 fba_cores_cps2 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps2 fba_cores_neo libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/neogeo -mupen64plus libretro-mupen64plus https://github.com/libretro/mupen64plus-libretro.git project NO GENERIC Makefile . WITH_DYNAREC='x86_64' +mupen64plus libretro-mupen64plus https://github.com/libretro/mupen64plus-libretro.git project YES GL Makefile . WITH_DYNAREC=x86_64 nestopia libretro-nestopia https://github.com/libretro/nestopia.git project NO GENERIC Makefile libretro pcsx_rearmed libretro-pcsx_rearmed https://github.com/libretro/pcsx_rearmed.git project NO GENERIC Makefile.libretro . USE_DYNAREC=0 TEST=1 tgbdual libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git project NO GENERIC Makefile . From e082a47a200e4cf8d351115cd896ef83b2ef54b3 Mon Sep 17 00:00:00 2001 From: AndresSM Date: Wed, 5 Nov 2014 22:24:24 -0800 Subject: [PATCH 3/4] useless file --- buildbot.conf | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 buildbot.conf diff --git a/buildbot.conf b/buildbot.conf deleted file mode 100644 index e6870cda..00000000 --- a/buildbot.conf +++ /dev/null @@ -1,6 +0,0 @@ -tgbdual libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git project NO GENERIC Makefile . -fb_alpha libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk -fba_cores_cps1 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps1 -fba_cores_cps2 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps2 -fba_cores_neo libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/neogeo -pcsx_rearmed libretro-pcsx_rearmed https://github.com/libretro/pcsx_rearmed.git project YES GENERIC Makefile.libretro . USE_DYNAREC=0 TEST=1 From 65cc80daa5d3347998604e627d6e488bad89a0fa Mon Sep 17 00:00:00 2001 From: AndresSM Date: Wed, 5 Nov 2014 22:25:36 -0800 Subject: [PATCH 4/4] add information file:wq --- recipes.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 recipes.txt diff --git a/recipes.txt b/recipes.txt new file mode 100644 index 00000000..2135f38d --- /dev/null +++ b/recipes.txt @@ -0,0 +1,12 @@ +CORENAME COREDIR URL REPOTYPE ENABLED COMMAND MAKEFILE SUBDIR + +EXAMPLES: + +fb_alpha libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk +fba_cores_cps1 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps1 +fba_cores_cps2 libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/cps2 +fba_cores_neo libretro-fba https://github.com/libretro/fba-libretro.git project NO GENERIC makefile.libretro svn-current/trunk/fbacores/neogeo +mupen64plus libretro-mupen64plus https://github.com/libretro/mupen64plus-libretro.git project YES GL Makefile . WITH_DYNAREC=x86_64 +nestopia libretro-nestopia https://github.com/libretro/nestopia.git project NO GENERIC Makefile libretro +pcsx_rearmed libretro-pcsx_rearmed https://github.com/libretro/pcsx_rearmed.git project NO GENERIC Makefile.libretro . USE_DYNAREC=0 TEST=1 +tgbdual libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git project NO GENERIC Makefile .