#!/bin/bash 
#
# Generated file - do not edit!
#
################################################################################
#
# Configuration file for the EDG eccp script. 
#
# This file must be located in the directory specified by the EDG_BASE
# environment variable.  It is used to set other environment variables
# that are used by the eccp script.
#
################################################################################

EDG_DEFAULT_DEFINES=""
EDG_DEFAULT_CPP_DEFINES=""

if [ '@TARGET_SYSTEM@' = PS3 ]; then
  if [ -z $CELL_SDK ]; then
    echo "$0: \$CELL_SDK not set" >&2
    exit 1
  elif [ ! -d "$CELL_SDK" ]; then
    echo "$0: \$CELL_SDK ($CELL_SDK) not found" >&2
    exit 1
  fi
  PATH="$PATH:$CELL_SDK/host-linux/ppu/bin"
fi

CC="ppu-lv2-gcc"
CXX="ppu-lv2-g++"

# See if the g++ headers/libraries should be used
EDG_USE_GPP_LIB=${EDG_USE_GPP_LIB-1}

# Get the directory of the version of gcc that is being used.  This is
# needed whether or not the g++ headers/libraries are being used.
LIBGCC_PATH=`$CC -print-libgcc-file-name`
EDG_GCC_DIR=`dirname $LIBGCC_PATH`
LIBSTDC_PATH=`$CC -print-file-name=libstdc++.so`
LIBSTDC_PATH=`dirname $LIBSTDC_PATH`

if [ $EDG_USE_GPP_LIB -ne 0 ] ; then
  # Use g++ headers/libraries
  EDG_DEFAULT_LIB_PATHS=${EDG_DEFAULT_LIB_PATHS-"-L$EDG_GCC_DIR -L$LIBSTDC_PATH"}
  
  # We can't automatically find the directories of the g++
  # headers.  A make_g++_incl_paths script is provided to do this.
  # The resulting list is stored in $EDG_BASE/lib/g++_incl_paths.
  gpp_incl_path_file=$EDG_BASE/lib/g++_incl_paths
  if [ ! -f $gpp_incl_path_file ] ; then
    echo edg_eccp_config: $gpp_incl_path_file does not exist.
    ./make_g++_incl_paths
    if [ $? -ne 0 ]; then
      echo edg_eccp_config: make_g++_incl_paths failed!
      exit 1
    fi 
  fi
  gpp_incl_paths=`cat $gpp_incl_path_file`
  
  EDG_INCLDIR=${EDG_INCLDIR-"$EDG_BASE/include:$gpp_incl_paths"}
  
  # Copy EDG_INCLDIR to EDG_DEFAULT_INCLUDE_DIRS.  This is not needed
  # by eccp but is used by some other internal EDG tools that use
  #  edg_eccp_config.
  EDG_DEFAULT_INCLUDE_DIRS="$EDG_INCLDIR"
  EDG_CINCLDIR=${EDG_INCLDIR-"$EDG_BASE/include:$EDG_GCC_DIR/include"}
  EDG_C_TO_OBJ_LIBRARIES="-lstdc++ -lgcc_s"
else
  # Not using g++ library/headers
  EDG_DEFAULT_INCLUDE_DIRS=${EDG_DEFAULT_INCLUDE_DIRS-"$EDG_BASE/include:$EDG_BASE/include_cfront"}
  EDG_DEFAULT_INCLUDE_DIRS="$EDG_DEFAULT_INCLUDE_DIRS:$EDG_GCC_DIR/include"
fi

EDG_PRELINK_DEFAULT_OPTIONS='-c "nm -og" '$EDG_PRELINK_DEFAULT_OPTIONS
EDG_C_TO_OBJ_COMPILER="$CC"

EDG_SUPPRESS_PATCH_MUNCH=1
COLLECT_NO_DEMANGLE=1
export COLLECT_NO_DEMANGLE

