| View previous topic :: View next topic |
| Author |
Message |
rasmus
Joined: 21 Jul 2004 Posts: 17 Location: Göteborg, Sweden
|
Posted: Tue Jul 05, 2005 11:22 pm Post subject: Suggestion for improved build.mak script |
|
|
Hi!
I have made some changes to build.mak in pspsdk, for easier use on v1.5 psp.
In the target kxploit I have changed the path names in order to hide the "corrupted data" entries in the vsh.
I have added the target kx-install which installs the kx directories to the user specified PSP_MOUNT variable, which could be for example /cygdrive/e in cygwin or /mnt/psp in Linux.
Here is the patch. I have only tested it on cygwin so if anyone feels like testing it on Linux and MacOSX it would be great.
| Code: |
--- build.mak (revision 501)
+++ build.mak (working copy)
@@ -90,16 +90,29 @@
FINAL_TARGET = $(TARGET).elf
endif
+KXTARGET = $(shell echo $(TARGET)000000 | cut -b1-6)
+KXDIR = $(KXTARGET)_________________________1
+KXDUMMY = $(KXTARGET)~1%
+
all: $(EXTRA_TARGETS) $(FINAL_TARGET)
kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
- mkdir -p "$(TARGET)"
- $(STRIP) $(TARGET).elf -o $(TARGET)/$(PSP_EBOOT)
- mkdir -p "$(TARGET)%"
- $(PACK_PBP) "$(TARGET)%/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
+ mkdir -p "$(KXDIR)"
+ $(STRIP) $(TARGET).elf -o $(KXDIR)/$(PSP_EBOOT)
+ mkdir -p "$(KXDUMMY)"
+ $(PACK_PBP) "$(KXDUMMY)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
+kx-install: kxploit
+ifeq ($(PSP_MOUNT),)
+ @echo '*** Error: $$(PSP_MOUNT) undefined. Please set it to for example /cygdrive/e'
+ @echo if your PSP is mounted to E: in cygwin.
+else
+ cp -r $(KXDIR) $(PSP_MOUNT)/PSP/GAME/
+ cp -r $(KXDUMMY) $(PSP_MOUNT)/PSP/GAME/
+endif
+
$(TARGET).elf: $(OBJS)
$(LINK.c) $^ $(LIBS) -o $@
@@ -118,3 +131,4 @@
clean: $(EXTRA_CLEAN)
-rm -f $(FINAL_TARGET) $(OBJS) $(PSP_EBOOT_SFO) $(PSP_EBOOT)
+ -rm -r $(KXDIR) $(KXDUMMY)
|
|
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Wed Jul 06, 2005 1:15 am Post subject: |
|
|
We can go with the modifications to the kxploit target, but I don't want to add targets that do install.
It's easy to add custom targets yourself if you add your target after build.mak has been included in your Makefile. Chp's GU samples do this for binary data. |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Wed Jul 06, 2005 6:43 pm Post subject: |
|
|
| why not make the install do the corrupt icon hiding trick... then no changes to build.mak are necessary. |
|
| Back to top |
|
 |
0x0001

Joined: 21 Jul 2005 Posts: 11
|
Posted: Tue Sep 20, 2005 11:02 am Post subject: |
|
|
thanx for this patch rasmus :)
also yes i agree install should be
patched and not build.mak
something like
make kxploit -hide or
make kxploit -hidecor or
whatever naming change
would be very appreciated
or can this patch be applied
to say adding a operator in makefile
something along the lines of
EXTRA_TARGETS = EBOOT.PBP -HC
or is it more like
CFLAGS = -O2 -G0 -Wall -HC
this patch works like a charm :)
but would be more efficient if
this patch was not needed on build.mak
just in case of 1.0 EBOOT.PBPs |
|
| Back to top |
|
 |
|