Page 1 of 1

Defs.mak/Defs.make

Posted: Wed Jul 04, 2007 11:04 am
by radad
Why is there a Defs.mak and a Defs.make in the ps2sdk directory and which is the correct one?

Posted: Wed Jul 04, 2007 11:23 am
by ubergeek42
I only have a Defs.make file, I would assume that is the correct one. I see that Defs.mak exists in the ps2sdksrc, and would assume that it is only related to building the actual sdk.

Re: Defs.mak/Defs.make

Posted: Thu Jul 05, 2007 4:30 am
by dlanor
radad wrote:Why is there a Defs.mak and a Defs.make in the ps2sdk directory and which is the correct one?
You should not have just one "the ps2sdk directory", but two separate ones, never to be mixed up. One for the source and another for the binary release, and all content of the second one should be created by a "make release" command after compiling the first one by a normal "make all".

The two files you refer to coexist only in the source folder, not in the binary release, so I'm worried that you aren't separating the two properly.

If you only have one directory for both purposes, this may be because you've missed setting up the environment variables properly, with "PS2SDKSRC" holding the path of the source folder and "PS2SDK" holding the path for the binary release.

Here is a listing of the bash script I normally use for recompiling PS2SDK (based on older scripts by others):

Code: Select all

 ##############################
 ## BUILD AND INSTALL PS2SDK ##
 ##############################

  cd $PS2SDK
  rm -Rf *

  cd $PS2SDKSRC
  make clean; make || { echo "ERROR BUILDING PS2SDK"; exit; }
  make release || { echo "ERROR INSTALLING PS2SDK"; exit; }

  ## Replace newlib's crt0 with the one in ps2sdk.
  ln -sf $PS2SDK/ee/startup/crt0.o $PS2DEV/ee/lib/gcc-lib/ee/3.2.2/
  ln -sf $PS2SDK/ee/startup/crt0.o $PS2DEV/ee/ee/lib/

  ## Comment out the line below, if you want to keep all object files
  make clean
  cd ..
As for the purpose of "Defs.mak" VS "Defs.make", I think they are both used, though "Defs.mak" is explicitly referred to only by "ee/Rules.mak", while "Defs.make" is referred to by a large number of makefiles in various subfolders of the PS2SDK source.

Best regards: dlanor