For example, to compile and install on PSP with corrupted data hidden (use the appropriate destination directory for your system):
make kxploit2-install INSTALL_DIR=/media/usbdisk/psp/game
Code: Select all
--- build.mak 2005-08-17 12:10:42.000000000 -0700
+++ mine/build.mak 2005-08-17 12:10:10.000000000 -0700
@@ -90,6 +90,19 @@
FINAL_TARGET = $(TARGET).elf
endif
+ifndef TARGET_LONG
+TARGET_LONG:=$(TARGET)_________________________________1
+endif
+
+ifndef TARGET_BASE
+TARGET_BASE:=$(strip $(shell echo "$(TARGET_LONG)" | sed -e 's/\(.\{6\}\).*/\1/'))
+endif
+
+ifndef TARGET_SHORT
+TARGET_SHORT:=$(TARGET_BASE)~1%
+endif
+
+
all: $(EXTRA_TARGETS) $(FINAL_TARGET)
kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
@@ -100,6 +113,27 @@
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
+kxploit2: $(TARGET).elf $(PSP_EBOOT_SFO)
+ mkdir -p "$(TARGET_LONG)"
+ $(STRIP) $(TARGET).elf -o $(TARGET_LONG)/$(PSP_EBOOT)
+ mkdir -p "$(TARGET_SHORT)"
+ $(PACK_PBP) "$(TARGET_SHORT)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
+ $(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
+ $(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
+ @echo "copy $(TARGET_LONG) to psp before $(TARGET_SHORT)"
+
+install-dir-check:
+ test "x$(INSTALL_DIR)" != "x" && test -d "$(INSTALL_DIR)"
+
+kxploit-install: kxploit install-dir-check
+ cp -rf "$(TARGET)" "$(TARGET)%" "$(INSTALL_DIR)"
+
+kxploit2-install: kxploit2 install-dir-check
+ cp -rf "$(TARGET_LONG)" "$(INSTALL_DIR)"
+ sync
+ cp -rf "$(TARGET_SHORT)" "$(INSTALL_DIR)"
+ sync
+
$(TARGET).elf: $(OBJS)
$(LINK.c) $^ $(LIBS) -o $@