Mercurial > hg > openttd
changeset 5979:ca289345e1d3 draft
(svn r8678) [PSP] -Add: added LIBS and CFLAGS needed to compile PSP
-Fix: PSP needs to link with gcc, not with g++ (don't ask)
-Fix: PSP doens't support threads
author | truelight <truelight@openttd.org> |
---|---|
date | Sun, 11 Feb 2007 16:28:00 +0000 |
parents | 37eabefc0a74 |
children | ec71ee52912e |
files | Makefile.src.in config.lib src/thread.cpp |
diffstat | 3 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.src.in +++ b/Makefile.src.in @@ -224,7 +224,11 @@ $(TTD): rev.o $(OBJS) $(CONFIG_CACHE_LINKER) $(E) '$(STAGE) Linking $@' +ifeq ($(OS), PSP) + $(Q)$(CC_HOST) $(LDFLAGS) rev.o $(OBJS) $(LIBS) -o $@ +else $(Q)$(CXX_HOST) $(LDFLAGS) rev.o $(OBJS) $(LIBS) -o $@ +endif ifdef STRIP $(Q)$(STRIP) $@ endif
--- a/config.lib +++ b/config.lib @@ -606,6 +606,9 @@ # Each debug level reduces the optimalization by a bit if [ $enable_debug -ge 1 ]; then CFLAGS="$CFLAGS -g -D_DEBUG" + if [ "$os" = "PSP" ]; then + CFLAGS="$CFLAGS -G0" + fi fi if [ $enable_debug -ge 2 ]; then CFLAGS="$CFLAGS -fno-inline" @@ -668,6 +671,9 @@ if [ "$os" = "PSP" ]; then CFLAGS="$CFLAGS -I`$psp_config -p`/include" LDFLAGS="$LDFLAGS -L`$psp_config -p`/lib" + + CFLAGS="$CFLAGS -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150" + LIBS="$LIBS -D_PSP_FW_VERSION=150 -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -lm" fi if [ "$os" = "MORPHOS" ]; then
--- a/src/thread.cpp +++ b/src/thread.cpp @@ -5,7 +5,7 @@ #include <stdlib.h> #include "helpers.hpp" -#if defined(__AMIGA__) || defined(__MORPHOS__) || defined(NO_THREADS) +#if defined(__AMIGA__) || defined(__MORPHOS__) || defined(PSP) || defined(NO_THREADS) OTTDThread *OTTDCreateThread(OTTDThreadFunc function, void *arg) { return NULL; } void *OTTDJoinThread(OTTDThread *t) { return NULL; } void OTTDExitThread(void) { NOT_REACHED(); };