diff options
-rw-r--r-- | backends/platform/psp/Makefile | 2 | ||||
-rw-r--r-- | backends/platform/psp/psp.spec | 2 | ||||
-rwxr-xr-x | configure | 12 |
3 files changed, 14 insertions, 2 deletions
diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile index cf6ad09335..681691236a 100644 --- a/backends/platform/psp/Makefile +++ b/backends/platform/psp/Makefile @@ -128,7 +128,7 @@ PSPLIBS = -lpspvfpu -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspsdk \ # Add in PSPSDK includes and libraries. CXXFLAGS += $(SDLFLAGS) -LIBS += -lpng -lz -lstdc++ -lc $(SDLLIBS) $(PSPLIBS) +LIBS += -lpng -lSDL -lz $(findstring -lGL,$(SDLLIBS)) -lstdc++ -lc -lm $(filter -L%,$(SDLLIBS)) $(PSPLIBS) OBJS := powerman.o \ psp_main.o \ diff --git a/backends/platform/psp/psp.spec b/backends/platform/psp/psp.spec index e319b022f7..688a59e51c 100644 --- a/backends/platform/psp/psp.spec +++ b/backends/platform/psp/psp.spec @@ -1,3 +1,3 @@ %rename lib old_lib *lib: -%(old_lib) -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lz -lstdc++ -lc -lpspdisplay -lpspgu -lpspctrl -lpspsdk -lpspnet -lpspnet_inet -lpsputility -lpspuser -lpsppower +%(old_lib) -lz -lstdc++ -lc -lm -lpspvfpu -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsputility -lpspuser -lpsppower -lpsphprm -lpsprtc -lpspaudio @@ -900,6 +900,12 @@ psp) _host_os=psp _host_cpu=mipsallegrexel _host_alias=psp + if test -z "$PSPDEV"; then + PSPDEV=$(psp-config --pspdev-path) + fi + if test -d "$PSPDEV/psp/lib"; then + LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" + fi LDFLAGS="$LDFLAGS -L$PSPDEV/psp/sdk/lib -specs=$_srcdir/backends/platform/psp/psp.spec" ;; ps2) @@ -2307,6 +2313,12 @@ case $_backend in DEFINES="$DEFINES -D__PSP__ -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" INCLUDES="$INCLUDES -I$PSPDEV/psp/include/SDL" LIBS="$LIBS -lpng -lSDL" + SDLLIBS=$($PSPDEV/psp/bin/sdl-config --libs) + + if `echo "$SDLLIBS" | grep ".*-lGL.*" 1>/dev/null 2>&1` + then + LIBS="$LIBS -lGL" + fi ;; ps2) # TODO ps2 |