Ticket #52: UNICOS-sn-f90.mk

File UNICOS-sn-f90.mk, 3.7 KB (added by m.hadfield, 17 years ago)

Machine-dependent file for Cray T3E

Line 
1# svn $Id: UNICOS-sn-f90.mk 49 2007-05-10 21:40:11Z arango $
2#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
3# Copyright (c) 2002-2007 The ROMS/TOMS Group :::
4# Licensed under a MIT/X style license :::
5# See License_ROMS.txt :::
6#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
7#
8# Include file for UNICOS F90 compiler on CRAY T3D
9# -------------------------------------------------------------------------
10#
11# ARPACK_LIBDIR ARPACK libary directory
12# FC Name of the fortran compiler to use
13# FFLAGS Flags to the fortran compiler
14# CPP Name of the C-preprocessor
15# CPPFLAGS Flags to the C-preprocessor
16# CLEAN Name of cleaning executable after C-preprocessing
17# NETCDF_INCDIR NetCDF include directory
18# NETCDF_LIBDIR NetCDF libary directory
19# LD Program to load the objects into an executable
20# LDFLAGS Flags to the loader
21# RANLIB Name of ranlib command
22# MDEPFLAGS Flags for sfmakedepend (-s if you keep .f files)
23#
24# First the defaults
25#
26 FC := f90
27 FFLAGS := -e Im
28 CPP := /opt/ctl/bin/cpp
29 CPPFLAGS := -P -N
30 LD := $(FC)
31 LDFLAGS :=
32 AR := ar
33 ARFLAGS := -r
34 MKDIR := mkdir -p
35 RM := rm -f
36 RANLIB := touch
37 PERL := perl
38 TEST := test
39
40 MDEPFLAGS := --cpp --fext=f90 --file=- --objdir=$(SCRATCH_DIR)
41
42#
43# Names of module files for netCDF f90 interface: override the lower-case
44# file names specified in makefile
45#
46
47 NETCDF_MODFILE := NETCDF.mod
48TYPESIZES_MODFILE := TYPESIZES.mod
49
50#
51# Library locations, can be overridden by environment variables.
52#
53
54 MCT_INCDIR ?= /usr/local/mct/include
55 MCT_LIBDIR ?= /usr/local/mct/lib
56 NETCDF_INCDIR ?= /usr/local/include
57 NETCDF_LIBDIR ?= /usr/local/lib
58
59 CPPFLAGS += -I$(NETCDF_INCDIR)
60 LIBS := -L$(NETCDF_LIBDIR) -lnetcdf
61
62ifdef USE_ARPACK
63 ifdef USE_MPI
64 PARPACK_LIBDIR ?= /usr/local/lib
65 LIBS += -L$(PARPACK_LIBDIR) -lparpack
66 endif
67 ARPACK_LIBDIR ?= /usr/local/lib
68 LIBS += -L$(ARPACK_LIBDIR) -larpack
69endif
70
71ifdef USE_MPI
72 CPPFLAGS += -DMPI
73endif
74
75ifdef USE_OpenMP
76 CPPFLAGS += -D_OPENMP
77endif
78
79ifdef USE_DEBUG
80 FFLAGS += -g -O 0 -e in -R abcnp
81else
82 FFLAGS += -O3
83endif
84
85ifdef SWAN_COUPLE
86 FFLAGS += -I$(MCT_INCDIR)
87 LIBS += -L$(MCT_LIBDIR) -lmct -lmpeu
88endif
89
90#
91# Set free form format in source files to allow long string for
92# local directory and compilation flags inside the code.
93#
94
95$(SCRATCH_DIR)/mod_ncparam.o: FFLAGS += -f free
96$(SCRATCH_DIR)/mod_strings.o: FFLAGS += -f free
97
98#
99# Supress free format in SWAN source files since there are comments
100# beyond column 72.
101#
102
103ifdef SWAN_COUPLE
104
105$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -f fixed
106$(SCRATCH_DIR)/ocpids.o: FFLAGS += -f fixed
107$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -f fixed
108$(SCRATCH_DIR)/swancom1.o: FFLAGS += -f fixed
109$(SCRATCH_DIR)/swancom2.o: FFLAGS += -f fixed
110$(SCRATCH_DIR)/swancom3.o: FFLAGS += -f fixed
111$(SCRATCH_DIR)/swancom4.o: FFLAGS += -f fixed
112$(SCRATCH_DIR)/swancom5.o: FFLAGS += -f fixed
113$(SCRATCH_DIR)/swanmain.o: FFLAGS += -f fixed
114$(SCRATCH_DIR)/swanout1.o: FFLAGS += -f fixed
115$(SCRATCH_DIR)/swanout2.o: FFLAGS += -f fixed
116$(SCRATCH_DIR)/swanparll.o: FFLAGS += -f fixed
117$(SCRATCH_DIR)/swanpre1.o: FFLAGS += -f fixed
118$(SCRATCH_DIR)/swanpre2.o: FFLAGS += -f fixed
119$(SCRATCH_DIR)/swanser.o: FFLAGS += -f fixed
120$(SCRATCH_DIR)/swmod1.o: FFLAGS += -f fixed
121$(SCRATCH_DIR)/swmod2.o: FFLAGS += -f fixed
122$(SCRATCH_DIR)/swmod3.o: FFLAGS += -f fixed
123
124endif