forked from libretro/RetroArch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.psl1ght
139 lines (114 loc) · 3.58 KB
/
Makefile.psl1ght
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#-------------------------------------------------------------------------------
# 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.elf
SELF_TARGET := $(ELF_TARGET:.elf=.self)
CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
INCLUDE += -I. -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines -I$(PORTLIBS)/include -I$(PORTLIBS)/include/freetype2
LIBDIRS += -L. -L$(PORTLIBS)/lib
MACHDEP := -D__PSL1GHT__ -D__PS3__ -mcpu=cell
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
LDFLAGS := $(MACHDEP)
LIBS := -lretro_psl1ght -lrt -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl -lsysfs -lfreetype -lcamera -lgem -lspurs
# 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
SHADER_OBJS = gfx/drivers/rsx_shaders/modern_opaque.vpo.o \
gfx/drivers/rsx_shaders/modern_opaque.fpo.o \
gfx/drivers/rsx_shaders/modern_alpha_blend.vpo.o \
gfx/drivers/rsx_shaders/modern_alpha_blend.fpo.o
LIBCO_OBJ = libretro-common/libco/ps3.o
OBJ = $(SHADER_OBJS) $(LIBCO_OBJ) libretro-common/memmap/memmap.o griffin/griffin.o
ifeq ($(HAVE_LOGGER), 1)
CFLAGS += -DHAVE_LOGGER
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
endif
SHARED_FLAGS :=
SHARED_FLAGS += -DHAVE_GCM
SHARED_FLAGS += -DHAVE_MENU \
-DHAVE_CONFIGFILE \
-DHAVE_PATCH \
-DHAVE_CHEATS \
-DRARCH_CONSOLE \
-DHAVE_OVERLAY \
-DHAVE_HEADSET \
-DHAVE_SYSMODULES \
-DHAVE_SYSUTILS \
-DHAVE_RARCH_EXEC \
-DHAVE_MOUSE \
-DHAVE_LIGHTGUN \
-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 \
-DRARCH_INTERNAL \
-DHAVE_SCREENSHOTS \
-DHAVE_REWIND \
-DHAVE_MULTIMAN \
-DHAVE_MEMINFO \
-DHAVE_RGUI \
-DHAVE_XMB \
-DHAVE_OZONE \
-DHAVE_GFX_WIDGETS \
-DHAVE_MENU_BUFFER \
-DHAVE_FREETYPE \
-DHAVE_CORE_INFO_CACHE \
-DHAVE_7ZIP \
-D_7ZIP_ST
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
CXXFLAGS += $(SHARED_FLAGS)
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
else
CFLAGS += -O3 -g
CXXFLAGS += -03 -g
endif
all: $(SELF_TARGET)
$(ELF_TARGET): $(OBJ)
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
create-core: $(SELF_TARGET)
cp $(SELF_TARGET) $(CORE_PATH)
pkg: create-core
$(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