RetroArch/Makefile.ps2

115 lines
3.1 KiB
Makefile
Raw Normal View History

2018-09-18 06:08:06 +00:00
BUILD_PRX = 0
2019-01-03 10:50:24 +00:00
DEBUG = 0
2018-09-18 06:08:06 +00:00
HAVE_KERNEL_PRX = 0
HAVE_LOGGER = 0
2019-01-03 10:50:24 +00:00
HAVE_FILE_LOGGER = 0
2018-09-18 06:08:06 +00:00
HAVE_THREADS = 0
BIG_STACK = 0
2019-01-04 00:30:56 +00:00
MUTE_WARNINGS = 0
2018-12-26 22:40:57 +00:00
PS2_IP = 192.168.1.150
2018-09-18 06:08:06 +00:00
#Configuration for IRX
EE_BIN2O = bin2o
IRX_DIR = $(PS2SDK)/iop/irx
TARGET = retroarchps2.elf
2018-12-26 12:40:20 +00:00
TARGET_RELEASE = retroarchps2-release.elf
2018-09-18 06:08:06 +00:00
ifeq ($(DEBUG), 1)
OPTIMIZE_LV := -O0 -g
2018-10-17 19:11:21 +00:00
RARCH_DEFINES += -DDEBUG
2018-09-18 06:08:06 +00:00
else
OPTIMIZE_LV := -O2
2019-01-04 00:30:56 +00:00
LDFLAGS := -s
2018-09-18 06:08:06 +00:00
endif
2019-01-04 00:30:56 +00:00
ifeq ($(MUTE_WARNINGS), 1)
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
endif
2018-12-24 15:15:05 +00:00
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
2018-09-18 06:08:06 +00:00
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include
INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
GPVAL = -G0
2019-01-04 00:30:56 +00:00
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
2018-09-18 06:08:06 +00:00
ASFLAGS = $(CFLAGS)
2018-10-17 19:11:21 +00:00
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB
2018-12-26 22:40:57 +00:00
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
2018-09-18 06:08:06 +00:00
LIBDIR =
2019-01-04 00:30:56 +00:00
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
2018-09-18 06:08:06 +00:00
#IRX modules
# IRX modules - modules have to be in IRX_DIR
IRX = iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
2018-09-18 06:08:06 +00:00
IRX_OBJ = $(IRX:.irx=.o)
EE_OBJS += $(IRX_OBJ)
ifeq ($(HAVE_THREADS), 1)
RARCH_DEFINES += -DHAVE_THREADS
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
endif
ifeq ($(HAVE_KERNEL_PRX), 1)
CFLAGS += -DHAVE_KERNEL_PRX
endif
ifeq ($(BIG_STACK), 1)
CFLAGS += -DBIG_STACK
endif
CFLAGS += $(RARCH_DEFINES)
# Missing objecst on the PS2SDK
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
2018-09-18 06:08:06 +00:00
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
EE_OBJS += griffin/griffin.o
EE_CFLAGS = $(CFLAGS)
2019-01-07 20:49:55 +00:00
EE_CXXFLAGS = $(CFLAGS)
2018-09-18 06:08:06 +00:00
EE_LDFLAGS = $(LDFLAGS)
EE_LIBS = $(LIBS)
EE_ASFLAGS = $(ASFLAGS)
EE_INCS = $(INCDIR)
2019-02-03 23:49:35 +00:00
EE_IRX_OBJ = $(IRX_OBJ)
2018-09-18 06:08:06 +00:00
EE_BIN = $(TARGET)
EE_GPVAL = $(GPVAL)
all: $(EE_IRX_OBJ) $(EE_BIN)
clean:
rm -f $(EE_BIN) $(EE_OBJS)
prepare:
ps2client -h $(PS2_IP) reset
ps2client -h $(PS2_IP) netdump
run:
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
debug: clean prepare all run
2018-12-31 12:47:58 +00:00
package:
2018-12-26 12:40:20 +00:00
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
2018-12-31 12:47:58 +00:00
release: clean all package
2018-09-18 06:08:06 +00:00
#Specific file name and output per IRX Module
$(EE_IRX_OBJ):
$(EE_BIN2O) $(EE_GPVAL) $(IRX_DIR)/$(@:.o=.irx) $@ $(@:.o=_irx)
#Include preferences
2019-02-03 23:49:35 +00:00
include $(PS2SDK)/samples/Makefile.pref
2018-09-18 06:08:06 +00:00
include $(PS2SDK)/samples/Makefile.eeglobal
#Linking with C++
2018-12-24 15:15:05 +00:00
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)