2013-06-28 12:11:10 +00:00
|
|
|
RARCH_VERSION = "0.9.9.3"
|
2012-02-27 12:43:44 +00:00
|
|
|
|
|
|
|
#which compiler to build with - GCC or SNC
|
|
|
|
#set to GCC for debug builds for use with debugger
|
|
|
|
CELL_BUILD_TOOLS = SNC
|
|
|
|
CELL_GPU_TYPE = RSX
|
|
|
|
CELL_PSGL_VERSION = ultra-opt
|
2012-02-13 13:33:24 +00:00
|
|
|
|
2013-01-04 19:57:54 +00:00
|
|
|
RMENU_IMG_DIR := media/rmenu
|
2013-01-12 23:42:21 +00:00
|
|
|
|
|
|
|
# options
|
|
|
|
DOWNLOAD_SHADERS = 1
|
2012-01-30 17:17:47 +00:00
|
|
|
STRIPPING_ENABLE = 0
|
2013-01-12 23:42:21 +00:00
|
|
|
DEBUG = 0
|
|
|
|
HAVE_RGL = 1
|
|
|
|
HAVE_LOGGER = 0
|
|
|
|
HAVE_FREETYPE = 0
|
|
|
|
HAVE_RLAUNCH = 0
|
|
|
|
PERF_TEST = 0
|
2013-02-06 02:38:32 +00:00
|
|
|
WHOLE_ARCHIVE_LINK = 0
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-02-27 12:43:44 +00:00
|
|
|
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
|
|
|
CONTENT_ID = SSNE10000
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-02-28 15:32:52 +00:00
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
|
2012-02-27 12:43:44 +00:00
|
|
|
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
|
|
|
include $(CELL_MK_DIR)/sdk.makedef.mk
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-08-23 10:25:50 +00:00
|
|
|
PPU_TARGET = retroarch_ps3.elf
|
2012-08-06 01:07:09 +00:00
|
|
|
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-02-27 12:43:44 +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
|
2014-01-10 18:46:31 +00:00
|
|
|
INCDIRS = -I. -Ips3 -Icommon -Ideps/rzlib
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-08-20 13:55:13 +00:00
|
|
|
# system platform
|
|
|
|
system_platform = unix
|
|
|
|
ifeq ($(shell uname -a),)
|
|
|
|
EXE_EXT = .exe
|
|
|
|
system_platform = win
|
|
|
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
|
|
|
system_platform = osx
|
|
|
|
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
|
|
|
system_platform = win
|
|
|
|
endif
|
|
|
|
|
2012-02-27 12:43:44 +00:00
|
|
|
PKG_SCRIPT = ps3/ps3py/pkg.py
|
2012-03-26 12:52:58 +00:00
|
|
|
ifeq ($(shell uname), Linux)
|
2012-02-27 12:43:44 +00:00
|
|
|
PKG_FINALIZE = package_finalize
|
2012-03-26 12:52:58 +00:00
|
|
|
MAKE_SELF_WC = make_self_wc
|
|
|
|
MAKE_SELF = make_self_npdrm
|
|
|
|
PYTHON2 = python2
|
|
|
|
GIT = git
|
|
|
|
else
|
|
|
|
PKG_FINALIZE = package_finalize.exe
|
|
|
|
MAKE_SELF_WC = make_self_wc.exe
|
|
|
|
MAKE_SELF = make_self_npdrm.exe
|
|
|
|
PYTHON2 = python2.exe
|
|
|
|
GIT = git.exe
|
|
|
|
endif
|
2012-02-27 12:43:44 +00:00
|
|
|
|
2013-03-18 04:46:19 +00:00
|
|
|
PPU_SRCS = griffin/griffin.c
|
2012-02-26 14:18:44 +00:00
|
|
|
|
2012-10-01 22:47:20 +00:00
|
|
|
ifeq ($(PERF_TEST), 1)
|
|
|
|
DEFINES += -DPERF_TEST
|
|
|
|
endif
|
|
|
|
|
2013-01-12 23:42:21 +00:00
|
|
|
ifeq ($(HAVE_RLAUNCH), 1)
|
|
|
|
DEFINES += -DHAVE_RLAUNCH
|
|
|
|
endif
|
|
|
|
|
2013-12-17 18:10:21 +00:00
|
|
|
DEFINES += -DHAVE_RMENU -DHAVE_MENU -DRARCH_INTERNAL
|
2013-03-11 01:32:14 +00:00
|
|
|
|
2012-05-06 01:46:55 +00:00
|
|
|
ifeq ($(HAVE_RGL), 1)
|
2012-10-01 22:47:20 +00:00
|
|
|
DEFINES += -DHAVE_RGL
|
2012-08-20 13:55:13 +00:00
|
|
|
GL_LIBS := -L. -lrgl_ps3
|
2012-02-19 02:26:45 +00:00
|
|
|
else
|
2012-02-27 12:43:44 +00:00
|
|
|
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
2012-02-19 02:26:45 +00:00
|
|
|
endif
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-09-27 16:16:06 +00:00
|
|
|
ifeq ($(HAVE_FREETYPE), 1)
|
|
|
|
DEFINES += -DHAVE_FREETYPE
|
|
|
|
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
|
|
|
else
|
|
|
|
DEFINES += -DHAVE_LIBDBGFONT
|
|
|
|
FONT_LIBS := -ldbgfont
|
|
|
|
endif
|
|
|
|
|
2012-03-14 02:19:13 +00:00
|
|
|
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
|
|
|
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
|
|
|
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
|
|
|
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
2012-08-20 15:16:40 +00:00
|
|
|
else
|
|
|
|
ifneq($(system_platform), win)
|
2012-03-14 02:19:13 +00:00
|
|
|
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
|
|
|
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
|
|
|
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
2012-08-20 13:55:13 +00:00
|
|
|
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
2012-03-14 02:19:13 +00:00
|
|
|
endif
|
|
|
|
|
2013-02-06 02:38:32 +00:00
|
|
|
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
|
|
|
WHOLE_START := -Wl, --whole-archive
|
|
|
|
WHOLE_END := -Wl, --no-whole-archive
|
|
|
|
endif
|
|
|
|
|
|
|
|
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -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
|
2012-02-19 02:26:45 +00:00
|
|
|
|
2012-11-15 13:40:50 +00:00
|
|
|
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
|
|
|
|
2014-01-05 02:33:27 +00:00
|
|
|
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_MINIZ -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSK -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -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
|
|
|
|
2012-02-27 19:07:24 +00:00
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
2012-07-27 19:36:49 +00:00
|
|
|
DEFINES += -DHAVE_LOGGER
|
2012-11-25 04:41:12 +00:00
|
|
|
INCDIRS += -Iconsole/logger
|
2012-02-27 19:07:24 +00:00
|
|
|
endif
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-07-27 19:36:49 +00:00
|
|
|
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
|
|
|
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
|
|
|
|
2012-02-27 12:43:44 +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
|
|
|
|
2012-02-27 12:43:44 +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
|
|
|
|
2012-02-27 12:43:44 +00:00
|
|
|
include $(CELL_MK_DIR)/sdk.target.mk
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-03-14 02:19:13 +00:00
|
|
|
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
|
|
|
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
|
|
|
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
|
|
|
|
2013-01-24 21:56:55 +00:00
|
|
|
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2012-02-27 12:43:44 +00:00
|
|
|
create-npdrm-core:
|
|
|
|
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
|
|
|
|
|
|
|
create-core:
|
2012-02-28 09:42:34 +00:00
|
|
|
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
2012-02-27 12:43:44 +00:00
|
|
|
|
|
|
|
create-npdrm-salamander:
|
|
|
|
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
|
|
|
|
|
|
|
create-salamander:
|
2012-02-28 09:42:34 +00:00
|
|
|
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
2012-02-27 12:43:44 +00:00
|
|
|
|
2012-08-05 13:32:20 +00:00
|
|
|
copy-media-files:
|
2013-02-01 23:58:57 +00:00
|
|
|
@cp -r $(RMENU_IMG_DIR)/*.png ps3/pkg/USRDIR/cores/borders/Menu/
|
2012-02-27 12:43:44 +00:00
|
|
|
|
|
|
|
create-shaders:
|
2013-01-04 21:07:55 +00:00
|
|
|
make -f Makefile.shaders deploy-ps3
|
2012-02-27 12:43:44 +00:00
|
|
|
|
2013-01-04 19:57:54 +00:00
|
|
|
pkg: $(PPU_TARGET) create-shaders copy-media-files 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
|
|
|
|
2013-01-04 19:57:54 +00:00
|
|
|
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
2012-04-21 22:32:01 +00:00
|
|
|
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ retroarch-ps3-cfw-$(RARCH_VERSION).pkg
|
2012-02-27 12:43:44 +00:00
|
|
|
|
2013-01-04 19:57:54 +00:00
|
|
|
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
2012-02-27 12:43:44 +00:00
|
|
|
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
2012-04-21 22:32:01 +00:00
|
|
|
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ retroarch-ps3-cfw-$(RARCH_VERSION).pkg
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2013-01-04 19:57:54 +00:00
|
|
|
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
2012-04-21 22:32:01 +00:00
|
|
|
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ retroarch-ps3-cfw-$(RARCH_VERSION)-kmeaw.pkg
|
|
|
|
$(PKG_FINALIZE) retroarch-ps3-cfw-$(RARCH_VERSION)-kmeaw.pkg
|
2011-11-30 00:33:14 +00:00
|
|
|
|
2013-01-04 19:57:54 +00:00
|
|
|
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
2012-02-27 12:43:44 +00:00
|
|
|
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
2012-04-21 22:32:01 +00:00
|
|
|
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ retroarch-ps3-cfw-$(RARCH_VERSION).pkg
|
|
|
|
$(PKG_FINALIZE) retroarch-ps3-cfw-$(RARCH_VERSION)-kmeaw.pkg
|
2012-02-27 12:43:44 +00:00
|
|
|
|
|
|
|
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
|