Merge pull request #1046 from aapo/master

Maemo5 support.
This commit is contained in:
Henrik Rydgård 2013-03-22 11:54:30 -07:00
commit 10a1d00f80
5 changed files with 29 additions and 2 deletions

View file

@ -12,6 +12,12 @@ if (IOS)
set(ARM ON) set(ARM ON)
endif() endif()
if (MAEMO)
set(ARM ON)
#Maemo's gcc-4.7.2 is strickt
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
endif()
if(BLACKBERRY) if(BLACKBERRY)
set(ARM ON) set(ARM ON)
endif() endif()
@ -26,7 +32,7 @@ else() # Assume x86
set(X86 ON) set(X86 ON)
endif() endif()
if(ANDROID OR BLACKBERRY OR IOS OR PANDORA) if(ANDROID OR BLACKBERRY OR IOS OR PANDORA OR MAEMO)
set(HEADLESS OFF) set(HEADLESS OFF)
elseif(NOT DEFINED HEADLESS) elseif(NOT DEFINED HEADLESS)
set(HEADLESS ON) set(HEADLESS ON)
@ -39,6 +45,7 @@ option(X86 "Set to ON if targeting an X86 processor" ${X86})
option(ANDROID "Set to ON if targeting an Android device" ${ANDROID}) option(ANDROID "Set to ON if targeting an Android device" ${ANDROID})
option(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY}) option(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY})
option(PANDORA "Set to ON if targeting an OpenPandora device" ${PANDORA}) option(PANDORA "Set to ON if targeting an OpenPandora device" ${PANDORA})
option(MAEMO "Set to ON if targeting an Maemo (N900) device" ${MAEMO})
option(IOS "Set to ON if targeting an iOS device" ${IOS}) option(IOS "Set to ON if targeting an iOS device" ${IOS})
option(USING_GLES2 "Set to ON if target device uses OpenGL ES 2.0" ${USING_GLES2}) option(USING_GLES2 "Set to ON if target device uses OpenGL ES 2.0" ${USING_GLES2})
option(USING_QT_UI "Set to ON if you wish to use the Qt frontend wrapper" ${USING_QT_UI}) option(USING_QT_UI "Set to ON if you wish to use the Qt frontend wrapper" ${USING_QT_UI})
@ -99,6 +106,10 @@ if(IOS)
add_definitions(-DIOS) add_definitions(-DIOS)
endif() endif()
if(MAEMO)
add_definitions(-DMAEMO)
endif()
if(PANDORA) if(PANDORA)
add_definitions(-DPANDORA) add_definitions(-DPANDORA)
endif() endif()
@ -453,7 +464,7 @@ elseif(SDL_FOUND)
if(APPLE) if(APPLE)
set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm) set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm)
set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY}) set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY})
elseif(PANDORA) elseif(PANDORA OR MAEMO)
set(nativeExtraLibs ${nativeExtraLibs} pthread EGL X11) set(nativeExtraLibs ${nativeExtraLibs} pthread EGL X11)
endif() endif()
set(TargetBin PPSSPPSDL) set(TargetBin PPSSPPSDL)

View file

@ -31,6 +31,10 @@
#define VERBOSE_LEVEL 6 // Noisy debugging - sometimes needed but usually unimportant. #define VERBOSE_LEVEL 6 // Noisy debugging - sometimes needed but usually unimportant.
#if !defined(_WIN32) && !defined(PANDORA) #if !defined(_WIN32) && !defined(PANDORA)
#if defined(MAEMO)
//ucontext.h will be then skipped
#define _SYS_UCONTEXT_H 1
#endif
#include <signal.h> #include <signal.h>
#endif #endif

View file

@ -98,7 +98,11 @@ int ashmem_unpin_region(int fd, size_t offset, size_t len)
#ifndef _WIN32 #ifndef _WIN32
// do not make this "static" // do not make this "static"
#ifdef MAEMO
std::string ram_temp_file = "/home/user/.ppsspp/tmp_gc_mem.tmp";
#else
std::string ram_temp_file = "/tmp/gc_mem.tmp"; std::string ram_temp_file = "/tmp/gc_mem.tmp";
#endif
#else #else
SYSTEM_INFO sysInfo; SYSTEM_INFO sysInfo;
#endif #endif

View file

@ -24,6 +24,10 @@
#include "ArmRegCacheFPU.h" #include "ArmRegCacheFPU.h"
#include "ArmAsm.h" #include "ArmAsm.h"
#if defined(MAEMO)
#include "stddef.h"
#endif
namespace MIPSComp namespace MIPSComp
{ {

View file

@ -18,6 +18,10 @@
#include "ArmRegCache.h" #include "ArmRegCache.h"
#include "ArmEmitter.h" #include "ArmEmitter.h"
#if defined(MAEMO)
#include "stddef.h"
#endif
using namespace ArmGen; using namespace ArmGen;
ArmRegCache::ArmRegCache(MIPSState *mips) : mips_(mips) { ArmRegCache::ArmRegCache(MIPSState *mips) : mips_(mips) {