-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Makefile.psl1ght.salamander
120 lines (97 loc) · 3.78 KB
/
Makefile.psl1ght.salamander
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#-------------------------------------------------------------------------------
# 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
INCLUDE += -I. -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib \
-Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines
LIBDIRS += -L.
MACHDEP := -D__PS3__ -D__PSL1GHT__ -mcpu=cell -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
LDFLAGS := $(MACHDEP)
LIBS := -lgcm_sys -lrsx -lsysutil -lio -lnet -lsysmodule -lrt -llv2 -lm -lsysfs
# 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 \
libretro-common/hash/lrc_hash.o \
libretro-common/string/stdstring.o \
libretro-common/encodings/encoding_utf.o \
libretro-common/compat/compat_strl.o \
libretro-common/compat/compat_strldup.o \
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 \
libretro-common/time/rtime.o \
verbosity.o
ifeq ($(HAVE_LOGGER), 1)
CFLAGS += -DHAVE_LOGGER
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
endif
SHARED_FLAGS :=
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
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