Page 1 of 1

GsKit

Posted: Fri Feb 15, 2008 4:05 am
by methos3
Hey, guys.
I am triyng to compile the gsKit using the make clean and then Make install, i use an precompiled toolchain with mingw/msys, and when i do a make install i get a error about the libgskit.a and another file.a
So the gskit cames already cmpiled? if no, what i need to compile it?
Since then, thanks!

ps.: my ps2dev path is: c:/ps2dev
i placed the gsKit dir like this:
c:/ps2dev/gsKit i enter this dir and do a make clean and a meka install and on this stage i receive the error about ligskit.a

Posted: Fri Feb 15, 2008 5:16 am
by Lukasz
The details of your problem are too vague, if you could copy-paste error output, then someone might be able to help you ;-)

Posted: Fri Feb 15, 2008 7:35 am
by Mega Man
I think it is not compiled.
You need first to run "make all" and then "make install".

Posted: Fri Feb 15, 2008 6:53 pm
by Lukasz
There should be a dependency between install and all target in the makefile.

I find it more likely that he doesn't have the $PS2DEV environment variable set.

Posted: Sat Feb 16, 2008 4:46 am
by methos3
hi, people.
sorry for the bad explanation, it's because i wasn't in home...
Now i took the error that msys returns.
Here is them:

first i did a make clean

Code: Select all

Yan@YANSPC /c/ps2dev/gsKit
$ make clean
GSKITSRC=`pwd` make -C ee clean
make[1]: Entering directory `/c/ps2dev/gsKit/ee'
GSKITSRC=/c/ps2dev/gsKit make -C gs clean
make[2]: Entering directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C src clean
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/src'
rm -f gsCore.o gsFont.o gsInit.o gsMisc.o gsPrimitive.o gsTexture.o
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/src'
GSKITSRC=/c/ps2dev/gsKit make -C include clean
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/include'
make[3]: Nothing to be done for `clean'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C dma clean
make[2]: Entering directory `/c/ps2dev/gsKit/ee/dma'
GSKITSRC=/c/ps2dev/gsKit make -C src clean
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/src'
rm -f dmaCore.o dmaInit.o dmaSpr.o
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/src'
GSKITSRC=/c/ps2dev/gsKit make -C include clean
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/include'
make[3]: Nothing to be done for `clean'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/dma'
make[1]: Leaving directory `/c/ps2dev/gsKit/ee'
GSKITSRC=`pwd` make -C examples clean
make[1]: Entering directory `/c/ps2dev/gsKit/examples'
GSKITSRC=/c/ps2dev/gsKit make -C basic clean
make[2]: Entering directory `/c/ps2dev/gsKit/examples/basic'
rm -f basic.o basic.elf
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/basic'
GSKITSRC=/c/ps2dev/gsKit make -C textures clean
make[2]: Entering directory `/c/ps2dev/gsKit/examples/textures'
rm -f textures.o textures.elf
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/textures'
GSKITSRC=/c/ps2dev/gsKit make -C linuz-texture clean
make[2]: Entering directory `/c/ps2dev/gsKit/examples/linuz-texture'
rm -f texture.o testorig.o sample.o texture.elf
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/linuz-texture'
GSKITSRC=/c/ps2dev/gsKit make -C font clean
make[2]: Entering directory `/c/ps2dev/gsKit/examples/font'
rm -f font.o font.elf
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/font'
make[1]: Leaving directory `/c/ps2dev/gsKit/examples'
GSKITSRC=`pwd` make -C lib clean
make[1]: Entering directory `/c/ps2dev/gsKit/lib'
rm -f libgskit.a
rm -f libdmakit.a
make[1]: Leaving directory `/c/ps2dev/gsKit/lib'
and then a make all

Code: Select all

Yan@YANSPC /c/ps2dev/gsKit
$ make all
GSKITSRC=`pwd` make -C ee
make[1]: Entering directory `/c/ps2dev/gsKit/ee'
GSKITSRC=/c/ps2dev/gsKit make -C gs
make[2]: Entering directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C src
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/src'
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsCore.c -o gsCore.o
gsCore.c: In function `gsKit_set_test':
gsCore.c(105) : warning: `return' with a value, in function returning void
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsFont.c -o gsFont.o
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsInit.c -o gsInit.o
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsMisc.c -o gsMisc.o
gsMisc.c: In function `gsKit_vram_dump':
gsMisc.c(50) : warning: `return' with a value, in function returning void
gsMisc.c(42) : warning: unused variable `p_mem'
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsPrimitive.c -o gsPrimitive.o
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsTexture.c -o gsTexture.o
ee-ar rcs /c/ps2dev/gsKit/lib/libgskit.a gsCore.o gsFont.o gsInit.o gsMisc.o gsP
rimitive.o gsTexture.o
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/src'
GSKITSRC=/c/ps2dev/gsKit make -C include
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C dma
make[2]: Entering directory `/c/ps2dev/gsKit/ee/dma'
GSKITSRC=/c/ps2dev/gsKit make -C src
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/src'
ee-gcc -D_EE -O2 -G0 -Wall -Wno-unused -fno-builtin-printf  -I/c/ps2dev/ps2sdk/e
e/include -I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/inc
lude -I/usr/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I
/c/ps2dev/gsKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/inclu
de -I/ee -c dmaCore.c -o dmaCore.o
ee-gcc -D_EE -O2 -G0 -Wall -Wno-unused -fno-builtin-printf  -I/c/ps2dev/ps2sdk/e
e/include -I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/inc
lude -I/usr/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I
/c/ps2dev/gsKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/inclu
de -I/ee -c dmaInit.c -o dmaInit.o
ee-gcc -D_EE -O2 -G0 -Wall -Wno-unused -fno-builtin-printf  -I/c/ps2dev/ps2sdk/e
e/include -I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/inc
lude -I/usr/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I
/c/ps2dev/gsKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/inclu
de -I/ee -c dmaSpr.c -o dmaSpr.o
ee-ar rcs /c/ps2dev/gsKit/lib/libdmakit.a dmaCore.o dmaInit.o dmaSpr.o
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/src'
GSKITSRC=/c/ps2dev/gsKit make -C include
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/dma'
make[1]: Leaving directory `/c/ps2dev/gsKit/ee'
GSKITSRC=`pwd` make -C examples
make[1]: Entering directory `/c/ps2dev/gsKit/examples'
GSKITSRC=/c/ps2dev/gsKit make -C basic
make[2]: Entering directory `/c/ps2dev/gsKit/examples/basic'
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 basic.c -o basic.o
ee-gcc -nostartfiles -T/c/ps2dev/ps2sdk/ee/startup/linkfile -L/c/ps2dev/gsKit/li
b -L/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2 -L/c/ps2dev/ps2sdk/ee/lib -L/lib \

        -o basic.elf /c/ps2dev/ps2sdk/ee/startup/crt0.o basic.o -lgcc -lgskit -l
dmakit -lc -lkernel -lc -lsyscall  -ldebug -lsyscall -lkernel
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/basic'
GSKITSRC=/c/ps2dev/gsKit make -C textures
make[2]: Entering directory `/c/ps2dev/gsKit/examples/textures'
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 textures.c -o textures.o
textures.c: In function `main':
textures.c(19) : warning: unused variable `Tex3'
ee-gcc -nostartfiles -T/c/ps2dev/ps2sdk/ee/startup/linkfile -L/c/ps2dev/gsKit/li
b -L/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2 -L/c/ps2dev/ps2sdk/ee/lib -L/lib \

        -o textures.elf /c/ps2dev/ps2sdk/ee/startup/crt0.o textures.o -lgcc -lgs
kit -ldmakit -lc -lkernel -lc -lsyscall  -ldebug -lsyscall -lkernel
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/textures'
GSKITSRC=/c/ps2dev/gsKit make -C linuz-texture
make[2]: Entering directory `/c/ps2dev/gsKit/examples/linuz-texture'
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 texture.c -o texture.o
ee-as -G0  testorig.s -o testorig.o
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 sample.c -o sample.o

ee-gcc -nostartfiles -T/c/ps2dev/ps2sdk/ee/startup/linkfile -L/c/ps2dev/gsKit/li
b -L/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2 -L/c/ps2dev/ps2sdk/ee/lib -L/lib \

        -o texture.elf /c/ps2dev/ps2sdk/ee/startup/crt0.o texture.o testorig.o s
ample.o -lgcc -lgskit -ldmakit -lc -lkernel -lc -lsyscall  -ldebug -lsyscall -lk
ernel
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/linuz-texture'
GSKITSRC=/c/ps2dev/gsKit make -C font
make[2]: Entering directory `/c/ps2dev/gsKit/examples/font'
ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 font.c -o font.o
ee-gcc -nostartfiles -T/c/ps2dev/ps2sdk/ee/startup/linkfile -L/c/ps2dev/gsKit/li
b -L/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2 -L/c/ps2dev/ps2sdk/ee/lib -L/lib \

        -o font.elf /c/ps2dev/ps2sdk/ee/startup/crt0.o font.o -lgcc -lgskit -ldm
akit -lc -lkernel -lc -lsyscall  -ldebug -lsyscall -lkernel
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/font'
make[1]: Leaving directory `/c/ps2dev/gsKit/examples'
GSKITSRC=`pwd` make -C lib
make[1]: Entering directory `/c/ps2dev/gsKit/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/ps2dev/gsKit/lib'
and now a make install

Code: Select all

Yan@YANSPC /c/ps2dev/gsKit
$ make install
GSKITSRC=`pwd` make -C ee install
make[1]: Entering directory `/c/ps2dev/gsKit/ee'
GSKITSRC=/c/ps2dev/gsKit make -C gs install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C dma install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/dma'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/dma'
make[1]: Leaving directory `/c/ps2dev/gsKit/ee'
GSKITSRC=`pwd` make -C examples install
make[1]: Entering directory `/c/ps2dev/gsKit/examples'
GSKITSRC=/c/ps2dev/gsKit make -C basic install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/basic'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/basic'
GSKITSRC=/c/ps2dev/gsKit make -C textures install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/textures'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/textures'
GSKITSRC=/c/ps2dev/gsKit make -C linuz-texture install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/linuz-texture'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/linuz-texture'
GSKITSRC=/c/ps2dev/gsKit make -C font install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/font'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/font'
make[1]: Leaving directory `/c/ps2dev/gsKit/examples'
GSKITSRC=`pwd` make -C lib install
make[1]: Entering directory `/c/ps2dev/gsKit/lib'
mkdir -p /usr/local/ps2dev/gsKit/lib
cp libgskit.a libdmakit.a /usr/local/ps2dev/gsKit/lib
make[1]: Leaving directory `/c/ps2dev/gsKit/lib'
And then I looked on the gsKit folder and nothing is compiled...

I was looking the makefiles of the gskit and i found some references to jpglib, so... so I need the jpglib to install the gskit?
And another thing, all paths to the ps2dev and ps2sdk directories are set correctly on msys. I can compile correctly any program using them.
I didn't set any path to the gsKit folder on msys... do I need to set $gsKit on msys or do I need the jpglib?

ps.: i downloaded the 0.2 precompiled from the ps2dev.org, but i tried with the latest version of gskit from the svn too, with the same results...

Posted: Sat Feb 16, 2008 5:15 am
by cosmito
I see a discrepance on the output of the "make install" :

Yan@YANSPC /c/ps2dev/gsKit
$ make install
GSKITSRC=`pwd` make -C ee install
make[1]: Entering directory `/c/ps2dev/gsKit/ee'
GSKITSRC=/c/ps2dev/gsKit make -C gs install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include

So, the GSKITSRC seems to be set OK to your path but the mkdir and cp points to a different location. I'm not familiar with msys but the "/usr/local/" pahts are typical of cygwin environment not to mention linux.

I'm not sure what causes the different path setting but again I'm not familiar with msys.

----
edited

Hmm did you set the GSKITSRC to /c/ps2dev/gsKit ?
If msys is like cygwin regarding paths, you should set GSKITSRC like

GSKITSRC=/usr/local/ps2dev/gsKit
or better
GSKITSRC=$(PS2DEV)/gsKit

Anyway I see a mix of paths i don't compreend why, for example, from the "make all" output :

Code: Select all

ee-gcc -D_EE -O2 -G0 -Wall  -fno-builtin-printf  -I/c/ps2dev/ps2sdk/ee/include -
I/c/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/gsKit/ee/dma/include -I/usr
/local/ps2dev/gsKit/ee/gs/include -I/c/ps2dev/gsKit/ee/gs/include  -I/c/ps2dev/g
sKit/ee/dma/include -I/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/include -I/ee -c
 gsInit.c -o gsInit.o

Posted: Sat Feb 16, 2008 7:27 am
by methos3
yeah, i saw this differences too.
was looking in the Makefiles to know what the make install wants on the usr/local/ps2dev/gskit, but i didn't understand.
when i get home I will try to set the $GSKITSRC to $PS2DEV/gsKit

Posted: Sat Feb 16, 2008 11:15 am
by methos3
hey, now i think i got the gskit installed!

here is a snapshot of the make install

Code: Select all

Yan@YANSPC /c/ps2dev/gsKit
$ make install
GSKITSRC=`pwd` make -C ee install
make[1]: Entering directory `/c/ps2dev/gsKit/ee'
GSKITSRC=/c/ps2dev/gsKit make -C gs install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C dma install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/dma'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/include'
mkdir -p /usr/local/ps2dev/gsKit/include
cp *.h /usr/local/ps2dev/gsKit/include
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/dma'
make[1]: Leaving directory `/c/ps2dev/gsKit/ee'
GSKITSRC=`pwd` make -C examples install
make[1]: Entering directory `/c/ps2dev/gsKit/examples'
GSKITSRC=/c/ps2dev/gsKit make -C basic install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/basic'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/basic'
GSKITSRC=/c/ps2dev/gsKit make -C bigtex install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/bigtex'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/bigtex'
GSKITSRC=/c/ps2dev/gsKit make -C textures install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/textures'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/textures'
GSKITSRC=/c/ps2dev/gsKit make -C linuz-texture install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/linuz-texture'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/linuz-texture'
GSKITSRC=/c/ps2dev/gsKit make -C font install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/font'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/font'
GSKITSRC=/c/ps2dev/gsKit make -C fb install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/fb'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/fb'
GSKITSRC=/c/ps2dev/gsKit make -C alpha install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/alpha'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/alpha'
GSKITSRC=/c/ps2dev/gsKit make -C fontm install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/fontm'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/fontm'
GSKITSRC=/c/ps2dev/gsKit make -C png-texture install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/png-texture'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/png-texture'
make[1]: Leaving directory `/c/ps2dev/gsKit/examples'
GSKITSRC=`pwd` make -C lib install
make[1]: Entering directory `/c/ps2dev/gsKit/lib'
mkdir -p /usr/local/ps2dev/gsKit/lib
cp libgskit.a libdmakit.a /usr/local/ps2dev/gsKit/lib
make[1]: Leaving directory `/c/ps2dev/gsKit/lib'

Yan@YANSPC /c/ps2dev/gsKit
I didn't add $GSKIT nor $GSKITSRC but i simply copied the gsKit from the svn to the ps2dev dir (/c/ps2dev), entered the gsKit dir and did a "make all" and then a "make install", and I ended up with the "ee, examples, and lib" dirs on the /c/ps2dev/gsKit and the dirs "include and lib" on the /usr/local/ps2dev/gsKit" dir.
All the supplied examples were automatically compiled...
This means that the gsKit is compiled correctly?

Posted: Sun Feb 17, 2008 6:51 am
by methos3
Hey, i think this time it's intalled right.
I just setled GSKIT = "$(PS2DEV)/gsKit", copied the ksKit from the svn to the ps2dev dir (/c/ps2dev) and and did a "make all" and then a "make install", and got the following error:

Code: Select all

Yan@YANSPC /c/ps2dev/gsKit
$ make install
GSKITSRC=`pwd` make -C ee install
make[1]: Entering directory `/c/ps2dev/gsKit/ee'
GSKITSRC=/c/ps2dev/gsKit make -C gs install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/gs/include'
mkdir -p /c/ps2dev/gsKit/include
cp *.h /c/ps2dev/gsKit/include
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/gs/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/gs'
GSKITSRC=/c/ps2dev/gsKit make -C dma install
make[2]: Entering directory `/c/ps2dev/gsKit/ee/dma'
GSKITSRC=/c/ps2dev/gsKit make -C src install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/src'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/src'
GSKITSRC=/c/ps2dev/gsKit make -C include install
make[3]: Entering directory `/c/ps2dev/gsKit/ee/dma/include'
mkdir -p /c/ps2dev/gsKit/include
cp *.h /c/ps2dev/gsKit/include
make[3]: Leaving directory `/c/ps2dev/gsKit/ee/dma/include'
make[2]: Leaving directory `/c/ps2dev/gsKit/ee/dma'
make[1]: Leaving directory `/c/ps2dev/gsKit/ee'
GSKITSRC=`pwd` make -C examples install
make[1]: Entering directory `/c/ps2dev/gsKit/examples'
GSKITSRC=/c/ps2dev/gsKit make -C basic install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/basic'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/basic'
GSKITSRC=/c/ps2dev/gsKit make -C bigtex install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/bigtex'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/bigtex'
GSKITSRC=/c/ps2dev/gsKit make -C textures install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/textures'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/textures'
GSKITSRC=/c/ps2dev/gsKit make -C linuz-texture install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/linuz-texture'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/linuz-texture'
GSKITSRC=/c/ps2dev/gsKit make -C font install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/font'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/font'
GSKITSRC=/c/ps2dev/gsKit make -C fb install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/fb'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/fb'
GSKITSRC=/c/ps2dev/gsKit make -C alpha install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/alpha'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/alpha'
GSKITSRC=/c/ps2dev/gsKit make -C fontm install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/fontm'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/fontm'
GSKITSRC=/c/ps2dev/gsKit make -C png-texture install
make[2]: Entering directory `/c/ps2dev/gsKit/examples/png-texture'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/c/ps2dev/gsKit/examples/png-texture'
make[1]: Leaving directory `/c/ps2dev/gsKit/examples'
GSKITSRC=`pwd` make -C lib install
make[1]: Entering directory `/c/ps2dev/gsKit/lib'
mkdir -p /c/ps2dev/gsKit/lib
cp libgskit.a libdmakit.a /c/ps2dev/gsKit/lib
cp: `libgskit.a' and `/c/ps2dev/gsKit/lib/libgskit.a' are the same file
cp: `libdmakit.a' and `/c/ps2dev/gsKit/lib/libdmakit.a' are the same file
make[1]: *** [install] Error 1
make[1]: Leaving directory `/c/ps2dev/gsKit/lib'
make: *** [install-lib] Error 2

Yan@YANSPC /c/ps2dev/gsKit
$
But seems like everything is correctly installed because "lib" and "include" dirs are on the "gsKit" dir.
The only error was because the existing file was the same, but seems like is all ok.
Can anyone say me if it's all ok?
thanks!

Posted: Sun Feb 17, 2008 10:15 pm
by cosmito
The only error was because the existing file was the same, but seems like is all ok.
Can anyone say me if it's all ok?
Yes I remember that the make install gives that error. As long the files are there, there shouldn't be a problem. I can assume you have a gsKit build and ready to use.

About the GSKITSRC path, I recall the makefile does some "magic" in order to set this path automatically, that explains why you succeeded to build without having to set it, but it will not harm setting a path explicitly and as a general rule it is mandatory to use/compile a package.

So see that everything is ok, try running the examples (the png ones will require you to have libpng also installed, not part of the gsKit of course).

Posted: Mon Feb 18, 2008 3:25 am
by methos3
thanks, man!
I will set the GSKITSRC on the same path than GSKIT then, (/c/ps2dev).
And i had to modify on tthe Makefile.pref the PS2DEV path, that was set to usr/local/ps2dev/gsKit, and I changed to my ps2dev path.
And only another thing...
what kind of Makefile i need do compile a program using the gskit and ps2sdk libs at the same time?
I tried to include the Makefile.global and Makefile.pref from the gsKit and from the ps2sdk to the Makefile and it didn't work.

For example:

Code: Select all

EE_BIN = test.elf
EE_OBJS = test.o

all: $(EE_BIN)

clean:
	rm -f *.elf *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
include $(PS2DEV)/gsKit/Makefile.pref
include $(PS2DEV)/gsKit/Makefile.global

Posted: Tue Feb 19, 2008 7:30 am
by methos3
Hey, I was seeing the Makefile.global from gsKit, and to mix it with the ps2sdk Makefile.eeglobal, I did this:

Code: Select all

#  ____     ___ |    / _____ _____
# |  __    |    |___/    |     |
# |___| ___|    |    \ __|__   |     gsKit Open Source Project.
# ----------------------------------------------------------------------
# Copyright 2004 - Chris "Neovanglist" Gilbert <[email protected]>
# Licenced under Academic Free License version 2.0
# Review gsKit README & LICENSE files for further details.
#
# Makefile.global - Makefile global variable include.
#



EE_LIBS += $&#40;EE_EXTRALIBS&#41;

ifdef LIBJPG
	EE_INCS += -I$&#40;LIBJPG&#41;/include
	EE_CFLAGS += -DHAVE_LIBJPG
	EE_LIB_DIRS += -L$&#40;LIBJPG&#41;/lib
	EE_LIBS += -ljpg
endif

ifdef LIBTIFF
        EE_INCS += -I$&#40;LIBTIFF&#41;
        EE_CFLAGS += -DHAVE_LIBTIFF
        EE_LIB_DIRS += -L$&#40;LIBTIFF&#41;
        EE_LIBS += -ltiff
endif

ifdef LIBPNG
ifdef ZLIB
	EE_INCS += -I$&#40;ZLIB&#41;/include -I$&#40;LIBPNG&#41;/include
	EE_CFLAGS += -DHAVE_LIBPNG -DHAVE_ZLIB
	EE_LIB_DIRS += -L$&#40;ZLIB&#41;/lib -L$&#40;LIBPNG&#41;/lib
	EE_LIBS += -lz -lpng
endif
endif

EE_LIBS += -lgcc -lmf -lgskit -ldmakit -lkernel -lc -lsyscall -ldebug


# include dir
EE_INCS += -I$&#40;GSKITSRC&#41;/ee/gs/include  -I$&#40;GSKITSRC&#41;/ee/dma/include -I$&#40;GCCLIB&#41;/include -I$&#40;PS2GDB&#41;/ee
# GSKIT_ENABLE_OFFSET is an experimental patch to reduce aliasing in halfbuffer mode.
#EE_CFLAGS += -fno-builtin-printf -DGSKIT_ENABLE_HBOFFSET
EE_CFLAGS += -fno-builtin-printf

# linker flags
EE_LIB_DIRS += -L$&#40;GSKITSRC&#41;/lib -L$&#40;GCCLIB&#41; -L$&#40;PS2SDK&#41;/ee/lib -L$&#40;PS2GDB&#41;/lib
EE_LDFLAGS += $&#40;EE_LIB_DIRS&#41;
I simply deleted the line EE_LIBS = -Xlinker --start-group and EE_LIBS+ = -Xlinker --end-group
Now I ask: what is this Xlinker? I deleted this and still can compile and run my programs...

Now my base Makefile to compile my programs is this:

Code: Select all

EE_BIN = basic.elf
EE_OBJS = basic.o
EE_LIBS = -lc -lpadx -lmtap

all&#58; $&#40;EE_BIN&#41; freesio2.irx freepad.irx

clean&#58;
	rm -f *.elf *.o *.a freepad.irx freesio2.irx

freesio2.irx&#58;
	cp $&#40;PS2SDK&#41;/iop/irx/freesio2.irx $@

freepad.irx&#58;
	cp $&#40;PS2SDK&#41;/iop/irx/freepad.irx $@


include $&#40;GSKIT&#41;/Makefile.pref
include $&#40;PS2SDK&#41;/samples/Makefile.eeglobal
include $&#40;GSKIT&#41;/Makefile.global
Since the gsKit Makefile.pref includes the PS2SDK Makefile.pref, i think that everything is ok.

What do you think? There is another way to mix ps2sdk and gskit or this is the best one?

thanks

Posted: Tue Feb 19, 2008 8:54 am
by cosmito
As you know, the Makefile tells the GCC how to build the code and where are the source files. So you basically need to see what the gskit and the ps2sdk makefiles have in common and use this on your new makefile. I didn't looked closely to your makefile, but as a general rule, if it compiles it should be ok ;)

BTW : I don't know exactly what is the Xlinker but doing a quick search on "Xlinker gcc" I realised it's not specific to the PS2 dev.

------
Edited

Once you have compiled gsKit into a lib, you just need to tell your makefile to use it. So you don't need to set all the stuff from the gsKit building makefile.

Posted: Wed Feb 20, 2008 4:26 am
by methos3
hm, i was getting trouble with the last Makefile, causing conflicts in the stdio lib... (i was trying to use gskit and pad.h).
I looked the Makefile.global to see what was causing this and didn't see nothing wrong.
For some reason right after looking your post I started to look on the dirs and got the $(GSKIT)/ee/Rules.make
Its almost exactly equal to the Makefile.eeglobal, but tells the compiler to use the gskit libs.
See the Rules.make:

Code: Select all

# _____     ___ ____     ___ ____
#  ____|   |    ____|   |        | |____|
# |     ___|   |____ ___|    ____| |    \    PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004.
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.

EE_INCS &#58;= $&#40;EE_INCS&#41; -I$&#40;PS2SDK&#41;/ee/include -I$&#40;PS2SDK&#41;/common/include -I$&#40;GSKIT&#41;/ee/dma/include -I$&#40;GSKIT&#41;/ee/gs/include

# C compiler flags
EE_CFLAGS &#58;= -D_EE -O2 -G0 -Wall $&#40;EE_CFLAGS&#41;

# C++ compiler flags
EE_CXXFLAGS &#58;= -D_EE -O2 -G0 -Wall $&#40;EE_CXXFLAGS&#41;

# Linker flags
#EE_LDFLAGS &#58;= $&#40;EE_LDFLAGS&#41;

# Assembler flags
EE_ASFLAGS &#58;= -G0 $&#40;EE_ASFLAGS&#41;

# Externally defined variables&#58; EE_BIN, EE_OBJS, EE_LIB

# These macros can be used to simplify certain build rules.
EE_C_COMPILE = $&#40;EE_CC&#41; $&#40;EE_CFLAGS&#41; $&#40;EE_INCS&#41;
EE_CXX_COMPILE = $&#40;EE_CC&#41; $&#40;EE_CXXFLAGS&#41; $&#40;EE_INCS&#41;


$&#40;EE_OBJS_DIR&#41;%.o &#58; $&#40;EE_SRC_DIR&#41;%.c
	$&#40;EE_CC&#41; $&#40;EE_CFLAGS&#41; $&#40;EE_INCS&#41; -c $< -o $@

$&#40;EE_OBJS_DIR&#41;%.o &#58; $&#40;EE_SRC_DIR&#41;%.cpp
	$&#40;EE_CXX&#41; $&#40;EE_CXXFLAGS&#41; $&#40;EE_INCS&#41; -c $< -o $@

$&#40;EE_OBJS_DIR&#41;%.o &#58; $&#40;EE_SRC_DIR&#41;%.S
	$&#40;EE_CC&#41; $&#40;EE_CFLAGS&#41; $&#40;EE_INCS&#41; -c $< -o $@

$&#40;EE_OBJS_DIR&#41;%.o &#58; $&#40;EE_SRC_DIR&#41;%.s
	$&#40;EE_AS&#41; $&#40;EE_ASFLAGS&#41; $< -o $@

$&#40;EE_LIB_DIR&#41;&#58;
	mkdir $&#40;EE_LIB_DIR&#41;

$&#40;EE_BIN_DIR&#41;&#58;
	mkdir $&#40;EE_BIN_DIR&#41;

$&#40;EE_OBJS_DIR&#41;&#58;
	mkdir $&#40;EE_OBJS_DIR&#41;

ifeq &#40;$&#40;use_cpp&#41;, true&#41;
$&#40;EE_BIN&#41; &#58; $&#40;EE_OBJS&#41; $&#40;PS2SDK&#41;/ee/startup/crt0.o
	$&#40;EE_CXX&#41; -nostartfiles -T$&#40;PS2SDK&#41;/ee/startup/linkfile $&#40;EE_LDFLAGS&#41; \
		-o $&#40;EE_BIN&#41; $&#40;PS2SDK&#41;/ee/startup/crt0.o $&#40;EE_OBJS&#41; $&#40;EE_LIBS&#41;
else
$&#40;EE_BIN&#41; &#58; $&#40;EE_OBJS&#41; $&#40;PS2SDK&#41;/ee/startup/crt0.o
	$&#40;EE_CC&#41; -nostartfiles -T$&#40;PS2SDK&#41;/ee/startup/linkfile $&#40;EE_LDFLAGS&#41; \
		-o $&#40;EE_BIN&#41; $&#40;PS2SDK&#41;/ee/startup/crt0.o $&#40;EE_OBJS&#41; $&#40;EE_LIBS&#41;
endif

$&#40;EE_LIB&#41; &#58; $&#40;EE_OBJS&#41;
	$&#40;EE_AR&#41; cru $&#40;EE_LIB&#41; $&#40;EE_OBJS&#41;
I was trying to add the lines:

Code: Select all

EE_INCS += -I$&#40;GSKITSRC&#41;/ee/gs/include  -I$&#40;GSKITSRC&#41;/ee/dma/include
EE_CFLAGS += -fno-builtin-printf
EE_LDFLAGS += -L$&#40;GSKITSRC&#41;/lib
to a default makefile but didn't work.
when i get home i will try the ee/Rulez.make

Thanks!!

Posted: Wed Feb 20, 2008 10:21 am
by cosmito
To use the gsKit I usually do include at the end of my makefile :

Code: Select all

include gskitMakefile.pref
include gskitMakefile.global
include $&#40;PS2SDK&#41;/samples/Makefile.pref
include $&#40;PS2SDK&#41;/samples/Makefile.eeglobal
The gskitMakefile.pref and gskitMakefile.global are modified versions of the gsKit files. So,

gskitMakefile.global :

Code: Select all

include $&#40;GSKITSRC&#41;/ee/Rules.make

EE_LIBS += -Xlinker --start-group
EE_LIBS += $&#40;EE_EXTRALIBS&#41;

ifdef LIBJPG
	EE_INCS += -I$&#40;LIBJPG&#41;/include
	EE_CFLAGS += -DHAVE_LIBJPG
	EE_LIB_DIRS += -L$&#40;LIBJPG&#41;/lib
	EE_LIBS += -ljpg
endif

ifdef LIBTIFF
        EE_INCS += -I$&#40;LIBTIFF&#41;
        EE_CFLAGS += -DHAVE_LIBTIFF
        EE_LIB_DIRS += -L$&#40;LIBTIFF&#41;
        EE_LIBS += -ltiff
endif

ifdef LIBPNG
ifdef ZLIB
	EE_INCS += -I$&#40;ZLIB&#41;/include -I$&#40;LIBPNG&#41;/include
	EE_CFLAGS += -DHAVE_LIBPNG -DHAVE_ZLIB
	EE_LIB_DIRS += -L$&#40;ZLIB&#41;/lib -L$&#40;LIBPNG&#41;/lib
	EE_LIBS += -lz -lpng
endif
endif

EE_LIBS += -lgcc -lmf -lgskit -ldmakit -lkernel -lc -lsyscall -ldebug

EE_LIBS += -Xlinker --end-group

# include dir
EE_INCS += -I$&#40;GSKITSRC&#41;/ee/gs/include  -I$&#40;GSKITSRC&#41;/ee/dma/include -I$&#40;GCCLIB&#41;/include -I$&#40;PS2GDB&#41;/ee
# GSKIT_ENABLE_OFFSET is an experimental patch to reduce aliasing in halfbuffer mode.
#EE_CFLAGS += -fno-builtin-printf -DGSKIT_ENABLE_HBOFFSET
EE_CFLAGS += -fno-builtin-printf

# linker flags
EE_LIB_DIRS += -L$&#40;GSKITSRC&#41;/lib -L$&#40;GCCLIB&#41; -L$&#40;PS2SDK&#41;/ee/lib -L$&#40;PS2GDB&#41;/lib
EE_LDFLAGS += $&#40;EE_LIB_DIRS&#41;
gskitMakefile.pref :

Code: Select all

include $&#40;PS2SDK&#41;/Defs.make

#PS2DEV = /usr/local/ps2dev

ifeq &#40;x$&#40;GSKIT&#41;, x&#41;
GSKIT = $&#40;PS2DEV&#41;/gsKit
endif

GCCLIB = $&#40;PS2DEV&#41;/ee/lib/gcc-lib/ee/3.2.2
CPPLIB = $&#40;PS2DEV&#41;/ee/ee/lib

LIBGSKIT = $&#40;GSKITSRC&#41;/lib/libgskit.a
LIBDMAKIT = $&#40;GSKITSRC&#41;/lib/libdmakit.a

ZLIB = $&#40;PS2DEV&#41;/ps2sdk-ports/zlib
#LIBPNG = $&#40;PS2DEV&#41;/ps2sdk-ports/libpng
(you make have to comment the ZLIB if not installed in your case)

As you may see, the differences to the original gsKit files are minimal (spot them).

Also in the makefile, I add "-lgskit -ldmakit" to the EE_LIBS. Example :

Code: Select all

EE_LIBS = -lpad -lc -lgskit -ldmakit
That should work. It's not very clean but does the job.

Posted: Thu Feb 21, 2008 7:10 am
by methos3
Hey, thanks!
yesterday I did a makefile like this:

Code: Select all


EE_BIN = test.elf
EE_OBJ = test.o

EE_LIBS += $&#40;GSKIT&#41;/libs

EE_LIBS += -lgcc -lmf -lgskit -ldmakit -lkernel -lc -lsyscall -ldebug  -lpad



EE_INCS += -I$&#40;GSKITSRC&#41;/ee/gs/include  -I$&#40;GSKITSRC&#41;/ee/dma/include -I$&#40;GCCLIB&#41;/include -I$&#40;PS2GDB&#41;/ee
EE_CFLAGS += -fno-builtin-printf

EE_LIB_DIRS += -L$&#40;GSKITSRC&#41;/lib -L$&#40;GCCLIB&#41; -L$&#40;PS2SDK&#41;/ee/lib -L$&#40;PS2GDB&#41;/lib
EE_LDFLAGS += $&#40;GSKIT&#41;/libs 

include $&#40;PS2SDK&#41;/samples/Makefile.pref
include $&#40;PS2SDK&#41;/samples/Makefile.eeglobal
This worked ok, but your makefile seems very clean and better (and you hadn't to delete those Xlinker references).
Bit... if the two makefiles can compile allright, I will use your idea to make my programs.

Thanks, pal!

Posted: Thu Feb 21, 2008 7:43 am
by cosmito
This worked ok, but your makefile seems very clean and better (and you hadn't to delete those Xlinker references).
Bit... if the two makefiles can compile allright, I will use your idea to make my programs.
I would say to you almost the same : I'd prefer your makefile (if it works) because it looks to contains only the essential, so it looks more clean and less messy than throw a lot of settings to the GCC (some may be unneeded) like I do :)

Posted: Fri Feb 22, 2008 6:10 am
by methos3
So i will alternate the tow makefiles ^^
One day I can use my Makefile and on the next day I can use your Makefile hehe.
Thanks for the help, buddy!