diff --git a/CMakeLists.txt b/CMakeLists.txt index 29ea8d8be5..23b7e41652 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,12 @@ if (IOS) set(ARM ON) 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) set(ARM ON) endif() @@ -26,7 +32,7 @@ else() # Assume x86 set(X86 ON) endif() -if(ANDROID OR BLACKBERRY OR IOS OR PANDORA) +if(ANDROID OR BLACKBERRY OR IOS OR PANDORA OR MAEMO) set(HEADLESS OFF) elseif(NOT DEFINED HEADLESS) 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(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY}) 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(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}) @@ -99,6 +106,10 @@ if(IOS) add_definitions(-DIOS) endif() +if(MAEMO) + add_definitions(-DMAEMO) +endif() + if(PANDORA) add_definitions(-DPANDORA) endif() @@ -453,7 +464,7 @@ elseif(SDL_FOUND) if(APPLE) set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm) set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY}) - elseif(PANDORA) + elseif(PANDORA OR MAEMO) set(nativeExtraLibs ${nativeExtraLibs} pthread EGL X11) endif() set(TargetBin PPSSPPSDL) diff --git a/Common/Log.h b/Common/Log.h index f0c87936e6..49e38a5457 100644 --- a/Common/Log.h +++ b/Common/Log.h @@ -31,6 +31,10 @@ #define VERBOSE_LEVEL 6 // Noisy debugging - sometimes needed but usually unimportant. #if !defined(_WIN32) && !defined(PANDORA) +#if defined(MAEMO) + //ucontext.h will be then skipped + #define _SYS_UCONTEXT_H 1 +#endif #include #endif diff --git a/Common/MemArena.cpp b/Common/MemArena.cpp index d2d03bd720..1bda3d5891 100644 --- a/Common/MemArena.cpp +++ b/Common/MemArena.cpp @@ -98,7 +98,11 @@ int ashmem_unpin_region(int fd, size_t offset, size_t len) #ifndef _WIN32 // 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"; +#endif #else SYSTEM_INFO sysInfo; #endif diff --git a/Core/MIPS/ARM/ArmJit.h b/Core/MIPS/ARM/ArmJit.h index 1eecffa105..8eee4db9f1 100644 --- a/Core/MIPS/ARM/ArmJit.h +++ b/Core/MIPS/ARM/ArmJit.h @@ -24,6 +24,10 @@ #include "ArmRegCacheFPU.h" #include "ArmAsm.h" +#if defined(MAEMO) +#include "stddef.h" +#endif + namespace MIPSComp { diff --git a/Core/MIPS/ARM/ArmRegCache.cpp b/Core/MIPS/ARM/ArmRegCache.cpp index f3054a7c22..ce2fcaf6b5 100644 --- a/Core/MIPS/ARM/ArmRegCache.cpp +++ b/Core/MIPS/ARM/ArmRegCache.cpp @@ -18,6 +18,10 @@ #include "ArmRegCache.h" #include "ArmEmitter.h" +#if defined(MAEMO) +#include "stddef.h" +#endif + using namespace ArmGen; ArmRegCache::ArmRegCache(MIPSState *mips) : mips_(mips) {