From f0457637c66461865ea6037a1f52da73d7724a43 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 25 Nov 2012 05:41:12 +0100 Subject: [PATCH] (Griffin/LibXenon) Logger input files now included in Griffin - also cleaned up Xenon makefile to use Grifffin --- Makefile.ngc | 1 - Makefile.ps3 | 4 +--- Makefile.psl1ght | 1 - Makefile.wii | 1 - Makefile.xenon | 4 ++-- console/griffin/griffin.c | 23 ++++++++++++++++++++++- console/logger/logger.c | 4 ++-- 7 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Makefile.ngc b/Makefile.ngc index f8c70aca99..224493d171 100644 --- a/Makefile.ngc +++ b/Makefile.ngc @@ -48,7 +48,6 @@ ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) CFLAGS += -Iconsole/logger -OBJ += console/logger/logger.o LIBS += -lbba endif diff --git a/Makefile.ps3 b/Makefile.ps3 index a4a93d92a3..eec7395cd9 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -91,7 +91,6 @@ ifneq($(system_platform), win) PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe endif - PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) -lretro_ps3 -lcgc -lgcm_cmd -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe @@ -106,8 +105,7 @@ endif ifeq ($(HAVE_LOGGER), 1) DEFINES += -DHAVE_LOGGER -PPU_SRCS += console/logger/logger.c -INCDIRS += -Iconsole/logger +INCDIRS += -Iconsole/logger endif PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES) diff --git a/Makefile.psl1ght b/Makefile.psl1ght index 65db63bc73..10002114ce 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -88,7 +88,6 @@ OBJ = console/griffin/griffin.o ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER CFLAGS += -Iconsole/logger -OBJ += console/logger/psl1ght_logger.o endif ifeq ($(HAVE_FILE_LOGGER), 1) diff --git a/Makefile.wii b/Makefile.wii index cea624965d..413c7bcab1 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -50,7 +50,6 @@ ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) CFLAGS += -Iconsole/logger -OBJ += console/logger/logger.o endif ifeq ($(HAVE_FILE_LOGGER), 1) diff --git a/Makefile.xenon b/Makefile.xenon index 3eaf004845..32803aae99 100644 --- a/Makefile.xenon +++ b/Makefile.xenon @@ -18,10 +18,10 @@ PPU_TARGET_ADJUSTED := retroarch-libxenon.elf32 LDDIRS = -L. -L$(DEVKITXENON)/usr/lib -L$(DEVKITXENON)/xenon/lib/32 INCDIRS = -I. -I$(DEVKITXENON)/usr/include -OBJ = fifo_buffer.o retroarch.o driver.o file.o file_path.o settings.o message.o rewind.o movie.o gfx/gfx_common.o patch.o compat/compat.o screenshot.o audio/hermite.o dynamic.o audio/utils.o conf/config_file.o 360/frontend-xenon/main.o 360/xenon360_audio.o 360/xenon360_input.o 360/xenon360_video.o thread/xenon_sdl_threads.o +OBJ = console/griffin/griffin.o LIBS = -lretro_xenon360 -lxenon -lm -lc -DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION=\"0.9.8-beta2\" -DRARCH_CONSOLE -DHAVE_GETOPT_LONG=1 -Dmain=rarch_main +DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION=\"0.9.8-beta2\" -DRARCH_CONSOLE -DHAVE_THREAD -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -Dmain=rarch_main DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) DEFINES += -u read -u _start -u exc_base diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index 4d1c638566..c9f192bbf6 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -18,6 +18,16 @@ #include "../../msvc/msvc_compat.h" #endif +/*============================================================ +LOGGERS +============================================================ */ + +#if defined(HAVE_LOGGER) && defined(__PSL1GHT__) +#include "../logger/psl1ght_logger.c" +#elif defined(HAVE_LOGGER) +#include "../logger/logger.c" +#endif + #ifdef RARCH_CONSOLE /*============================================================ @@ -66,6 +76,7 @@ default_paths_t default_paths; #include "../rarch_console_libretro_mgmt.c" #endif + #endif /*============================================================ @@ -166,6 +177,8 @@ VIDEO DRIVER #include "../../psp2/psp2_video.c" #elif defined(PSP) #include "../../psp1/psp1_video.c" +#elif defined(XENON) +#include "../../360/xenon360_video.c" #endif #ifdef HAVE_DYLIB @@ -213,6 +226,8 @@ INPUT #include "../../gx/gx_input.c" #elif defined(_XBOX) #include "../../xdk/xdk_xinput_input.c" +#elif defined(XENON) +#include "../../360/xenon360_input.c" #elif defined(ANDROID) #include "../../android/native/jni/input_android.c" #endif @@ -254,6 +269,8 @@ AUDIO #include "../../ps3/ps3_audio.c" #elif defined(_XBOX360) #include "../../360/xdk360_audio.cpp" +#elif defined(XENON) +#include "../../360/xenon360_audio.c" #elif defined(GEKKO) #include "../../gx/gx_audio.c" #endif @@ -325,6 +342,8 @@ MAIN ============================================================ */ #if defined(_XBOX) #include "../../xdk/frontend/main.c" +#elif defined(XENON) +#include "../../360/frontend-xenon/main.c" #elif defined(GEKKO) #include "../../gx/frontend/main.c" #elif defined(__CELLOS_LV2__) @@ -343,7 +362,9 @@ RETROARCH /*============================================================ THREAD ============================================================ */ -#ifdef HAVE_THREAD +#if defined(HAVE_THREAD) && defined(XENON) +#include "../../tread/xenon_sdl_threads.c" +#elif defined(HAVE_THREAD) #include "../../thread.c" #ifdef ANDROID #include "../../autosave.c" diff --git a/console/logger/logger.c b/console/logger/logger.c index ccb02652b4..6d606bf7ca 100644 --- a/console/logger/logger.c +++ b/console/logger/logger.c @@ -89,7 +89,7 @@ static int if_up_with(int index) if (ret < 0) { printf("cellNetCtlGetState() failed(%x)\n", ret); - return (-1); + return (-1); } if (state == CELL_NET_CTL_STATE_IPObtained) break; @@ -99,7 +99,7 @@ static int if_up_with(int index) if (index && timeout_count < 0) { printf("if_up_with(%d) timeout\n", index); - return (0); + return (0); } } #elif defined(GEKKO)