mirror of
https://github.com/libretro/vice-libretro.git
synced 2024-11-23 08:19:46 +00:00
PS3/PSL1GHT build fix
This commit is contained in:
parent
0d1cf843e9
commit
05be88915a
20
Makefile
20
Makefile
@ -316,15 +316,18 @@ else ifeq ($(platform), wiiu)
|
||||
STATIC_LINKING = 1
|
||||
|
||||
# Lightweight PS3 Homebrew SDK
|
||||
else ifeq ($(platform), psl1ght)
|
||||
else ifneq (,$(filter $(platform), ps3 psl1ght))
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
|
||||
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
|
||||
CC_AS = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
|
||||
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
|
||||
CC = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
|
||||
CXX = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)g++$(EXE_EXT)
|
||||
CC_AS = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
|
||||
AR = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)ar$(EXE_EXT)
|
||||
OLD_GCC := 1
|
||||
COMMONFLAGS += -DHAVE_STRTOUL -D__PSL1GHT__ -D__PS3__
|
||||
STATIC_LINKING = 1
|
||||
COMMONFLAGS += -D__POWERPC__ -D__ppc__ -D__PS3__ -DWORDS_BIGENDIAN=1 -D__unix__ -DHAVE_STRTOUL -D_NO_CPP_INLINES
|
||||
ifeq ($(platform), psl1ght)
|
||||
COMMONFLAGS += -D__PSL1GHT__
|
||||
endif
|
||||
STATIC_LINKING = 0
|
||||
|
||||
# GCW0
|
||||
else ifeq ($(platform), gcw0)
|
||||
@ -424,6 +427,9 @@ ifeq ($(platform), emscripten)
|
||||
$(CXX) -r $(SHARED) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
else ifeq ($(STATIC_LINKING), 1)
|
||||
$(AR) rcs $@ $(OBJECTS)
|
||||
#STATIC_LINKING=1 and additional Makefile.common sources are incopatible for PS3 environment
|
||||
else ifeq ($(platform), ps3)
|
||||
$(AR) rcs $@ $(OBJECTS)
|
||||
else
|
||||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
endif
|
||||
|
2
deps/nibtools/lz.c
vendored
2
deps/nibtools/lz.c
vendored
@ -97,7 +97,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if !defined(__PS3__) || defined(__PSL1GHT__)
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -38,11 +38,12 @@
|
||||
|
||||
#define chdir(...) 0
|
||||
#define isatty(...) 0
|
||||
#define currentpath "/dev_hdd0/game/SSNE10000/USRDIR"
|
||||
#define tmppath "/dev_hdd0/game/SSNE10000/USRDIR/cores/savefiles"
|
||||
#define currentpath "/dev_hdd0/game/RETROARCH/USRDIR"
|
||||
#define tmppath "/dev_hdd0/game/RETROARCH/USRDIR/cores/savefiles"
|
||||
#define getwd(buffer) (strcpy(buffer, currentpath)) ? (buffer) : (NULL)
|
||||
#define tmpnam(...) (tmppath)
|
||||
#define getenv(...) (NULL)
|
||||
#ifdef __cplusplus
|
||||
#define exp(xval) ::std::exp(xval)
|
||||
#define fabs(xval) ::std::fabs(xval)
|
||||
#define sqrt(xval) ::std::sqrt(xval)
|
||||
@ -55,3 +56,6 @@
|
||||
#define sin(xval) ::std::sin(xval)
|
||||
#define pow(xval, yval) ::std::pow(xval, yval)
|
||||
#endif
|
||||
int access(const char *fpath, int mode);
|
||||
|
||||
#endif
|
||||
|
@ -31,6 +31,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __PS3__
|
||||
#undef local
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined(SN_TARGET_PS3)
|
||||
/* Hack applied for MSVC when compiling in C89 mode
|
||||
|
@ -52,6 +52,10 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__)
|
||||
#include "PS3_include.h"
|
||||
#endif
|
||||
|
||||
#if defined(VITA)
|
||||
#include <psp2/io/stat.h>
|
||||
#endif
|
||||
@ -112,6 +116,12 @@ int gettimeofday(struct timeval* x, int unused)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int access(const char *fpath, int mode)
|
||||
{
|
||||
struct stat buffer;
|
||||
return stat(fpath, &buffer);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -200,6 +200,22 @@ extern char retro_save_directory[512];
|
||||
#define DOCDIR LIBDIR "./doc"
|
||||
#endif
|
||||
|
||||
#ifdef __PS3__
|
||||
#define F_OK 0
|
||||
#define W_OK 0
|
||||
#define R_OK 0
|
||||
#define X_OK 0
|
||||
#define chdir(...) 0
|
||||
#define isatty(...) 0
|
||||
#define currentpath "/dev_hdd0/game/RETROARCH/USRDIR"
|
||||
#define tmppath "/dev_hdd0/game/RETROARCH/USRDIR/savefiles"
|
||||
#define getwd(buffer) (strcpy(buffer, currentpath)) ? (buffer) : (NULL)
|
||||
#define tmpnam(...) (tmppath)
|
||||
#define getenv(...) (NULL)
|
||||
#define VICEUSERDIR "/dev_hdd0/game/RETROARCH/USRDIR/system/vice"
|
||||
int access(const char *fpath, int mode);
|
||||
#else
|
||||
#define VICEUSERDIR ".vice"
|
||||
#endif
|
||||
|
||||
#endif /*_ARCHDEP_H */
|
||||
|
@ -62,7 +62,9 @@ typedef struct cmdhd_context_s {
|
||||
uint8_t preadyff;
|
||||
} cmdhd_context_t;
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
typedef struct cmdhd_context_s cmdhd_context_t;
|
||||
#endif
|
||||
|
||||
extern void cmdhd_shutdown(struct cmdhd_context_s *ctxptr);
|
||||
extern void cmdhd_setup_context(struct diskunit_context_s *ctxptr);
|
||||
|
@ -25,4 +25,8 @@
|
||||
|
||||
#include "siddtvdefs.h"
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#define NEW_8580_FILTER 1
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user