RetroArch/Makefile.ps3

169 lines
4.9 KiB
Makefile
Raw Normal View History

SSNES_VERSION = "0.9.4.1"
#which compiler to build with - GCC or SNC
#set to GCC for debug builds for use with debugger
CELL_BUILD_TOOLS = SNC
CELL_SDK ?= /usr/local/cell
CELL_GPU_TYPE = RSX
CELL_PSGL_VERSION = ultra-opt
2012-01-30 17:17:47 +00:00
DEBUG = 0
DOWNLOAD_SHADERS = 1
2012-01-30 17:17:47 +00:00
STRIPPING_ENABLE = 0
HAVE_SSNES_GL = 0
HAVE_LOGGER = 0
2011-11-30 00:33:14 +00:00
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
CONTENT_ID = SSNE10000
2011-11-30 00:33:14 +00:00
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
PC_DEVELOPMENT_UDP_PORT = 3490
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
include $(CELL_MK_DIR)/sdk.makedef.mk
2011-11-30 00:33:14 +00:00
PPU_TARGET = ssnes.elf
SALAMANDER_TARGET = ssnes-salamander.elf
2011-11-30 00:33:14 +00:00
EBOOT_PATH = ps3/pkg/USRDIR/EBOOT.BIN
CORE_PATH = ps3/pkg/USRDIR/cores/CORE.SELF
2011-11-30 00:33:14 +00:00
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
INCDIRS = -I. -Ips3 -Icommon
2011-11-30 00:33:14 +00:00
MAKE_SELF_WC = make_self_wc
MAKE_SELF = make_self_npdrm
PKG_SCRIPT = ps3/ps3py/pkg.py
PKG_FINALIZE = package_finalize
PPU_SRCS = fifo_buffer.c \
ps3/cellframework2/fileio/file_browser.c \
ps3/ps3_audio.c \
ps3/menu.c \
console/main_wrap.c \
console/console_ext.c \
2012-03-01 20:32:01 +00:00
console/librsound/librsound.c \
2012-03-04 20:53:04 +00:00
console/szlib/szlib.c \
ps3/ps3_input.c \
2012-03-05 15:57:43 +00:00
input/input_luts.c \
ps3/cellframework2/input/pad_input.c \
2012-02-29 19:19:58 +00:00
ps3/cellframework2/utility/oskutil.c \
getopt.c \
ssnes.c \
driver.c \
file.c \
settings.c \
message.c \
rewind.c \
movie.c \
netplay.c \
netplay_compat.c \
ps3/ps3_video_psgl.c \
gfx/shader_cg.c \
gfx/snes_state.c \
ups.c \
bps.c \
strl.c \
audio/hermite.c \
2012-03-01 20:32:01 +00:00
audio/rsound.c \
dynamic.c \
ps3/main.c \
audio/utils.c \
conf/config_file.c \
2012-03-01 20:32:01 +00:00
ps3/image.c \
thread.c
ifeq ($(HAVE_SSNES_GL), 1)
DEFINES = -DHAVE_SSNES_GL
GL_LIBS := -lSSNESGL -lSSNESGLcgc
else
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
endif
2011-11-30 00:33:14 +00:00
2012-03-07 16:54:38 +00:00
PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lsnes -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
DEFINES += -DSSNES_CONSOLE -DHAVE_OPENGL -DHAVE_CG -DHAVE_FBO -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"$(SSNES_VERSION)\" -DHAVE_SCREENSHOTS_BUILTIN=1 -Dmain=ssnes_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
2011-11-30 00:33:14 +00:00
2011-12-04 16:19:21 +00:00
ifeq ($(DEBUG), 1)
2011-11-30 00:41:50 +00:00
PPU_OPTIMIZE_LV := -O0 -g
else
2012-01-11 21:27:07 +00:00
PPU_OPTIMIZE_LV := -O3 -g
2011-11-30 00:41:50 +00:00
endif
2011-11-30 00:33:14 +00:00
PPU_CFLAGS = $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
PPU_CXXFLAGS = $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
ifeq ($(HAVE_LOGGER), 1)
PPU_CFLAGS += -DHAVE_LOGGER
PPU_SRCS += ps3/cellframework2/fileio/logger.c
endif
2011-11-30 00:33:14 +00:00
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
EBOOT_EXISTS = 1
CORE_EXISTS = 1
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
EBOOT_EXISTS = 0
endif
2011-11-30 00:33:14 +00:00
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
CORE_EXISTS = 0
2012-01-30 17:17:47 +00:00
endif
2011-11-30 00:33:14 +00:00
include $(CELL_MK_DIR)/sdk.target.mk
2011-11-30 00:33:14 +00:00
.PHONY: create-selfs-npdrm create-npdrm-core create-core create-npdrm-salamander create-npdrm-salamander create-shaders clean-selfs
2011-11-30 00:33:14 +00:00
create-npdrm-core:
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
create-core:
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
create-npdrm-salamander:
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
create-salamander:
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
create-shaders:
ifeq ($(DOWNLOAD_SHADERS),1)
$(RM) -rf ps3/pkg/USRDIR/cores/shaders
git clone git://github.com/twinaphex/common-shaders.git ps3/pkg/USRDIR/cores/shaders
endif
2012-02-27 13:01:05 +00:00
pkg: $(PPU_TARGET) create-shaders create-npdrm-salamander create-npdrm-core
2011-12-02 01:07:46 +00:00
$(MAKE_PACKAGE_NPDRM) ps3/pkg/package.conf ps3/pkg
2011-11-30 00:33:14 +00:00
2012-02-28 08:38:31 +00:00
pkg-signed: $(PPU_TARGET) create-shaders create-salamander create-core
python2 $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ ssnes-ps3-cfw-$(SSNES_VERSION).pkg
pkg-signed-standalone: $(PPU_TARGET) create-shaders create-core
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
python2 $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ ssnes-ps3-cfw-$(SSNES_VERSION).pkg
2011-11-30 00:33:14 +00:00
pkg-signed-cfw: $(PPU_TARGET) create-shaders create-salamander create-core
python2 $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ ssnes-ps3-cfw-$(SSNES_VERSION)-kmeaw.pkg
$(PKG_FINALIZE) ssnes-ps3-cfw-$(SSNES_VERSION)-kmeaw.pkg
2011-11-30 00:33:14 +00:00
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders create-core
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
python2 $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ ssnes-ps3-cfw-$(SSNES_VERSION).pkg
$(PKG_FINALIZE) ssnes-ps3-cfw-$(SSNES_VERSION)-kmeaw.pkg
clean-selfs:
ifeq ($(EBOOT_EXISTS),1)
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
else
rm $(EBOOT_PATH)
endif
ifeq ($(CORE_EXISTS),1)
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
else
rm $(CORE_PATH)
endif