2020-03-07 20:27:38 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Clear the implicit built in rules
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
.SUFFIXES:
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
ifeq ($(strip $(PSL1GHT)),)
|
|
|
|
$(error "Please set PSL1GHT in your environment. export PSL1GHT=<path>")
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(PSL1GHT)/ppu_rules
|
|
|
|
|
|
|
|
include version.all
|
|
|
|
|
|
|
|
DEBUG = 0
|
|
|
|
HAVE_LOGGER = 0
|
|
|
|
HAVE_FILE_LOGGER = 1
|
|
|
|
|
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
|
|
|
|
CONTENTID = UP0001-SSNE10001_00-0000000000000001
|
|
|
|
APPID = SSNE10001
|
|
|
|
TITLE = Retroarch PSL1GHT
|
|
|
|
PACKAGE_BASENAME := retroarch_psl1ght
|
|
|
|
|
|
|
|
ELF_TARGET := retroarch_psl1ght_salamander.elf
|
|
|
|
ELF_TARGET_NONSTRIPPED := retroarch_psl1ght_salamander_nonstripped.elf
|
|
|
|
EBOOT_PATH = pkg/psl1ght/pkg/USRDIR/EBOOT.BIN
|
|
|
|
|
2023-02-20 13:26:37 +00:00
|
|
|
INCLUDE += -I. -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib \
|
|
|
|
-Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines
|
2020-03-07 20:27:38 +00:00
|
|
|
LIBDIRS += -L.
|
|
|
|
|
2021-05-18 22:31:09 +00:00
|
|
|
MACHDEP := -D__PS3__ -D__PSL1GHT__ -mcpu=cell -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections
|
2020-03-07 20:27:38 +00:00
|
|
|
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
|
|
|
LDFLAGS := $(MACHDEP)
|
2021-05-18 22:31:09 +00:00
|
|
|
LIBS := -lgcm_sys -lrsx -lsysutil -lio -lnet -lsysmodule -lrt -llv2 -lm -lsysfs
|
2020-03-07 20:27:38 +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
|
|
|
|
|
|
|
|
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
GIT = git
|
|
|
|
else
|
|
|
|
GIT = git.exe
|
|
|
|
endif
|
|
|
|
|
|
|
|
OBJ = frontend/frontend_salamander.o \
|
|
|
|
frontend/frontend_driver.o \
|
|
|
|
frontend/drivers/platform_ps3.o \
|
|
|
|
libretro-common/file/file_path.o \
|
|
|
|
libretro-common/file/file_path_io.o \
|
|
|
|
libretro-common/lists/dir_list.o \
|
|
|
|
libretro-common/lists/string_list.o \
|
|
|
|
libretro-common/file/retro_dirent.o \
|
2020-12-28 19:24:55 +00:00
|
|
|
libretro-common/hash/lrc_hash.o \
|
2020-03-07 20:27:38 +00:00
|
|
|
libretro-common/string/stdstring.o \
|
|
|
|
libretro-common/encodings/encoding_utf.o \
|
|
|
|
libretro-common/compat/compat_strl.o \
|
2022-08-25 15:00:23 +00:00
|
|
|
libretro-common/compat/compat_strldup.o \
|
2020-03-07 20:27:38 +00:00
|
|
|
libretro-common/compat/compat_strcasestr.o \
|
|
|
|
libretro-common/compat/fopen_utf8.o \
|
|
|
|
libretro-common/streams/file_stream.o \
|
|
|
|
libretro-common/vfs/vfs_implementation.o \
|
|
|
|
libretro-common/file/config_file.o \
|
2020-08-08 15:03:56 +00:00
|
|
|
libretro-common/time/rtime.o \
|
2020-08-22 11:42:57 +00:00
|
|
|
verbosity.o
|
2020-03-07 20:27:38 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
|
|
endif
|
|
|
|
|
|
|
|
SHARED_FLAGS :=
|
|
|
|
|
2023-02-21 13:24:00 +00:00
|
|
|
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -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 -DHAVE_MULTIMAN -DHAVE_RGUI -DIS_SALAMANDER -DHAVE_GCM
|
2020-03-07 20:27:38 +00:00
|
|
|
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
|
|
|
CXXFLAGS += $(SHARED_FLAGS)
|
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
else
|
|
|
|
CFLAGS += -O3 -g
|
|
|
|
CXXFLAGS += -03 -g
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: create-salamander
|
|
|
|
|
|
|
|
$(ELF_TARGET_NONSTRIPPED): $(OBJ)
|
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
|
|
|
|
|
|
|
$(ELF_TARGET): $(ELF_TARGET_NONSTRIPPED)
|
|
|
|
$(STRIP) $< -o $@
|
|
|
|
$(SPRX) $@
|
|
|
|
|
|
|
|
create-salamander: $(ELF_TARGET)
|
|
|
|
$(SELF_NPDRM) $(ELF_TARGET) $(EBOOT_PATH) $(CONTENTID)
|
|
|
|
|
|
|
|
pkg: create-salamander
|
|
|
|
$(PKG) --contentid $(CONTENTID) pkg/psl1ght/pkg/ $(PACKAGE_BASENAME).pkg
|
|
|
|
# cp $(PACKAGE_BASENAME).pkg $(PACKAGE_BASENAME).gnpdrm.pkg
|
|
|
|
# $(PACKAGE_FINALIZE) $(PACKAGE_BASENAME).gnpdrm.pkg
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(ELF_TARGET)
|
|
|
|
rm -f $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean
|