Subversion Repositories lagranto.icon

Rev

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

# ----- Load modules --------------------------

module list 

set tool = select

# ----- Make clean ----------------------------

\rm select.o
\rm special*.o

# ----- Set libraries and includes ------------

set libs   = "${LAGRANTO}/lib/iotra.a"
set libs   = "${libs} -L ${LAGRANTO}/lib"
set libs   = "${libs} ${LAGRANTO}/lib/iotra.a" 

set ncdf_incs  = `nc-config --fflags`
set ncdf_libs  = `nc-config --flibs`

# ---- Compile special commands ----------------

set listo = ""

foreach file ( special*.f )

echo ${FORTRAN} -c ${file}
${FORTRAN} -c ${file}

end

set listo = `ls -1 special*.o`

# ---- Compile select --------------------------

echo ${FORTRAN} -c ${tool}.f
${FORTRAN} -c ${tool}.f

# ----- Linking --------------------- ----------

\rm -f ${tool}

echo "${FORTRAN} -o ${tool} ${tool}.o ${listo} ${libs} ${ncdf_libs}"        
      ${FORTRAN} -o ${tool} ${tool}.o ${listo} ${libs} ${ncdf_libs}

if ( ! -f ${tool} ) then
  echo "ERROR: compilation of <tool> failed... exit"
  exit 1
endif

exit 0