Ticket #9115: patch.diff
File patch.diff, 4.6 KB (added by , 14 years ago) |
---|
-
configure
126 126 # Default option behaviour yes/no 127 127 _debug_build=auto 128 128 _release_build=auto 129 _gprof_build=no 129 130 _text_console=no 130 131 _mt32emu=yes 131 132 _build_hq_scalers=yes … … 643 644 644 645 --with-readline-prefix=DIR Prefix where readline is installed (optional) 645 646 --disable-readline disable readline support in text console [autodetect] 647 648 --enable-gprof enable gprof support for profiling Scummvm 646 649 647 650 Some influential environment variables: 648 651 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a … … 754 757 --disable-debug) 755 758 _debug_build=no 756 759 ;; 760 --enable-gprof) 761 _gprof_build=yes 762 ;; 757 763 --enable-Werror) 758 764 CXXFLAGS="$CXXFLAGS -Werror" 759 765 ;; … … 959 965 CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized" 960 966 fi 961 967 962 963 968 # 964 969 # Determine extension used for executables 965 970 # … … 1317 1322 DEFINES="$DEFINES -D__DS__ -DNDS -DARM9 -DARM -DNONSTANDARD_PORT" 1318 1323 ;; 1319 1324 psp) 1320 CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include -D_PSP_FW_VERSION=150" 1325 if test "$_gprof_build" = yes; then 1326 CXXFLAGS="$CXXFLAGS -G0 -O0 -I$PSPSDK/include -D_PSP_FW_VERSION=150" 1327 else 1328 CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include -D_PSP_FW_VERSION=150" 1329 fi 1321 1330 ;; 1322 1331 ps2) 1323 1332 # TODO ps2 … … 2182 2191 add_to_config_mk_if_yes $_nasm 'HAVE_NASM = 1' 2183 2192 2184 2193 # 2194 # Determine extra build flags for gprof build 2195 # 2196 2197 if test "$_gprof_build" = yes; then 2198 echo "Configuring for gprof..." 2199 _debug_build=yes 2200 CXXFLAGS="$CXXFLAGS -pg -g" 2201 DEFINES="$DEFINES -DUSE_GPROF" 2202 fi 2203 2204 # 2185 2205 # Enable vkeybd / keymapper 2186 2206 # 2187 2207 if test "$_vkeybd" = yes ; then … … 2319 2339 then 2320 2340 LIBS="$LIBS -lGL" 2321 2341 fi 2342 if test "$_gprof_build" = yes; then 2343 LIBS="$LIBS -pg -lpspprof" 2344 fi 2322 2345 ;; 2323 2346 ps2) 2324 2347 # TODO ps2 -
backends/platform/psp/psp_main.cpp
42 42 #include "osys_psp.h" 43 43 #include "./trace.h" 44 44 45 #ifdef USE_GPROF 46 #include <pspprof.h> 47 #endif 45 48 46 47 49 /** 48 50 * Define the module info section 49 51 * 50 52 * 2nd arg must 0x1000 so __init is executed in 51 * kernelmode for our loaderInit function 53 * kernelmode for our loaderInit function 52 54 */ 53 55 #ifndef USERSPACE_ONLY 54 56 PSP_MODULE_INFO("SCUMMVM-PSP", 0x1000, 1, 1); … … 83 85 84 86 /** 85 87 * Function that is called from _init in kernelmode before the 86 * main thread is started in usermode. 88 * main thread is started in usermode. 87 89 */ 88 90 __attribute__ ((constructor)) 89 91 void loaderInit() { … … 94 96 95 97 /* Exit callback */ 96 98 int exit_callback(void) { 99 #ifdef USE_GPROF 100 gprof_cleanup(); 101 #endif 97 102 sceKernelExitGame(); 98 103 return 0; 99 104 } -
backends/platform/psp/Makefile
42 42 43 43 #Set to 1 to enable, 0 to disable dynamic modules 44 44 DYNAMIC_MODULES = 1 45 #Set to 1 to enable, 0 to disable gprof building 46 ENABLE_GPROF = 0 45 47 #Set to 1 to enable, 0 to disable libmad and libogg 46 48 USE_LIBMAD = 1 47 49 USE_LIBOGG = 1 … … 61 63 $(error $$(PSPSDK) cannot be obtained.) 62 64 endif 63 65 66 #check gprof 67 ifeq ($(ENABLE_GPROF),1) 68 CXX_DEBUG_FLAGS += -g -pg -G0 69 LD_DEBUG_FLAGS += -pg 70 CXX_OPTIMIZE = -O0 71 PSPLIBS += -lpspprof 72 DEFINES += -DUSE_GPROF 73 else 74 CXX_OPTIMIZE = -O3 75 endif 64 76 65 77 # Variables for common Scummvm makefile 66 78 #CC = psp-gcc 67 79 CXX = psp-g++ 68 CXXFLAGS = -O3-Wall -Wno-multichar -fno-exceptions -fno-rtti69 DEFINES = -D__PSP__ -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DUSE_ZLIB70 LDFLAGS := 80 CXXFLAGS = $(CXX_DEBUG_FLAGS) $(CXX_OPTIMIZE) -Wall -Wno-multichar -fno-exceptions -fno-rtti 81 DEFINES += -D__PSP__ -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DUSE_ZLIB 82 LDFLAGS := $(LD_DEBUG_FLAGS) 71 83 INCDIR := $(srcdir) . $(srcdir)/engines/ $(PSPSDK)/include 72 84 INCLUDES := $(addprefix -I, $(INCDIR)) 73 85 #EXECUTABLE = $(TARGET) … … 123 135 SDLFLAGS := $(shell $(PSPBIN)/sdl-config --cflags) 124 136 SDLLIBS := $(shell $(PSPBIN)/sdl-config --libs) 125 137 # PSP LIBS 126 PSPLIBS = -lpspvfpu -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspsdk \127 -lpsputility -lpspuser -lpsppower -lpsphprm -lpspsdk -lpsprtc -lpspaudio138 PSPLIBS += -lpspvfpu -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspsdk \ 139 -lpsputility -lpspuser -lpsppower -lpsphprm -lpspsdk -lpsprtc -lpspaudio 128 140 129 141 # Add in PSPSDK includes and libraries. 130 142 CXXFLAGS += $(SDLFLAGS)