Subversion Repositories lagranto.icon

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 michaesp 1
#!/bin/csh
2
 
3
# ----- Load modules --------------------------
4
 
5
module list 
6
 
7
set tool = tracal
8
 
9
# ----- Set libraries and includes ------------
10
 
11
set libs   = "${LAGRANTO}/lib/iotra.a"
12
 
13
set ncdf_incs  = `nc-config --fflags`
14
set ncdf_libs  = `nc-config --flibs`
15
 
16
# ---- Modules ---------------------------------
17
 
18
\rm -f precmod.o precision.mod
19
echo ${FORTRAN} -c precmod.f90
20
${FORTRAN} -c precmod.f90
21
 
22
\rm -f stringmod.o strings.mod
23
echo ${FORTRAN} -c stringmod.f90
24
${FORTRAN} -c stringmod.f90
25
 
26
\rm -f evalmod.o evaluate.mod
27
echo ${FORTRAN} -c evalmod.f90
28
${FORTRAN} -c evalmod.f90
29
 
30
set mods = " evalmod.o precmod.o stringmod.o " 
31
 
32
# ----- Compile --------------------- ----------
33
 
34
\rm -f ${tool}.o
35
\rm -f ${tool}
36
 
37
echo "${FORTRAN} -c ${tool}.f ${ncdf_incs}"  
38
      ${FORTRAN} -c ${tool}.f ${ncdf_incs}   
39
echo "${FORTRAN} -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}"        
40
      ${FORTRAN} -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}
41
 
42
if ( ! -f ${tool} ) then
43
  echo "ERROR: compilation of <tool> failed... exit"
44
  exit 1
45
endif
46
 
47
exit 0