From a93c5c542042b582f2da765aa386772dc8437f01 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 31 Jul 2017 17:09:40 +0300 Subject: * Fix CMake to include PGXP sources. Import updated translations. Includes some small fixes on CMake, such as prettier status messages, host and target arch detection (taken from PCSX2), and various other small errors. --- libpcsxcore/CMakeLists.txt | 41 ++++++++++++++++++++++++---------------- libpcsxcore/ix86/iR3000A.c | 6 +++--- libpcsxcore/ix86_64/iR3000A-64.c | 6 +++--- 3 files changed, 31 insertions(+), 22 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/CMakeLists.txt b/libpcsxcore/CMakeLists.txt index b1643755..a3a0fd34 100644 --- a/libpcsxcore/CMakeLists.txt +++ b/libpcsxcore/CMakeLists.txt @@ -1,4 +1,4 @@ -message("Configuring core") +message(STATUS "* Configuring core") set(DYNAREC "auto" CACHE STRING "Build dynarec for arch.") set_property(CACHE DYNAREC PROPERTY STRINGS auto x86_64 x86 ppc no) @@ -19,44 +19,47 @@ if (USE_LIBARCHIVE) endif() # Architecture detection and arch specific settings -message(${CMAKE_SYSTEM_PROCESSOR}) -if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^powerpc") +message(STATUS "Building PCSXr on arch " ${CMAKE_SYSTEM_PROCESSOR}) +include(TargetArch) +target_architecture(PCSXR_TARGET_ARCH) +message(STATUS "Targeting arch " ${PCSXR_TARGET_ARCH}) +if (${PCSXR_TARGET_ARCH} MATCHES "ppc") set(_ARCH_PPC 1) -elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i.86") +elseif(${PCSXR_TARGET_ARCH} MATCHES "i386") set(_ARCH_32 1) -elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64") +elseif(${PCSXR_TARGET_ARCH} MATCHES "x86_64") set(_ARCH_64 1) else() - message("Unsupported arch. Will not build dynarec") + message(STATUS "Unsupported arch. Will not build dynarec") add_definitions(-DNOPSXREC) endif() - +set(CMAKE_POSITION_INDEPENDENT_CODE OFF) #for x86 if (${DYNAREC} STREQUAL "auto") if (_ARCH_PPC) set(DYNAREC_PPC 1) - message("Using PPC Dynarec") + message(STATUS "Autodetected PPC dynarec.") elseif(_ARCH_64) set(DYNAREC_64 1) - message("Using x86_64 Dynarec") + message(STATUS "Autodetected x86_64 dynarec.") elseif(_ARCH_32) set(DYNAREC_32 1) - message("Using x86 Dynarec") + message(STATUS "Autodetected x86 dynarec.") endif() elseif (${DYNAREC} STREQUAL "ppc") #if anyone ever fixes ppc dynarec # set(DYNAREC_PPC 1) -# message("Using PPC Dynarec") - message("PPC Dynarec is broken, sorry.") +# message(STATUS "User selected PPC dynarec") + message(STATUS "User selected PPC dynarec is broken, sorry.") add_definitions(-DNOPSXREC) elseif (${DYNAREC} STREQUAL "x86_64") set(DYNAREC_64 1) - message("Using x86_64 Dynarec") + message(STATUS "User selected x86_64 dynarec.") elseif (${DYNAREC} STREQUAL "x86") set(DYNAREC_32 1) - message("Using x86 Dynarec") + message(STATUS "User selected x86 dynarec.") elseif (${DYNAREC} STREQUAL "no") - message("Will not build dynarec") + message(STATUS "User selected to not build dynarec.") add_definitions(-DNOPSXREC) endif() @@ -84,7 +87,13 @@ set(SRCS psxbios.c cdriso.c cheat.c socket.c - ppf.c) + ppf.c + pgxp_cpu.c + pgxp_debug.c + pgxp_gte.c + pgxp_mem.c + pgxp_value.c +) set(LIBS "-lm") diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c index 9e66e9ca..ff806172 100755 --- a/libpcsxcore/ix86/iR3000A.c +++ b/libpcsxcore/ix86/iR3000A.c @@ -25,9 +25,9 @@ #include "ix86.h" #include -#include "pgxp_cpu.h" -#include "pgxp_gte.h" -#include "pgxp_debug.h" +#include "../pgxp_cpu.h" +#include "../pgxp_gte.h" +#include "../pgxp_debug.h" #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON diff --git a/libpcsxcore/ix86_64/iR3000A-64.c b/libpcsxcore/ix86_64/iR3000A-64.c index e1245987..e044e542 100755 --- a/libpcsxcore/ix86_64/iR3000A-64.c +++ b/libpcsxcore/ix86_64/iR3000A-64.c @@ -27,9 +27,9 @@ #include "../r3000a.h" #include "../psxhle.h" -#include "pgxp_cpu.h" -#include "pgxp_gte.h" -#include "pgxp_debug.h" +#include "../pgxp_cpu.h" +#include "../pgxp_gte.h" +#include "../pgxp_debug.h" #include -- cgit v1.2.3