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
# ----- Load modules --------------------------
2
 
3
module list 
4
 
5
set tool = select
6
 
7
# ----- Make clean ----------------------------
8
 
9
\rm select.o
10
\rm special*.o
11
 
12
# ----- Set libraries and includes ------------
13
 
14
set libs   = "${LAGRANTO}/lib/iotra.a"
15
set libs   = "${libs} -L ${LAGRANTO}/lib"
16
set libs   = "${libs} ${LAGRANTO}/lib/iotra.a" 
17
 
18
set ncdf_incs  = `nc-config --fflags`
19
set ncdf_libs  = `nc-config --flibs`
20
 
21
# ---- Compile special commands ----------------
22
 
23
set listo = ""
24
 
25
foreach file ( special*.f )
26
 
27
echo ${FORTRAN} -c ${file}
28
${FORTRAN} -c ${file}
29
 
30
end
31
 
32
set listo = `ls -1 special*.o`
33
 
34
# ---- Compile select --------------------------
35
 
36
echo ${FORTRAN} -c ${tool}.f
37
${FORTRAN} -c ${tool}.f
38
 
39
# ----- Linking --------------------- ----------
40
 
41
\rm -f ${tool}
42
 
43
echo "${FORTRAN} -o ${tool} ${tool}.o ${listo} ${libs} ${ncdf_libs}"        
44
      ${FORTRAN} -o ${tool} ${tool}.o ${listo} ${libs} ${ncdf_libs}
45
 
46
if ( ! -f ${tool} ) then
47
  echo "ERROR: compilation of <tool> failed... exit"
48
  exit 1
49
endif
50
 
51
exit 0