Fix to issue #114: FORMAT_COMPILER_TARGET_ALT is being used now for the OpenGL cases

Problem: at the stage of the o2em building, the "-opengl" suffix was
added a lot of times to FORMAT_COMPILER_TARGET variable breaking the platform
detection in the o2em Makefile, preventing the fpic option to be added to the
command line of the compiler
This commit is contained in:
tomgar 2014-10-04 13:30:03 +01:00
parent 0aa0417ba0
commit c1f950767e

View File

@ -22,24 +22,23 @@ echo "Compiler: ${COMPILER}"
[[ "${X86}" ]] && [[ "${X86_64}" ]] && echo '=== x86_64 CPU detected... ==='
[[ "${IOS}" ]] && echo '=== iOS =='
# Plain compiler target
echo "${FORMAT_COMPILER_TARGET}"
# Alternative - currently just for OpenGL
echo "${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}"
# Checking OpenGL...
if [ "${BUILD_LIBRETRO_GL}" ]; then
if [ "${ENABLE_GLES}" ]; then
echo '=== OpenGL ES enabled ==='
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}-gles"
else
echo '=== OpenGL enabled ==='
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-opengl"
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}"
export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}-opengl"
fi
else
echo '=== OpenGL disabled in build ==='
fi
}
fi
build_libretro_pcsx_rearmed_interpreter() {
cd "${BASE_DIR}"
@ -167,19 +166,19 @@ build_libretro_fmsx() {
}
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}
}
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}
}
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}
}
build_libretro_dinothawr() {
build_libretro_generic_makefile "dinothawr" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
build_libretro_generic_makefile "dinothawr" "." "Makefile" ${FORMAT_COMPILER_TARGET}
}
build_libretro_genesis_plus_gx() {
@ -191,7 +190,7 @@ build_libretro_mame078() {
}
build_libretro_prboom() {
build_libretro_generic_makefile "prboom" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
build_libretro_generic_makefile "prboom" "." "Makefile" ${FORMAT_COMPILER_TARGET}
}
build_libretro_pcsx_rearmed() {
@ -251,7 +250,7 @@ build_libretro_nestopia() {
}
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}
}
build_libretro_yabause() {
@ -279,17 +278,11 @@ build_libretro_fb_alpha() {
}
build_libretro_ffmpeg() {
check_opengl
build_libretro_generic_makefile "ffmpeg" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
# reset check_opengl
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}"
build_libretro_generic_makefile "ffmpeg" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
}
build_libretro_3dengine() {
check_opengl
build_libretro_generic_makefile "3dengine" "." "Makefile" ${FORMAT_COMPILER_TARGET}
# reset check_opengl
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}"
build_libretro_generic_makefile "3dengine" "." "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
}
build_libretro_scummvm() {
@ -297,10 +290,7 @@ build_libretro_scummvm() {
}
build_libretro_ppsspp() {
check_opengl
build_libretro_generic_makefile "ppsspp" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET}
# reset check_opengl
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}"
build_libretro_generic_makefile "ppsspp" "libretro" "Makefile" ${FORMAT_COMPILER_TARGET_ALT}
}
@ -508,7 +498,6 @@ build_libretro_bnes() {
}
build_libretro_mupen64() {
check_opengl
cd "${BASE_DIR}"
if [ -d 'libretro-mupen64plus' ]; then
cd libretro-mupen64plus
@ -543,8 +532,6 @@ build_libretro_mupen64() {
else
echo 'Mupen64 Plus not fetched, skipping ...'
fi
# reset check_opengl
export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}"
}
create_dist_dir() {