Hi people,
@Criptych, thanks for the pointers, have been trying to do this but I am stuck at the following places:
Code: Select all
ifeq ($(BUILD_PRX),1)
LDFLAGS := $(addprefix -L,$(LIBDIR)) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
EXTRA_CLEAN += $(TARGET).elf
# Setup default exports if needed
ifdef PRX_EXPORTS
EXPORT_OBJ=$(patsubst %.exp,%.o,$(PRX_EXPORTS))
EXTRA_CLEAN += $(EXPORT_OBJ)
else
EXPORT_OBJ=$(PSPSDK)/lib/prxexports.o
endif
else
LDFLAGS := $(addprefix -L,$(LIBDIR)) $(LDFLAGS)
endif
Now as far as I understand this, it LDFLAGS are linker flags, the same as all the -lpspkernel -lc etc. Can I just copy this lines, fill in the variables and expect it to work correctly or do I have to change it somewhat?
Code: Select all
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) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
SCEkxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
mkdir -p "__SCE__$(TARGET)"
$(STRIP) $(TARGET).elf -o __SCE__$(TARGET)/$(PSP_EBOOT)
mkdir -p "%__SCE__$(TARGET)"
$(PACK_PBP) "%__SCE__$(TARGET)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
$(TARGET).elf: $(OBJS) $(EXPORT_OBJ)
$(LINK.c) $^ $(LIBS) -o $@
$(FIXUP) $@
$(TARGET_LIB): $(OBJS)
$(AR) cru $@ $(OBJS)
$(RANLIB) $@
$(PSP_EBOOT_SFO):
$(MKSFO) '$(PSP_EBOOT_TITLE)' $@
ifeq ($(BUILD_PRX),1)
$(PSP_EBOOT): $(TARGET).prx $(PSP_EBOOT_SFO)
$(PACK_PBP) $(PSP_EBOOT) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) $(TARGET).prx $(PSP_EBOOT_PSAR)
else
$(PSP_EBOOT): $(TARGET).elf $(PSP_EBOOT_SFO)
$(STRIP) $(TARGET).elf -o $(TARGET)_strip.elf
$(PACK_PBP) $(PSP_EBOOT) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) $(TARGET)_strip.elf $(PSP_EBOOT_PSAR)
-rm -f $(TARGET)_strip.elf
endif
The last part I get, see the batch file below.
What does the all: line mean? it does not seem to do anything?
the kxploit part is that neccesary? as it also does the pbp stuff. And what does the first line of the kxploit part mean? the rest is basicly batchfile stuff for creating the 2 directory with the correct files, but the first line is somewhat more difficult to translate.
The target elf: part seems to be the normal build process of all the sourcefiles, done by codeblocks now. the fixup is also in that line, do I have to start my batch file with the fixup? as yo usaid it is important.
And what does the targetlib part do?
Code: Select all
%.prx: %.elf
psp-prxgen $< $@
%.c: %.exp
psp-build-exports -b $< > $@
How do I read this? psp-prxgen source target, where source = %.elf and target is %.prx, for which both the % stands for ?
And finally: I'm a little bit confused, it seems to me that an elf file is build, but all the option BUILD_PRX is overwriting, not creating an elf, but still it needs elfs? what am I not seeing regarding this?
CURRENT BATCH FILE (without the above issues):
Code: Select all
@echo off
@echo Create the Title.sfo
"C:\cygwin\usr\local\pspdev\bin\mksfo.exe" GameTitle title.sfo
@echo Create the EBOOT.PBP
"C:\cygwin\usr\local\pspdev\bin\pack-pbp.exe" EBOOT.PBP title.sfo NULL NULL NULL NULL NULL bin\Debug\GameTitle.prx NULL
@echo PRX-gen
"C:\cygwin\usr\local\pspdev\bin\psp-prxgen.exe" bin\Debug\GameTitle.elf bin\Debug\GameTitle.prx
@echo Clean up all the files
copy bin\Debug\GameTitle.prx GameTitle\GT.prx
del title.sfo
del bin\Debug\GameTitle.prx
@echo Copy the executables and setup correct file structure!
md GameTitle
copy EBOOT.PBP GameTitle\EBOOT.PBP
del EBOOT.PBP
I hope you can help me a little bit further, every piece of info is more than welcome!
With kind regards