Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
jo3_sum
Posts: 17 Joined: Wed Jan 30, 2008 5:38 am
Contact:
Post
by jo3_sum » Sun Nov 09, 2008 7:44 pm
Hi, I seem to be having something incorrect inside the Makefile. Can someone point it out to me? Thanks in advance.
Makefile
Code: Select all
TARGET = Test
PSP_EBOOT_ICON = ICON0.png
PSP_EBOOT_ICON1 = NULL
PSP_EBOOT_PIC1 = NULL
PSP_EBOOT_SND0 = NULL
OBJS = main.o c/Source/adhoc.o
LIBS =C:/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lpspaudiolib -lpspaudio -lpspgu -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan -lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm -lpspumd -lpspctrl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpspnet_inet -lpsputility
BUILD_PRX = 1
PSP_FW_VERSION=401
INCDIR = -I. -I C:/pspdev/psp/sdk/include
CFLAGS = -Os -O2 -g -G0 -Wall -O3
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR = -L. -L C:/pspdev/psp/sdk/lib -L$C:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/psp/sdk/lib/linkfile.prx
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Test
#USE_PSPSDK_LIBC = 1
USE_USER_LIBS = 1
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Debug: all
all: EBOOT.PBP
# cp eboot.pbp $(MOUNT_POINT)
EBOOT.PBP: PARAM.SFO a.prx $(PSP_EBOOT_ICON) $(PSP_EBOOT_FOREGROUND) $(PSP_EBOOT_BACKGROUND) $(PSP_EBOOT_ANIM) $(PSP_EBOOT_SND0)
pack-pbp $@ PARAM.SFO $(PSP_EBOOT_ICON) $(PSP_EBOOT_ANIM) $(PSP_EBOOT_FOREGROUND) $(PSP_EBOOT_BACKGROUND) $(PSP_EBOOT_SND0) a.prx NULL
PARAM.SFO: a.prx
mksfo $(PSP_EBOOT_TITLE) $@
a.prx: a.elf
psp-prxgen $< $@
a.elf: $(OBJECTS) Makefile
psp-gcc $(CXXFLAGS) $(LIBDIR) $(OBJECTS) $(LIBS) -o $@
psp-fixup-imports $@
main.o: main.c
psp-g++ $(INCDIR) $(CXXFLAGS) -c -o $@ $<
c/Source/adhoc.o: c/Source/adhoc.cpp c/Source/adhoc.h
psp-g++ $(INCDIR) $(CXXFLAGS) -c -o $@ $<
NULL:
cleanall: clean
clean:
rm -f $(OBJECTS) a.elf a_strip.elf PARAM.SFO EBOOT.PBP
Compiler Output:
Code: Select all
C:\Users\Joe\Desktop\misc\psp>make
makefile:41: warning: overriding commands for target `EBOOT.PBP'
C:/pspdev/psp/sdk/lib/build.mak:188: warning: ignoring old commands for target `
EBOOT.PBP'
makefile:44: warning: overriding commands for target `PARAM.SFO'
C:/pspdev/psp/sdk/lib/build.mak:184: warning: ignoring old commands for target `
PARAM.SFO'
makefile:70: warning: overriding commands for target `clean'
C:/pspdev/psp/sdk/lib/build.mak:207: warning: ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C:/pspdev/psp/sdk/lib -L:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/psp/sdk/lib/linkfile.prx . C:/pspdev/psp/sd
k/lib C:/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lpspaudiolib -lpspaudio -
lpspgu -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan -lpspn
et -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm -lpspumd -lpspctrl -lp
spdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspnet_apctl
-lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lpspge -l
pspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lp
sputility -lpspuser -o a.elf
c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: .: No such file:
Permission denied
collect2: ld returned 1 exit status
make: *** [a.elf] Error 1
C:\Users\Joe\Desktop\misc\psp>c:\pspdev\bin\..\lib\gcc\psp\4.1.2
\..\..\..\..\psp\bin\ld.exe
c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: no input files
C:\Users\Joe\Desktop\misc\psp>
Wally
Posts: 663 Joined: Mon Sep 26, 2005 11:25 am
Post
by Wally » Sun Nov 09, 2008 8:30 pm
You haven't chmodded the directory
Read the toolchain instructions where it says Chmod rarara +rwx or something
jo3_sum
Posts: 17 Joined: Wed Jan 30, 2008 5:38 am
Contact:
Post
by jo3_sum » Mon Nov 10, 2008 3:55 am
Because I am not on linux and I don't have cygwin, I assumed I am not able to use chmod , so i tried CACLS and ICACLS, supposely the windows equivalent, and it still did not work.
Code: Select all
C:\pspdev\psp\bin>cacls ld.exe /E /G "Joe":F
processed file: C:\pspdev\psp\bin\ld.exe
......
......
......
C:\Users\Joe\Desktop\misc\psp>make
makefile:36: warning: overriding commands for target `EBOOT.PBP'
C:/pspdev/psp/sdk/lib/build.mak:188: warning: ignoring old commands for target `
EBOOT.PBP'
makefile:39: warning: overriding commands for target `PARAM.SFO'
C:/pspdev/psp/sdk/lib/build.mak:184: warning: ignoring old commands for target `
PARAM.SFO'
makefile:65: warning: overriding commands for target `clean'
C:/pspdev/psp/sdk/lib/build.mak:207: warning: ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C:/pspdev/psp/sdk/lib -L:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/psp/sdk/lib/linkfile.prx . C:/pspdev/psp/sd
k/lib C:/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lmikmod -lpspaudiolib -lpspa
udio -lpspgu -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan
-lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm -lpspumd -lpspc
trl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lp
spge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resol
ver -lpsputility -lpspuser -o a.elf
c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: .: No such file:
Permission denied
collect2: ld returned 1 exit status
make: *** [a.elf] Error 1
C:\Users\Joe\Desktop\misc\psp>
......
......
......
C:\pspdev\psp\bin>icacls ld.exe /grant "Joe":(NP)(RX) /T
processed file: ld.exe
Successfully processed 1 files; Failed processing 0 files
......
......
......
C:\Users\Joe\Desktop\misc\psp>make
makefile:36: warning: overriding commands for target `EBOOT.PBP'
C:/pspdev/psp/sdk/lib/build.mak:188: warning: ignoring old commands for target `
EBOOT.PBP'
makefile:39: warning: overriding commands for target `PARAM.SFO'
C:/pspdev/psp/sdk/lib/build.mak:184: warning: ignoring old commands for target `
PARAM.SFO'
makefile:65: warning: overriding commands for target `clean'
C:/pspdev/psp/sdk/lib/build.mak:207: warning: ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C:/pspdev/psp/sdk/lib -L:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/psp/sdk/lib/linkfile.prx . C:/pspdev/psp/sd
k/lib C:/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lmikmod -lpspaudiolib -lpspa
udio -lpspgu -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan
-lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm -lpspumd -lpspc
trl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lp
spge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resol
ver -lpsputility -lpspuser -o a.elf
c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: .: No such file:
Permission denied
collect2: ld returned 1 exit status
make: *** [a.elf] Error 1
C:\Users\Joe\Desktop\misc\psp>
......
......
......
C:\pspdev\psp\bin>
C:\Users\Joe\Desktop\misc\psp>make
makefile:36: warning: overriding commands for target `EBOOT.PBP'
C:/pspdev/psp/sdk/lib/build.mak:188: warning: ignoring old commands for target `
EBOOT.PBP'
makefile:39: warning: overriding commands for target `PARAM.SFO'
C:/pspdev/psp/sdk/lib/build.mak:184: warning: ignoring old commands for target `
PARAM.SFO'
makefile:65: warning: overriding commands for target `clean'
C:/pspdev/psp/sdk/lib/build.mak:207: warning: ignoring old commands for target `
clean'
psp-gcc -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/psp/sdk/include -
Os -O2 -g -G0 -Wall -O3 -I-I. -I-I -IC:/pspdev/psp/sdk/include -I. -IC:/pspdev/p
sp/sdk/include -Os -O2 -g -G0 -Wall -O3 -fno-exceptions -fno-rtti -D_PSP_FW_VERS
ION=401 -L. -L C:/pspdev/psp/sdk/lib -L:/pspdev/psp/sdk/lib -specs=C:/pspdev/psp
/sdk/lib/prxspecs -Wl,-q,-TC:/pspdev/psp/sdk/lib/linkfile.prx . C:/pspdev/psp/sd
k/lib C:/pspdev/psp/sdk/lib/prxexports.o -lstdc++ -lmikmod -lpspaudiolib -lpspa
udio -lpspgu -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lpspwlan
-lpspnet -lpspusb -lpspusbstor -lpsppower -lpspgum -lpspgu -lm -lpspumd -lpspc
trl -lpspdebug -lpspge -lpspdisplay -lpspsdk -lc -lpspuser -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpspnet_inet -lpsputility -lpspdebug -lpspdisplay -lp
spge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resol
ver -lpsputility -lpspuser -o a.elf
c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: .: No such file:
Permission denied
collect2: ld returned 1 exit status
make: *** [a.elf] Error 1
C:\Users\Joe\Desktop\misc\psp>
CpuWhiz
Posts: 42 Joined: Mon Jun 04, 2007 1:30 am
Post
by CpuWhiz » Mon Nov 10, 2008 6:47 am
c:\pspdev\bin\..\lib\gcc\psp\4.1.2\..\..\..\..\psp\bin\ld.exe: .: No such file:
Permission denied
ld.exe is the program reporting the error, not the file or folder that doesn't have permissions. The "file" is "." or the current working directory. Also INCDIR and LIBDIR add the -I and -L for you. So it should be:
Code: Select all
INCDIR =. C:/pspdev/psp/sdk/include
If you look in the command line it was wrong:
Code: Select all
-I-I. -I-I -IC:/pspdev/psp/sdk/include
Fixing the above and also LIBDIR may make the error go away. It looks like it's thinking the current working directory is an object file it needs to read or something since the command line arguments are wrong.
jo3_sum
Posts: 17 Joined: Wed Jan 30, 2008 5:38 am
Contact:
Post
by jo3_sum » Mon Nov 10, 2008 8:49 am
Same result.
jsharrad
Posts: 100 Joined: Thu Oct 20, 2005 3:06 am
Post
by jsharrad » Mon Nov 10, 2008 7:21 pm
Why so complex anyway? why not just use the build.mak that comes with the SDK?
I see just a small error that's making a.elf not get your objects compiled in, you have them defined as "OBJS", but later try to compile with the undefined "OBJECTS".