3 |
# $Header$ |
# $Header$ |
4 |
# $Name$ |
# $Name$ |
5 |
|
|
6 |
FC=f77 |
# Build options for the Sun fortran compiler (with and without MPI) |
7 |
F90C=f90 |
# on Linux IA32 platform |
8 |
CC=cc |
# MPI : need to set environment variable MPI_INC_DIR to the include |
9 |
LINK=${F90C} |
# directory of your MPI implementation |
10 |
|
|
11 |
|
if test "x$MPI" = xtrue ; then |
12 |
|
CC=${CC:=mpicc} |
13 |
|
FC=${FC:=mpif77} |
14 |
|
F90C=${F90C:=mpif90} |
15 |
|
LINK=${F90C} |
16 |
|
else |
17 |
|
CC='cc' |
18 |
|
FC='f77' |
19 |
|
F90C='f90' |
20 |
|
LINK=${F90C} |
21 |
|
fi |
22 |
|
|
23 |
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _" |
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _" |
24 |
DEFINES='-DWORDLENGTH=4' |
DEFINES='-DWORDLENGTH=4' |
25 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
|
NOOPTFLAGS='-O0 -g -m32 -xfilebyteorder=big16:%all -u -r8const' |
|
|
NOOPTFILES='' |
|
26 |
EXTENDED_SRC_FLAG='-e' |
EXTENDED_SRC_FLAG='-e' |
27 |
OMPFLAG='-xopenmp' |
OMPFLAG='-xopenmp' |
28 |
|
|
29 |
|
NOOPTFLAGS='-O0 -g' |
30 |
|
NOOPTFILES='' |
31 |
|
|
32 |
|
FFLAGS="$FFLAGS -m32 -xfilebyteorder=big16:%all -u" |
33 |
|
#FFLAGS="$FFLAGS -r8const" |
34 |
|
|
35 |
if test "x$DEVEL" != x ; then |
if test "x$DEVEL" != x ; then |
36 |
FFLAGS='-xfilebyteorder=big16:%all -u -r8const -g -xs -C -xcommonchk -xcheck=init_local -fpover' |
FFLAGS="$FFLAGS -g -xs -C -xcommonchk -xcheck=init_local -fpover" |
37 |
else |
OMPFLAG='-xopenmp=noopt' |
|
FFLAGS='-xfilebyteorder=big16:%all -u -r8const' |
|
38 |
fi |
fi |
39 |
|
|
40 |
if test "x$IEEE" = x ; then |
if test "x$IEEE" = x ; then #- with optimisation: |
41 |
# No need for IEEE-754 |
FOPTIM='-fast -xvector=simd -xpad=local' |
42 |
FOPTIM='-fast -m32 -xvector=simd -xpad=local' |
LIBS="$LIBS -lmopt" #- but get overwritten during NETCDF libs setting below |
43 |
LIBS="$LIBS -lmopt" |
else #- no optimisation + IEEE : |
44 |
else |
# FOPTIM='-O0' |
45 |
# Try to follow IEEE-754 |
FOPTIM='-fast -xpad=local -fsimple=1' |
|
# FOPTIM='-O0 -m32' |
|
|
FOPTIM='-fast -m32 -xpad=local -fsimple=1' |
|
46 |
fi |
fi |
47 |
|
|
48 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
49 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
50 |
CFLAGS='-O3 -m32' |
CFLAGS='-O0 -m32' |
51 |
|
|
52 |
|
INCLUDEDIRS='' |
53 |
|
INCLUDES='' |
54 |
|
#LIBS='' |
55 |
|
|
56 |
if [ "x$NETCDF_ROOT" != x ] ; then |
if [ "x$NETCDF_ROOT" != x ] ; then |
57 |
INCLUDEDIR="${NETCDF_ROOT}/include" |
INCLUDEDIR="${NETCDF_ROOT}/include" |
88 |
LIBS='-L/usr/local/lib' |
LIBS='-L/usr/local/lib' |
89 |
fi |
fi |
90 |
|
|
91 |
|
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
92 |
|
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
93 |
|
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
94 |
|
MPIINCLUDEDIR="$MPI_INC_DIR" |
95 |
|
MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'} |
96 |
|
MPI_HEADER_FILES_INC=${MPI_HEADER_FILES_INC:='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'} |
97 |
|
fi |
98 |
|
|