Changeset - r5979:f2e65597f0c9
[Not reviewed]
master
0 3 0
truelight - 18 years ago 2007-02-11 16:28:00
truelight@openttd.org
(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
3 files changed with 11 insertions and 1 deletions:
0 comments (0 inline, 0 general)
Makefile.src.in
Show inline comments
 
@@ -221,13 +221,17 @@ endif
 

	
 
$(BIN_DIR)/$(TTD): $(TTD)
 
	$(Q)cp $< $@
 

	
 
$(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
 

	
 
# The targets to compile the endian-code
 

	
config.lib
Show inline comments
 
@@ -603,12 +603,15 @@ make_cflags_and_ldflags() {
 
	else
 
		OBJS_SUBDIR="debug"
 

	
 
		# 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"
 
		fi
 
		if [ $enable_debug -ge 3 ]; then
 
			CFLAGS="$CFLAGS -O0"
 
@@ -665,12 +668,15 @@ make_cflags_and_ldflags() {
 
	if [ "$os" = "WINCE" ]; then
 
		LIBS="$LIBS -lcoredll -lcorelibc -laygshell -lws2 -e WinMainCRTStartup"
 
	fi
 
	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
 
		# -Wstrict-prototypes generates much noise because of system headers
 
		CFLAGS="$CFLAGS -Wno-strict-prototypes"
 
	fi
src/thread.cpp
Show inline comments
 
@@ -2,13 +2,13 @@
 

	
 
#include "stdafx.h"
 
#include "thread.h"
 
#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(); };
 

	
 
#elif defined(__OS2__)
 

	
0 comments (0 inline, 0 general)