#! /bin/csh -f
#
#       invoke cygnus configure to set up this directory as an
#       ia32-host ia64-target build area
#

#
# NOTE: updated cygnus_20000828/gcc/version.c to rename the directory
# 2.9-trillian-20000828 to sgicc-1.0
#

if ( ! ${?TARG_ISA_INCLUDE} ) then
    set TARG_ISA_INCLUDE=/usr/sgi/include/
    set TARG_ISA_LIB=/usr/sgi/lib64
endif
if ( ! ${?SGIDEFS_INCLUDE} ) then
    set SGIDEFS_INCLUDE=/usr/ia64-sgi-linux/include/
    set SGIDEFS_LIB=/usr/ia64-sgi-linux/lib
endif

#CFLAGS=" -g -I$TARG_ISA_INCLUDE -I$SGIDEFS_INCLUDE
#export CFLAGS
setenv CFLAGS " -g -O2 -DHOST_IA64 -D__MIPS_AND_IA64_ELF_H -I$TARG_ISA_INCLUDE -L$TARG_ISA_LIB"

set     SRC_DIR         = ../cygnus_20000828
set	INSTALL_DIR	= /usr/ia64-sgi-linux
set     CONFIGURE       = ${SRC_DIR}/configure
set     HOST            = i586-linux-gnu
set     BUILD           = i586-linux-gnu
set     TARG            = ia64-sgi-linux

${CONFIGURE}                   \
    --srcdir=${SRC_DIR}        \
    --prefix=${INSTALL_DIR}    \
    --host=${HOST}             \
    --target=${TARG}
