From 257829f8698a04b0484431c05b99b4a76364e37e Mon Sep 17 00:00:00 2001 From: Matias Israelson <57065102+israpps@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:17:40 -0300 Subject: [PATCH] [mx4sio]: switch to libmodhook --- iop/sio/mx4sio_bd/Makefile | 12 +++++++++++- iop/sio/mx4sio_bd/src/mx4sio.c | 3 ++- iop/sio/mx4sio_bd/src/sio2man_hook.c | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/iop/sio/mx4sio_bd/Makefile b/iop/sio/mx4sio_bd/Makefile index ddbbd06c4c52..840c4dc1e343 100644 --- a/iop/sio/mx4sio_bd/Makefile +++ b/iop/sio/mx4sio_bd/Makefile @@ -6,12 +6,22 @@ # Licenced under Academic Free License version 2.0 # Review ps2sdk README & LICENSE files for further details. -IOP_INCS += -I$(PS2SDKSRC)/iop/fs/bdm/include -I$(PS2SDKSRC)/iop/system/sio2man/include +MODHOOK_PATH = $(PS2SDKSRC)/iop/utilities/modhook/ +IOP_INCS += -I$(PS2SDKSRC)/iop/fs/bdm/include -I$(PS2SDKSRC)/iop/system/sio2man/include -I$(MODHOOK_PATH)include +IOP_LIB_ARCHIVES = $(MODHOOK_PATH)lib/libmodhook.a IOP_OBJS += spi_sdcard_crc7.o spi_sdcard_driver.o crc16.o ioplib.o sio2man_hook.o mx4sio.o imports.o IOP_LDFLAGS = -lgcc + +$(MODHOOK_PATH)lib/libmodhook.a: + $(MAKEREC) $(MODHOOK_PATH) + +.NOTPARALLEL:: \ + $(IOP_LIB_ARCHIVES) + + include $(PS2SDKSRC)/Defs.make include $(PS2SDKSRC)/iop/Rules.bin.make include $(PS2SDKSRC)/iop/Rules.make diff --git a/iop/sio/mx4sio_bd/src/mx4sio.c b/iop/sio/mx4sio_bd/src/mx4sio.c index ac96710f326c..6acc47f39b22 100644 --- a/iop/sio/mx4sio_bd/src/mx4sio.c +++ b/iop/sio/mx4sio_bd/src/mx4sio.c @@ -7,9 +7,10 @@ #include #include +#include + #include "mx4sio.h" #include "crc16.h" -#include "ioplib.h" #include "sio2man_hook.h" #include "sio2regs.h" #include "spi_sdcard_driver.h" diff --git a/iop/sio/mx4sio_bd/src/sio2man_hook.c b/iop/sio/mx4sio_bd/src/sio2man_hook.c index 33e3d1a5a08c..212cfc07a298 100644 --- a/iop/sio/mx4sio_bd/src/sio2man_hook.c +++ b/iop/sio/mx4sio_bd/src/sio2man_hook.c @@ -1,8 +1,8 @@ #include #include #include +#include -#include "ioplib.h" #include "sio2man.h" #include "sio2man_hook.h"