2020-06-05 20:01:10 +00:00
|
|
|
BUILD_FOR_PCSX2 = 0
|
2019-02-25 22:43:34 +00:00
|
|
|
DEBUG = 0
|
2021-08-07 19:59:16 +00:00
|
|
|
SCREEN_DEBUG = 0
|
2018-09-18 06:08:06 +00:00
|
|
|
HAVE_THREADS = 0
|
2019-03-09 13:11:04 +00:00
|
|
|
MUTE_WARNINGS = 1
|
2021-01-19 13:31:45 +00:00
|
|
|
PS2_IP = 192.168.1.10
|
2018-09-18 06:08:06 +00:00
|
|
|
|
2020-06-07 19:00:47 +00:00
|
|
|
TARGET = retroarchps2-debug.elf
|
|
|
|
TARGET_RELEASE = retroarchps2.elf
|
2018-09-18 06:08:06 +00:00
|
|
|
|
2019-02-25 22:43:34 +00:00
|
|
|
# Compile the IRXs first
|
|
|
|
IRX_DIR = ps2/irx
|
|
|
|
|
2018-09-18 06:08:06 +00:00
|
|
|
ifeq ($(DEBUG), 1)
|
2018-10-18 22:56:14 +00:00
|
|
|
OPTIMIZE_LV := -O0 -g
|
2018-10-17 19:11:21 +00:00
|
|
|
RARCH_DEFINES += -DDEBUG
|
2018-09-18 06:08:06 +00:00
|
|
|
else
|
2020-06-07 17:42:29 +00:00
|
|
|
OPTIMIZE_LV := -O3
|
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)
|
2021-01-30 14:46:02 +00:00
|
|
|
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
2019-01-04 00:30:56 +00:00
|
|
|
endif
|
|
|
|
|
2019-10-07 21:45:54 +00:00
|
|
|
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
2020-04-29 18:16:21 +00:00
|
|
|
INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
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)
|
|
|
|
|
2021-10-14 13:57:28 +00:00
|
|
|
RARCH_DEFINES += -DPS2 \
|
|
|
|
-DHAVE_GRIFFIN=1 \
|
|
|
|
-DRARCH_INTERNAL \
|
|
|
|
-DHAVE_SCREENSHOTS \
|
|
|
|
-DHAVE_REWIND \
|
|
|
|
-DRARCH_CONSOLE \
|
|
|
|
-DHAVE_MENU \
|
|
|
|
-DHAVE_CONFIGFILE \
|
|
|
|
-DHAVE_PATCH \
|
|
|
|
-DHAVE_CHEATS \
|
|
|
|
-DHAVE_ZLIB \
|
|
|
|
-DHAVE_NO_BUILTINZLIB \
|
|
|
|
-DHAVE_RPNG \
|
|
|
|
-DHAVE_RJPEG \
|
|
|
|
-DHAVE_FILTERS_BUILTIN \
|
|
|
|
-DHAVE_7ZIP \
|
|
|
|
-D_7ZIP_ST \
|
|
|
|
-DHAVE_CC_RESAMPLER \
|
|
|
|
-DHAVE_AUDIOMIXER \
|
|
|
|
-DHAVE_WINDOW_OFFSET \
|
|
|
|
-DHAVE_VIDEO_FILTER \
|
|
|
|
-DHAVE_RGUI \
|
|
|
|
-DHAVE_DSP_FILTER \
|
|
|
|
-DHAVE_CORE_INFO_CACHE
|
2018-09-18 06:08:06 +00:00
|
|
|
|
2020-04-29 18:16:21 +00:00
|
|
|
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
2020-06-05 20:01:10 +00:00
|
|
|
# Lib cdvd is needed to get proper time
|
2021-08-07 19:59:16 +00:00
|
|
|
LIBS += -lretro_ps2 -lpatches -lgskit -ldmakit -laudsrv -lmtap -lpadx -lz -lcdvd -lelf-loader -lfileXio -lpoweroff
|
2018-09-18 06:08:06 +00:00
|
|
|
|
2021-08-07 19:59:16 +00:00
|
|
|
ifeq ($(SCREEN_DEBUG), 1)
|
|
|
|
LIBS += -ldebug
|
|
|
|
RARCH_DEFINES += -DSCREEN_DEBUG
|
|
|
|
endif
|
|
|
|
|
2019-09-29 20:41:51 +00:00
|
|
|
ifeq ($(BUILD_FOR_PCSX2), 1)
|
|
|
|
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
|
|
|
endif
|
2018-09-18 06:08:06 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_THREADS), 1)
|
|
|
|
RARCH_DEFINES += -DHAVE_THREADS
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += $(RARCH_DEFINES)
|
|
|
|
|
2019-02-25 22:43:34 +00:00
|
|
|
# All the IRX objects
|
2021-01-23 23:04:04 +00:00
|
|
|
EE_OBJS += $(IRX_DIR)/sio2man_irx.o $ $(IRX_DIR)/iomanX_irx.o $(IRX_DIR)/fileXio_irx.o
|
|
|
|
EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o
|
2021-07-21 22:03:18 +00:00
|
|
|
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/bdm_irx.o $(IRX_DIR)/bdmfs_vfat_irx.o $(IRX_DIR)/usbmass_bd_irx.o
|
2021-01-15 22:04:03 +00:00
|
|
|
EE_OBJS += $(IRX_DIR)/libsd_irx.o $(IRX_DIR)/audsrv_irx.o
|
2021-01-23 23:04:04 +00:00
|
|
|
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
2021-09-07 17:09:56 +00:00
|
|
|
EE_OBJS += $(IRX_DIR)/ps2dev9_irx.o $(IRX_DIR)/ps2atad_irx.o $(IRX_DIR)/ps2hdd_irx.o $(IRX_DIR)/ps2fs_irx.o $(IRX_DIR)/poweroff_irx.o
|
2021-01-23 23:04:04 +00:00
|
|
|
EE_OBJS += $(IRX_DIR)/mtapman_irx.o $(IRX_DIR)/padman_irx.o
|
2019-02-25 22:43:34 +00:00
|
|
|
|
2018-09-18 06:08:06 +00:00
|
|
|
# Missing objecst on the PS2SDK
|
2021-01-23 23:04:04 +00:00
|
|
|
EE_OBJS += ps2/compat_files/ps2_devices.o
|
2018-09-18 06:08:06 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
EE_BIN = $(TARGET)
|
|
|
|
EE_GPVAL = $(GPVAL)
|
|
|
|
|
2019-02-25 18:29:56 +00:00
|
|
|
|
2019-02-25 22:43:34 +00:00
|
|
|
all: irxdir $(EE_BIN)
|
2019-02-25 18:29:56 +00:00
|
|
|
|
2019-02-25 22:43:34 +00:00
|
|
|
irxdir:
|
|
|
|
$(MAKE) -C $(IRX_DIR)
|
2018-09-18 06:08:06 +00:00
|
|
|
|
|
|
|
clean:
|
2019-02-25 22:43:34 +00:00
|
|
|
rm -f $(EE_BIN) $(EE_OBJS)
|
|
|
|
$(MAKE) -C $(IRX_DIR) clean
|
2018-09-18 06:08:06 +00:00
|
|
|
|
|
|
|
prepare:
|
|
|
|
ps2client -h $(PS2_IP) reset
|
|
|
|
ps2client -h $(PS2_IP) netdump
|
|
|
|
|
|
|
|
run:
|
|
|
|
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
|
|
|
|
2019-10-07 21:45:54 +00:00
|
|
|
sim:
|
|
|
|
PCSX2 --elf=$(PWD)/$(EE_BIN) --nogui
|
|
|
|
|
|
|
|
debug: clean all run
|
2018-09-18 06:08:06 +00:00
|
|
|
|
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
|
|
|
#Include preferences
|
2019-02-03 23:49:35 +00:00
|
|
|
include $(PS2SDK)/samples/Makefile.pref
|
2019-10-07 21:45:54 +00:00
|
|
|
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|