Skip to content

Commit

Permalink
configure: enhanced PS2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
sunmax committed Jan 18, 2014
1 parent d687417 commit a2313ae
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions configure
Expand Up @@ -1378,6 +1378,9 @@ ps2)
_host_os=ps2
_host_cpu=mips64r5900el
_host_alias=ee
# PS2 bogus dirs: they actually depend on launch medium
datadir='host:data'
docdir='host:docs'
;;
ps3)
_host_os=ps3
Expand Down Expand Up @@ -2634,17 +2637,21 @@ if test -n "$_host"; then
DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL"
DEFINES="$DEFINES -DDISABLE_SID"
DEFINES="$DEFINES -DDISABLE_NES_APU"
CXXFLAGS="$CXXFLAGS -fno-exceptions"
CXXFLAGS="$CXXFLAGS -fno-rtti"
_backend="ps2"
_build_scalers=no
_mt32emu=no
# HACK to enable mad & zlib (they are not properly detected due to linker issues).
# This trick doesn't work for tremor right now, as the PS2 port the resulting library
# libtremor, while our code later on expects it to be called libvorbisidec.
# TODO: Enable tremor, e.g. by adding -ltremor or by renaming the lib.
_tremor=yes
_mad=yes
_zlib=yes
# HACK to fix compilation of C source files for now.
add_line_to_config_mk 'CC = ee-gcc'
add_line_to_config_mk 'CC := ee-gcc'
add_line_to_config_mk 'CFLAGS := -std=c99 -W -Wno-unused-parameter -Wconversion -pedantic -G2 -s -O2 -Wuninitialized'
# HACK to fix linking for now. It seems ee-g++ does not handle linking correctly.
LD=ee-gcc

Expand Down Expand Up @@ -3162,9 +3169,10 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im
;;
ps2)
_elf_loader=yes
DEFINES="$DEFINES -DUNCACHED_PLUGINS"
_mak_plugins='
LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld
PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc
LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld
PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc
'
;;
psp)
Expand Down Expand Up @@ -3300,6 +3308,8 @@ if test "$_tremor" = yes && test "$_vorbis" = no; then
if test "$_tremolo" = yes ; then
add_line_to_config_h '#define USE_TREMOLO'
LIBS="$LIBS $TREMOR_LIBS -ltremolo"
elif test "$_host" = ps2 ; then
LIBS="-ltremor $LIBS"
else
LIBS="$LIBS $TREMOR_LIBS -lvorbisidec"
fi
Expand Down Expand Up @@ -4055,6 +4065,10 @@ case $_backend in
# without a scummvm sub directory.
DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir\\\""
;;
ps2)
# PS2 bogus dir: it actually depends on launch medium
DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"host:plugins\\\""
;;
*)
DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir/scummvm\\\""
;;
Expand Down

0 comments on commit a2313ae

Please sign in to comment.