# Configuration for 2 part universal build
# Copyright (c) 2007-2008, Ippei Ukai


# has to be the absolute path from /
myREPOSITORYDIR="/PATH2HUGIN/mac/ExternalPrograms/repository";

# number of jobs that make can use, probably same as the number of CPUs.
#PROCESSNUM=2
if [ $(uname -p) = i386 ] ; then
  PROCESSNUM=$(hostinfo | grep "Processors active:" | sed 's/^.*://' | wc -w | sed 's/[^[:digit:]]//g');
else
  PROCESSNUM="1"
fi

mkdir -p $myREPOSITORYDIR;

export \
 REPOSITORYDIR="$myREPOSITORYDIR" \
 ARCHS="ppc i386" \
 \
 ppcTARGET="powerpc-apple-darwin8" \
 ppcOSVERSION="10.4" \
 ppcMACSDKDIR="/Developer/SDKs/MacOSX10.4u.sdk" \
 ppcOPTIMIZE="-mcpu=G3 -mtune=G4 -ftree-vectorize" \
 ppcCC="gcc-4.0" \
 ppcCXX="g++-4.0" \
 \
 i386TARGET="i386-apple-darwin8" \
 i386OSVERSION="10.4" \
 i386MACSDKDIR="/Developer/SDKs/MacOSX10.4u.sdk" \
 i386OPTIMIZE="-march=prescott -mtune=pentium-m -ftree-vectorize" \
 i386CC="gcc-4.0" \
 i386CXX="g++-4.0" \
 \
 OTHERARGs="" \
 OTHERMAKEARGs="--jobs=$PROCESSNUM";


# Deprecated:
export \
 ppcONLYARG="$ppcOPTIMIZE -mmacosx-version-min=$ppcOSVERSION" \
 i386ONLYARG="$i386OPTIMIZE -mmacosx-version-min=$i386OSVERSION";



# cmake settings
export CMAKE_INCLUDE_PATH="$REPOSITORYDIR/include"
export CMAKE_LIBRARY_PATH="$REPOSITORYDIR/lib"



# $Id: SetEnv-universal.txt 1902 2007-02-04 22:27:47Z ippei $
