Commit 9e747d0d authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Update

parent 7d769d09
#include <stdio.h>
#if !defined(__CELLOS_LV2__) && !defined(__APPLE__)
#if ((!(defined(__PS3__) && !defined(__PSL1GHT))) && !defined(__APPLE__))
#include <malloc.h>
#endif
#include <string.h>
......
......@@ -31,8 +31,6 @@ else ifeq ($(platform),osx_x86)
include $(BUILD_DIR)/Makefile.osx_x86
else ifeq ($(platform),osx_x86_64)
include $(BUILD_DIR)/Makefile.osx_x86_64
else ifeq ($(platform),ps3_ppc)
include $(BUILD_DIR)/Makefile.ps3_ppc
else ifeq ($(platform),wii_ppc)
include $(BUILD_DIR)/Makefile.wii_ppc
else ifeq ($(platform),windows_x86)
......@@ -171,30 +169,6 @@ else ifeq ($(platform), qnx)
AR = QCC -Vgcc_ntoarmv7le
PLATFORM_DEFINES := -D__BLACKBERRY_QNX__ -fexceptions -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
# PS3
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
PLATFORM_DEFINES := -D__CELLOS_LV2__
CFLAGS += -DMSB_FIRST -DWORDS_BIGENDIAN=1
CXXFLAGS += -DMSB_FIRST -DWORDS_BIGENDIAN=1
STATIC_LINKING = 1
HAVE_COMPAT = 1
# sncps3
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CC_AS = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
PLATFORM_DEFINES := -D__CELLOS_LV2__
CFLAGS += -DMSB_FIRST -DWORDS_BIGENDIAN=1
CXXFLAGS += -DMSB_FIRST -DWORDS_BIGENDIAN=1
STATIC_LINKING = 1
HAVE_COMPAT = 1
# Lightweight PS3 Homebrew SDK
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
......@@ -202,7 +176,7 @@ else ifeq ($(platform), psl1ght)
CC_AS = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
PLATFORM_DEFINES := -D__CELLOS_LV2__
PLATFORM_DEFINES := -D__PSL1GHT__ -D__PS3__
CFLAGS += -DMSB_FIRST -DWORDS_BIGENDIAN=1
CXXFLAGS += -DMSB_FIRST -DWORDS_BIGENDIAN=1
STATIC_LINKING = 1
......
##############
# Works on hosts Windows or Linux using Wine
# Install CellSDK
#########################
# Check the host platform
HOST_PLATFORM = linux
ifeq ($(shell uname -a),)
HOST_PLATFORM = windows
else ifneq ($(findstring MINGW,$(shell uname -a)),)
HOST_PLATFORM = windows
else ifneq ($(findstring Darwin,$(shell uname -a)),)
HOST_PLATFORM = darwin
else ifneq ($(findstring win,$(shell uname -a)),)
HOST_PLATFORM = windows
endif
#########################
# Set the target platform
TARGET_PLATFORM = ps3_ppc
#################
# Toolchain setup
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++
AS = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-as
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar
############
# Extensions
OBJEXT = .ps3_ppc.o
SOEXT = .ps3_ppc.so
LIBEXT = .ps3_ppc.a
################
# Platform setup
STATIC_LINKING = 1
platform = ps3
PLATDEFS = -D__CELLOS_LV2__
PLATCFLAGS = -DMSB_FIRST -DWORDS_BIGENDIAN=1
PLATCXXFLAGS = -DMSB_FIRST -DWORDS_BIGENDIAN=1
PLATLDFLAGS = -shared -lm
PLATLDXFLAGS = -shared -lm
################
# libretro setup
RETRODEFS = -D__LIBRETRO__
RETROCFLAGS =
RETROCXXFLAGS =
RETROLDFLAGS =
RETROLDXFLAGS =
#################
# Final variables
DEFINES = $(PLATDEFS) $(RETRODEFS)
CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)
LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
########
# Tuning
ifneq ($(DEBUG),)
CFLAGS += -O0 -g
CXXFLAGS += -O0 -g
else
CFLAGS += -O3 -DNDEBUG
CXXFLAGS += -O3 -DNDEBUG
endif
ifneq ($(LOG_PERFORMANCE),)
CFLAGS += -DLOG_PERFORMANCE
CXXFLAGS += -DLOG_PERFORMANCE
endif
####################################
# Variable setup for Makefile.common
CORE_DIR ?= ..
BUILD_DIR ?= .
INCLUDES =
include $(BUILD_DIR)/Makefile.common
###############
# Include rules
include $(BUILD_DIR)/Makefile.rules
......@@ -762,7 +762,7 @@ int TStrings::Add( const AnsiString str )
return list.size();
}
#if defined( VITA ) || defined( __CELLOS_LV2__ )
#if defined( VITA ) || defined(__PS3__) && !defined( __PSL1GHT__ )
extern "C" char* getcwd( char* buf, size_t size )
{
......
......@@ -69,7 +69,7 @@ extern "C" {
# endif
# endif
# else
# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CELLOS_LV2__)
# if defined(__GNUC__) && __GNUC__ >= 4
# define RETRO_API RETRO_CALLCONV __attribute__((__visibility__("default")))
# else
# define RETRO_API RETRO_CALLCONV
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment