#!/bin/tcsh if( "$1" == "" ) then echo "Usage: maketest <test>" echo " (e.g. maketest regions)" exit endif if( ! $?LDFLAGS ) then setenv LDFLAGS "" endif set a = "test$1" echo "Building $a" if( "$a" == "testplot3d" ) then gfortran -fno-second-underscore -w -g -fno-range-check $LDFLAGS -o testplot3d testplot3d.f \ -L$GITSTAR/lib -I$GITSTAR/include \ `ast_link -ems -pgplot3d` `sla_link` `chr_link` `err_link` else if( -e "$a.f" ) then gfortran -fno-second-underscore -w -g -fno-range-check $LDFLAGS -o $a $a.f -L$GITSTAR/lib -I$GITSTAR/include \ `ast_link -ems` `chr_link` `err_link` `prm_link` `psx_link` else if( -e "$a.c" ) then gcc -o $a -g $a.c -I.. -DHAVE_CONFIG_H -L$GITSTAR/lib $LDFLAGS `ast_link` else echo "Cannot find $a.f or $a.c" endif echo "Running $a" $a