mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
105 lines
2.7 KiB
Makefile
105 lines
2.7 KiB
Makefile
BUILD_FOR_PCSX2 = 0
|
|
DEBUG = 0
|
|
HAVE_LOGGER = 0
|
|
HAVE_FILE_LOGGER = 0
|
|
HAVE_THREADS = 0
|
|
MUTE_WARNINGS = 1
|
|
PS2_IP = 192.168.1.150
|
|
|
|
TARGET = retroarchps2.elf
|
|
TARGET_RELEASE = retroarchps2-release.elf
|
|
|
|
# Compile the IRXs first
|
|
IRX_DIR = ps2/irx
|
|
IRX_FILES = $(wildcard ps2/irx/*.c)
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
OPTIMIZE_LV := -O0 -g
|
|
RARCH_DEFINES += -DDEBUG
|
|
else
|
|
OPTIMIZE_LV := -O3
|
|
LDFLAGS := -s
|
|
endif
|
|
|
|
ifeq ($(MUTE_WARNINGS), 1)
|
|
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
|
endif
|
|
|
|
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
|
INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
|
INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
|
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
|
ASFLAGS = $(CFLAGS)
|
|
|
|
RARCH_DEFINES += -DPS2 -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI
|
|
RARCH_DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
|
|
|
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
|
# Lib cdvd is needed to get proper time
|
|
LIBS += -lretro_ps2 -lpatches -lpoweroff -lgskit -ldmakit -laudsrv -lpadx -lmtap -lz -lcdvd
|
|
|
|
ifeq ($(BUILD_FOR_PCSX2), 1)
|
|
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
|
endif
|
|
|
|
ifeq ($(HAVE_THREADS), 1)
|
|
RARCH_DEFINES += -DHAVE_THREADS
|
|
endif
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
endif
|
|
|
|
CFLAGS += $(RARCH_DEFINES)
|
|
|
|
# All the IRX objects
|
|
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
|
|
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
|
|
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
|
|
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
|
|
|
# Missing objecst on the PS2SDK
|
|
EE_OBJS += ps2/compat_files/ps2_devices.o
|
|
|
|
EE_OBJS += griffin/griffin.o
|
|
|
|
EE_CFLAGS = $(CFLAGS)
|
|
EE_CXXFLAGS = $(CFLAGS)
|
|
EE_LDFLAGS = $(LDFLAGS)
|
|
EE_LIBS = $(LIBS)
|
|
EE_ASFLAGS = $(ASFLAGS)
|
|
EE_INCS = $(INCDIR)
|
|
EE_BIN = $(TARGET)
|
|
EE_GPVAL = $(GPVAL)
|
|
|
|
|
|
all: irxdir $(EE_BIN)
|
|
|
|
irxdir:
|
|
$(MAKE) -C $(IRX_DIR)
|
|
|
|
clean:
|
|
rm -f $(EE_BIN) $(EE_OBJS)
|
|
$(MAKE) -C $(IRX_DIR) clean
|
|
|
|
prepare:
|
|
ps2client -h $(PS2_IP) reset
|
|
ps2client -h $(PS2_IP) netdump
|
|
|
|
run:
|
|
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
|
|
|
sim:
|
|
PCSX2 --elf=$(PWD)/$(EE_BIN) --nogui
|
|
|
|
debug: clean all run
|
|
|
|
package:
|
|
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
|
|
|
release: clean all package
|
|
|
|
#Include preferences
|
|
include $(PS2SDK)/samples/Makefile.pref
|
|
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|