summaryrefslogtreecommitdiffstats
path: root/ast/ast_tester/maketest
blob: 5891121bea21301323e20e96c7aa56d641d9d69b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/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