mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
[ORBIS] Clean Makefile and show memory available and used
This commit is contained in:
parent
6974dee535
commit
a5a90a1dc7
@ -13,7 +13,7 @@ PS4_TITLE_NAME := RetroArch
|
|||||||
|
|
||||||
PC_DEVELOPMENT_IP_ADDRESS = 192.168.1.137
|
PC_DEVELOPMENT_IP_ADDRESS = 192.168.1.137
|
||||||
PC_DEVELOPMENT_UDP_PORT = 18194
|
PC_DEVELOPMENT_UDP_PORT = 18194
|
||||||
DEBUG=1
|
|
||||||
AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
|
||||||
OBJ += memory/ps4/user_mem.o \
|
OBJ += memory/ps4/user_mem.o \
|
||||||
@ -106,36 +106,27 @@ ifeq ($(strip $(ORBISDEV)),)
|
|||||||
$(error "Please set ORBISDEV in your environment. export ORBISDEV=<path to>orbisdev")
|
$(error "Please set ORBISDEV in your environment. export ORBISDEV=<path to>orbisdev")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PREFIX :=
|
PREFIX := orbis-
|
||||||
UNAME_S := $(shell uname -s)
|
CC := clang
|
||||||
ifeq ($(UNAME_S),Linux)
|
CXX := clang++
|
||||||
CDIR := linux
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
#PREFIX := /usr/local/opt/llvm/bin/
|
|
||||||
CDIR := macos
|
|
||||||
endif
|
|
||||||
|
|
||||||
CC := $(PREFIX)clang++
|
|
||||||
CXX := $(PREFIX)clang++
|
|
||||||
AS := $(PREFIX)as
|
AS := $(PREFIX)as
|
||||||
AR := $(PREFIX)orbis-ar
|
AR := $(PREFIX)ar
|
||||||
OBJCOPY := $(PREFIX)objcopy
|
OBJCOPY := $(PREFIX)objcopy
|
||||||
STRIP := $(PREFIX)strip
|
STRIP := $(PREFIX)strip
|
||||||
NM := $(PREFIX)nm
|
NM := $(PREFIX)nm
|
||||||
LD := $(PREFIX)clang
|
LD := clang
|
||||||
|
|
||||||
LIBDIRS += -L. -Lcores -Lmemory/ps4 -Lbuild
|
LIBDIRS += -L. -Lcores -Lmemory/ps4 -Lbuild -L$(ORBISDEV)/usr/lib
|
||||||
INCDIRS += -I. -Idefines -Imemory/ps4 -Ideps -Ideps/7zip -Ideps/libz -Ilibretro-common/include -Ideps/stb \
|
INCDIRS += -I. -Idefines -Imemory/ps4 -Ideps -Ideps/7zip -Ideps/libz -Ilibretro-common/include -Ideps/stb \
|
||||||
-Ilibretro-common/include/compat/zlib -Ideps/rcheevos/include -I$(ORBISDEV)/usr/include -I$(ORBISDEV)/usr/include/c++/v1 -I$(ORBISDEV)/usr/include/orbis
|
-Ilibretro-common/include/compat/zlib -Ideps/rcheevos/include -I$(ORBISDEV)/usr/include -I$(ORBISDEV)/usr/include/c++/v1 -I$(ORBISDEV)/usr/include/orbis
|
||||||
|
|
||||||
ARCHFLAGS += -DORBIS -D__PS4__ -D_BSD_SOURCE
|
ARCHFLAGS += --target=x86_64-scei-ps4 -DORBIS -D__PS4__ -D_BSD_SOURCE
|
||||||
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_FILTERS_BUILTIN \
|
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_FILTERS_BUILTIN \
|
||||||
-DHAVE_XMB -DHAVE_RGUI -DHAVE_OZONE \
|
-DHAVE_XMB -DHAVE_RGUI -DHAVE_OZONE \
|
||||||
-DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES -DHAVE_UPDATE_ASSETS \
|
-DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES -DHAVE_UPDATE_ASSETS \
|
||||||
|
|
||||||
# Compiling with -Werror and disabling some warnings
|
# Compiling with -Werror and disabling some warnings
|
||||||
DEFINES += -Werror -Wno-macro-redefined -Wno-non-literal-null-conversion -Wno-void-pointer-to-int-cast -Wno-format
|
DEFINES += -Werror -Wno-macro-redefined -Wno-typedef-redefinition -Wno-non-literal-null-conversion -Wno-void-pointer-to-int-cast -Wno-format
|
||||||
|
|
||||||
ifeq ($(HAVE_KEYBOARD), 1)
|
ifeq ($(HAVE_KEYBOARD), 1)
|
||||||
DEFINES += -DHAVE_KEYBOARD
|
DEFINES += -DHAVE_KEYBOARD
|
||||||
@ -172,14 +163,13 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
CFLAGS := -cc1 -triple x86_64-scei-ps4-elf -munwind-tables -mcmodel=large -Wno-zero-length-array -Wno-format-pedantic -emit-obj -std=c11 $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
CFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||||
CXXFLAGS := -cc1 -triple x86_64-scei-ps4-elf -munwind-tables -Wall -pedantic -mcmodel=large -Wno-zero-length-array -Wno-format-pedantic -emit-obj -std=c++11 $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
CXXFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||||
LDFLAGS := -isysroot $(ORBISDEV)/usr -L. -Llib -Wl,--gc-sections -Wl,-z -Wl,max-page-size=0x4000 -Wl,--dynamic-linker="/libexec/ld-elf.so.1" -Wl,-pie -Wl,--eh-frame-hdr -L$(ORBISDEV)/usr/lib -target x86_64-scei-ps4-elf -T $(ORBISDEV)/linker.x
|
LDFLAGS := $(LIBDIRS) -Wl,--gc-sections -Wl,-z -Wl,max-page-size=0x4000 -Wl,--dynamic-linker="/libexec/ld-elf.so.1" -Wl,-pie -Wl,--eh-frame-hdr -target x86_64-scei-ps4-elf -T $(ORBISDEV)/linker.x
|
||||||
ARFLAGS := rcs
|
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CFLAGS += -O0 -fdebugger-support -fno-inline
|
CFLAGS += -O0 -fno-inline
|
||||||
CXXFLAGS += -O0 -fdebugger-support -fno-inline
|
CXXFLAGS += -O0 -fno-inline
|
||||||
else
|
else
|
||||||
CFLAGS += -O3
|
CFLAGS += -O3
|
||||||
CXXFLAGS += -O3
|
CXXFLAGS += -O3
|
||||||
@ -189,25 +179,23 @@ TARGETS := $(TARGET).elf
|
|||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
%.o: %.cpp
|
OBJOUT = -o
|
||||||
$(CXX) $(CXXFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||||
|
|
||||||
|
%.o: %.cpp
|
||||||
|
$(CXX) $(CXXFLAGS) -c $(OBJOUT)$@ $<
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(AS) $(ASFLAGS) -o $@ $<
|
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||||
|
|
||||||
%.o: %.s
|
%.o: %.s
|
||||||
$(AS) -o $@ $<
|
$(CC) -c $(OBJOUT)$@ $<
|
||||||
|
|
||||||
$(TARGET).elf: $(OBJ)
|
$(TARGET).elf: $(OBJ)
|
||||||
$(LD) $(ORBISDEV)/crt0.s $(OBJ) $(LDFLAGS) $(LIBS) -o $(TARGET).elf
|
$(LD) $(ORBISDEV)/crt0.s $(OBJ) $(LDFLAGS) $(LIBS) -o $(TARGET).elf
|
||||||
|
|
||||||
$(TARGET).a: $(OBJ)
|
|
||||||
$(AR) $(ARFLAGS) $(TARGET).a $(OBJ)
|
|
||||||
#$(OO_PS4_TOOLCHAIN)/bin/$(CDIR)/create-eboot -in=$(TARGET).elf -out=$(TARGET).oelf --paid 0x3800000000000011
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@cp homebrew.self $(SELF_PATH_INSTALL)
|
@cp homebrew.self $(SELF_PATH_INSTALL)
|
||||||
@echo "Installed!"
|
@echo "Installed!"
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <libSceSysmodule.h>
|
#include <libSceSysmodule.h>
|
||||||
#include <libSceLibcInternal.h>
|
#include <libSceLibcInternal.h>
|
||||||
#include <defines/ps4_defines.h>
|
#include <defines/ps4_defines.h>
|
||||||
|
#include <user_mem.h>
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
@ -113,12 +114,6 @@ static void frontend_orbis_get_env(int *argc, char *argv[],
|
|||||||
|
|
||||||
(void)args;
|
(void)args;
|
||||||
|
|
||||||
#ifndef IS_SALAMANDER
|
|
||||||
#if defined(HAVE_LOGGER)
|
|
||||||
logger_init();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
strlcpy(eboot_path, EBOOT_PATH, sizeof(eboot_path));
|
strlcpy(eboot_path, EBOOT_PATH, sizeof(eboot_path));
|
||||||
@ -242,7 +237,6 @@ static void frontend_orbis_init(void *data)
|
|||||||
int ret=initApp();
|
int ret=initApp();
|
||||||
printf("[%s][%s][%d]\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
printf("[%s][%s][%d]\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
||||||
|
|
||||||
logger_init();
|
|
||||||
RARCH_LOG("[%s][%s][%d] Hello from retroarch level info\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
RARCH_LOG("[%s][%s][%d] Hello from retroarch level info\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
||||||
RARCH_ERR("[%s][%s][%d] Hello from retroarch level error\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
RARCH_ERR("[%s][%s][%d] Hello from retroarch level error\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
||||||
RARCH_WARN("[%s][%s][%d] Hello from retroarch level warning no warning level on debugnet yet\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
RARCH_WARN("[%s][%s][%d] Hello from retroarch level warning no warning level on debugnet yet\n",__FILE__,__PRETTY_FUNCTION__,__LINE__);
|
||||||
@ -382,19 +376,19 @@ static int frontend_orbis_parse_drive_list(void *data, bool load_content)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static size_t frontend_orbis_get_mem_total(void)
|
static size_t frontend_orbis_get_mem_total(void)
|
||||||
// {
|
{
|
||||||
// size_t max_mem = 0, cur_mem = 0;
|
size_t max_mem = 0, cur_mem = 0;
|
||||||
// get_user_mem_size(&max_mem, &cur_mem);
|
get_user_mem_size(&max_mem, &cur_mem);
|
||||||
// return max_mem;
|
return max_mem;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// static size_t frontend_orbis_get_mem_used(void)
|
static size_t frontend_orbis_get_mem_used(void)
|
||||||
// {
|
{
|
||||||
// size_t max_mem = 0, cur_mem = 0;
|
size_t max_mem = 0, cur_mem = 0;
|
||||||
// get_user_mem_size(&max_mem, &cur_mem);
|
get_user_mem_size(&max_mem, &cur_mem);
|
||||||
// return cur_mem;
|
return cur_mem;
|
||||||
// }
|
}
|
||||||
|
|
||||||
frontend_ctx_driver_t frontend_ctx_orbis = {
|
frontend_ctx_driver_t frontend_ctx_orbis = {
|
||||||
frontend_orbis_get_env,
|
frontend_orbis_get_env,
|
||||||
@ -416,8 +410,8 @@ frontend_ctx_driver_t frontend_ctx_orbis = {
|
|||||||
frontend_orbis_get_arch,
|
frontend_orbis_get_arch,
|
||||||
NULL,
|
NULL,
|
||||||
frontend_orbis_parse_drive_list,
|
frontend_orbis_parse_drive_list,
|
||||||
NULL, /* TODO: frontend_orbis_get_mem_total,*/
|
frontend_orbis_get_mem_total,
|
||||||
NULL, /* TODO: frontend_orbis_get_mem_used,*/
|
frontend_orbis_get_mem_used,
|
||||||
NULL, /* install_signal_handler */
|
NULL, /* install_signal_handler */
|
||||||
NULL, /* get_sighandler_state */
|
NULL, /* get_sighandler_state */
|
||||||
NULL, /* set_sighandler_state */
|
NULL, /* set_sighandler_state */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user