2017-08-17 19:09:42 +00:00
|
|
|
RARCH_VERSION = "1.6.7.0"
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
DEBUG = 0
|
2012-09-16 03:22:44 +00:00
|
|
|
HAVE_LOGGER = 0
|
2012-07-01 11:33:30 +00:00
|
|
|
HAVE_FILE_LOGGER = 0
|
|
|
|
|
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
|
|
|
|
CC = $(PS3DEV)/ppu/bin/ppu-gcc
|
2012-07-16 20:22:05 +00:00
|
|
|
CXX = $(PS3DEV)/ppu/bin/ppu-g++
|
2012-07-01 11:33:30 +00:00
|
|
|
LD = $(PS3DEV)/ppu/bin/ppu-ld
|
|
|
|
|
2012-09-16 02:04:25 +00:00
|
|
|
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
|
|
|
|
2012-07-01 11:33:30 +00:00
|
|
|
ELF_TARGET := retroarch_psl1ght.elf
|
2015-08-31 19:09:18 +00:00
|
|
|
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
|
|
|
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
2012-07-01 11:33:30 +00:00
|
|
|
|
2017-03-25 09:05:33 +00:00
|
|
|
INCLUDE := -I. -I$(PS3DEV)/ppu/include -Ideps/libz -Ips3/gcmgl/include/export -Ips3/include
|
2012-07-01 21:09:34 +00:00
|
|
|
LIBDIRS := -L$(PS3DEV)/ppu/lib -L$(PS3DEV)/portlibs/ppu/lib -L.
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__
|
2012-07-16 20:22:05 +00:00
|
|
|
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
2012-07-01 11:33:30 +00:00
|
|
|
LDFLAGS := $(MACHDEP)
|
2014-02-19 15:01:45 +00:00
|
|
|
LIBS := -lrgl_ps3 -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl
|
2012-09-16 02:04:25 +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
|
|
|
|
|
2015-09-20 13:26:10 +00:00
|
|
|
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
2012-09-16 02:04:25 +00:00
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
PKG_FINALIZE = package_finalize
|
|
|
|
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
|
|
|
|
# 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
|
|
|
|
|
2015-09-20 13:26:10 +00:00
|
|
|
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
2012-09-16 02:04:25 +00:00
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
PKG_FINALIZE = package_finalize
|
|
|
|
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
|
|
|
|
|
|
|
|
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
|
|
|
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
2012-07-01 11:33:30 +00:00
|
|
|
|
2013-03-18 04:46:19 +00:00
|
|
|
OBJ = griffin/griffin.o
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
|
|
endif
|
|
|
|
|
2016-12-12 11:44:29 +00:00
|
|
|
SHARED_FLAGS := -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER
|
2012-07-16 20:22:05 +00:00
|
|
|
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
|
|
|
CXXFLAGS += $(SHARED_FLAGS)
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
else
|
2012-09-16 03:22:44 +00:00
|
|
|
CFLAGS += -O3 -g
|
|
|
|
CXXFLAGS += -03 -g
|
2012-07-01 11:33:30 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(ELF_TARGET)
|
|
|
|
|
|
|
|
$(ELF_TARGET): $(OBJ)
|
2012-09-11 10:33:46 +00:00
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2012-07-16 20:22:05 +00:00
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2012-09-16 02:04:25 +00:00
|
|
|
create-npdrm-core:
|
|
|
|
$(MAKE_FSELF_NPDRM) $(ELF_TARGET) $(CORE_PATH)
|
|
|
|
|
|
|
|
create-core:
|
|
|
|
$(MAKE_SELF_WC) $(ELF_TARGET) $(CORE_PATH)
|
|
|
|
|
|
|
|
pkg: $(ELF_TARGET) create-npdrm-core
|
2015-08-31 19:09:18 +00:00
|
|
|
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf ps3/pkg
|
2012-09-16 02:04:25 +00:00
|
|
|
|
2012-09-16 03:22:44 +00:00
|
|
|
pkg-signed: $(ELF_TARGET) create-core
|
2015-08-31 19:09:18 +00:00
|
|
|
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(RARCH_VERSION).pkg
|
2012-09-16 02:04:25 +00:00
|
|
|
|
2012-07-01 11:33:30 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(ELF_TARGET)
|
|
|
|
rm -f $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|