#!/bin/tcsh
set sdir  = ($_)
if("$sdir" != "") then
  # this script has been sourced
  set path1 = `readlink -f $sdir[2]`
  set path2 = `dirname $path1`
else
  # This script has been run directly. This will in general not give the
  # required results, unless this script is executed in another script
  set path1 = `dirname $0`
  set path2 = `cd $path1 && pwd`
endif
set path = ( $path2/bin $path )

# The compiler internationalisation file. This defaults to 'i18n.txt' in the
# current directory
setenv MTV_I18N $path2/i18n.txt

# The simulator configuration file can be specified as 'rtv --conf fname'.
# It is otherwise the value of RTV_CONFIG, which defaults to 'simulators.conf'
# in the current directory
setenv RTV_CONFIG $path2/simulators.conf

# set the compiler name when run from 'rtv': this defaults to 'mtv'
# setenv MAIA_COMPILER mtv

# set the default mtv output file name if the output is not specified on
# the command line
setenv MTV_OUTPUT_FILE test.v

# The required simulator can be specified as 'rtv --sim name'. It is otherwise
# the value of RTV_SIMULATOR, which has no default
setenv RTV_SIMULATOR icarus
