pspgl-test doesn't compile...

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

pspgl-test doesn't compile...

Post by dark_zarkon »

hello!! :)

i have installed the latest version of toolchain and it works fine, i have installe d other lib and works.

but pspgl doesn't work!

when i try to compile it give me this cygwin give me this error:

Code: Select all

make: *** No rule to make target '../ligGL.a' needed by 'bezier.elf' Stop
thanks
i'm italian...
forgive me for my english! :)
Gary13579
Posts: 93
Joined: Mon Aug 15, 2005 7:43 am

Post by Gary13579 »

Check the folder /usr/bin/local/pspdev/psp/libs (it should be somewhere around there... can't remember the exact path as I don't have access to my dev PC right now). Make sure the file ligGL.a is in there. I'm thinking that the lib isn't there.
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

Gary13579 wrote:Check the folder /usr/bin/local/pspdev/psp/libs (it should be somewhere around there... can't remember the exact path as I don't have access to my dev PC right now). Make sure the file ligGL.a is in there. I'm thinking that the lib isn't there.
that lib is in the dir:

C:\cygwin\usr\local\pspdev\psp\lib

but the compiler doesn't find that! why?
i'm italian...
forgive me for my english! :)
Gary13579
Posts: 93
Joined: Mon Aug 15, 2005 7:43 am

Post by Gary13579 »

Hmm.. post your makefile?
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

Code: Select all

ARCH = psp-
CC = $(ARCH)gcc
AS = $(ARCH)as
STRIP = $(ARCH)strip
SIZE = $(ARCH)size
MKSFO = mksfo
PACK_PBP = pack-pbp
FIXUP_IMPORTS = psp-fixup-imports
RM = rm -f

PSPPATH := $(shell psp-config --pspsdk-path)
PSPGL_LFLAGS = -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lpsprtc
CFLAGS = -g -Wall -O2 -MD -I.. -I$(PSPPATH)/include
LFLAGS = -g -Wall -O2 -DMODULE_NAME="$(TARGET)" psp-setup.c -L.. -L$(PSPPATH)/lib $(PSPGL_LFLAGS)

TARGET = bezier
OBJS = simple.o 

EXTRA_TARGETS = EBOOT.PBP
BUILDDATE = $(shell date "+%Y/%m/%d %k:%M:%S")
PSP_EBOOT_TITLE = $(TARGET) $(BUILDDATE)
PSP_EBOOT_ICON = NULL
PSP_EBOOT_ICON1 = NULL
PSP_EBOOT_UNKPNG = NULL
PSP_EBOOT_PIC1 = NULL
PSP_EBOOT_SND0 = NULL
PSP_EBOOT_PSAR = NULL

PSPSDK=$(shell psp-config --pspsdk-path)


all: EBOOT.PBP


%.o: %.raw
	(sym=`echo $* | tr '-' '_'`; \
	 echo -e ".data\n.global $$&#123;sym&#125;_start\n$$&#123;sym&#125;_start&#58;\n\t.incbin \"$<\"" | $&#40;AS&#41; -o $@&#41;

%.raw&#58; %.png
	convert -geometry 64x64 $< rgba&#58;$@

.c.o&#58;
	$&#40;CC&#41; $&#40;CFLAGS&#41; -c $<

$&#40;TARGET&#41;.elf&#58; $&#40;OBJS&#41; ../libGL.a ../libglut.a
	$&#40;CC&#41; $&#40;OBJS&#41; $&#40;LFLAGS&#41; -o $@

EBOOT.PBP&#58; $&#40;TARGET&#41;.elf
	$&#40;FIXUP_IMPORTS&#41; $&#40;TARGET&#41;.elf
	$&#40;MKSFO&#41; '$&#40;PSP_EBOOT_TITLE&#41;' $&#40;TARGET&#41;.sfo
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o $&#40;TARGET&#41;_strip.elf
	@echo -------------------------------------------------------------------------------------
	$&#40;SIZE&#41; $&#40;TARGET&#41;_strip.elf
	@echo -------------------------------------------------------------------------------------
	$&#40;PACK_PBP&#41; EBOOT.PBP $&#40;TARGET&#41;.sfo $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41;  $&#40;TARGET&#41;_strip.elf $&#40;PSP_EBOOT_PSAR&#41;

install&#58; all $&#40;shell uname&#41;-install

Darwin-install&#58;
	@test -d "/Volumes/PSP STICK/" || \
		echo =========== PSP not connected, not installing =======================================
	@test -d "/Volumes/PSP STICK/"
	@echo ============= image done, now install on PSP ========================================
	rm -f "/Volumes/PSP STICK/log.txt"
	rm -f "/Volumes/PSP STICK/pspgl.ge"
	rm -rf "/Volumes/PSP STICK/PSP/GAME/$&#40;TARGET&#41;"
	mkdir "/Volumes/PSP STICK/PSP/GAME/$&#40;TARGET&#41;"
	cp -v EBOOT.PBP "/Volumes/PSP STICK/PSP/GAME/$&#40;TARGET&#41;/"
	sync

MOUNT=/mnt/stick
DIR=$&#40;MOUNT&#41;/psp/game

Linux-install&#58; EBOOT.PBP
	while &#91; ! -d $&#40;DIR&#41; &#93;; do mount $&#40;MOUNT&#41;; sleep 1; done
	mkdir -p $&#40;DIR&#41;/$&#40;TARGET&#41;
	mkdir -p $&#40;DIR&#41;/$&#40;TARGET&#41;%
	cp $&#40;TARGET&#41;_strip.elf $&#40;DIR&#41;/$&#40;TARGET&#41;/EBOOT.PBP
	cp EBOOT.PBP $&#40;DIR&#41;/$&#40;TARGET&#41;%/
	umount $&#40;MOUNT&#41;

clean&#58;
	$&#40;RM&#41; *.d *.o *.a *.elf *.sfo EBOOT.PBP

-include $&#40;wildcard *.d&#41; dummy

what can i do?
i'm italian...
forgive me for my english! :)
Gary13579
Posts: 93
Joined: Mon Aug 15, 2005 7:43 am

Post by Gary13579 »

No idea... do the samples compile?
Or is this one of the samples?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

You're telling it the target elf requires libGL.a and libglut.a from the parent directory of where the makefile is at... which I'm guessing is very not right ;)

...then you have things like $PSPPATH and such being used...

...and $PSPSDK doesn't seem to be used at all...

Is there a reason you are hacking up a complete custom makefile instead of using one based on build.mak like the template? ...
Shoot Pixels Not People!
Makeshift Development
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

hi! i made a little progress but i'm stuck with this...

i have moved the folder "test-bezier" in

C:\cygwin\usr\local\pspdev\psp\sdk\samples\

and included this line in the makefile:

include c:\cygwin\usr\local\pspdev\psp\sdk\lib\build.mak

but i have this error:

Code: Select all

/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/crt0.o&#58; In function '_main'&#58;

/home/user/newtoolchain/pspsdk/src/startup/crt0.c&#58;86&#58; undefined reference to 'main'
collect2&#58; ld returned 1exit status
make&#58; *** &#91;.elf&#93; error 1
what can i do?

i'm very noob with cygwin and makefile because i use visual c++ :) but i want to learn!

good bye!
i'm italian...
forgive me for my english! :)
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Drakonite wrote:You're telling it the target elf requires libGL.a and libglut.a from the parent directory of where the makefile is at... which I'm guessing is very not right ;)

...then you have things like $PSPPATH and such being used...

...and $PSPSDK doesn't seem to be used at all...

Is there a reason you are hacking up a complete custom makefile instead of using one based on build.mak like the template? ...
Do you think this might be because he just doesn't have the path stuff setup properly, if at all? It's a very common problem, and it causes you to mess up your makefile with direct paths to compensate.

If so, I'd suggest him digging up one of the many instructions on setting that up in bash.rc on these forums, as that's what I did and worked best.

Either that, or maybe he did a make in pspgl, but then forgot the make install?
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

Arwin wrote:
Drakonite wrote:You're telling it the target elf requires libGL.a and libglut.a from the parent directory of where the makefile is at... which I'm guessing is very not right ;)

...then you have things like $PSPPATH and such being used...

...and $PSPSDK doesn't seem to be used at all...

Is there a reason you are hacking up a complete custom makefile instead of using one based on build.mak like the template? ...
Do you think this might be because he just doesn't have the path stuff setup properly, if at all? It's a very common problem, and it causes you to mess up your makefile with direct paths to compensate.

If so, I'd suggest him digging up one of the many instructions on setting that up in bash.rc on these forums, as that's what I did and worked best.

Either that, or maybe he did a make in pspgl, but then forgot the make install?
i found how to set up bash.rc and make it, and i don't forgot to make install the pspgl but i doesn't work... :(
i'm italian...
forgive me for my english! :)
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

i have solved my problem!!

now i can compile with pspgl, reinstalled cygwin, toolchain, and lib...

now i must solve the problem with sdl...
i'm italian...
forgive me for my english! :)
Post Reply