-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmakefile
More file actions
115 lines (85 loc) · 4 KB
/
makefile
File metadata and controls
115 lines (85 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#-----------BEGIN MAKEFILE-------------------------------------------------
SHELL = /bin/sh
DEF_FLAGS = -P -C -traditional
EXEC = fiscm
#==========================================================================
# BEG USER DEFINITION SECTION
# REQUIRED:
# 1.) Fortran90 Compiler
# 2.) NetCDF 3.x libraries with Fortran90 interface
# it would be best if they were built using the same compiler
# 3.) In some compilers, iargc/getarg are not standard
# for example, Absoft 9.x requires a link to library U77 (-lU77)
# if you are using gfortran/intel you should not have to worry
# about this.
#==========================================================================
# ==== REQUIRED
# IOLIBS = /usr/local/netcdf/gfortran/lib/libnetcdf.la
# IOINCS = -I/usr/local/netcdf/gfortran/include
# CPPFLAGS = $(DEF_FLAGS)
# CPP = /usr/bin/cpp
# FC = gfortran #-funderscoring # -fno-second-underscore
# ==== OPTIONAL
# FLINK = /bin/sh /usr/local/netcdf/gfortran/bin/libtool --mode=link gfortran
# DEBFLGS =
# OPT =
include make.inc
#==========================================================================
# END USER DEFINITION SECTION
#==========================================================================
FFLAGS = $(DEBFLGS) $(OPT)
MDEPFLAGS = --cpp --fext=f90 --file=-
RANLIB = ranlib
#--------------------------------------------------------------------------
# Libraries / Include Files
#--------------------------------------------------------------------------
LIBS = $(IOLIBS)
INCS = $(IOINCS)
#--------------------------------------------------------------------------
# Preprocessing and Compilation Directives
#--------------------------------------------------------------------------
.SUFFIXES: .o .f90
.f90.o:
$(FC) -c $(FFLAGS) $(FIXEDFLAGS) $(INCS) $(INCLDIR) $*.f90
#--------------------------------------------------------------------------
# FISCM Source Code.
#--------------------------------------------------------------------------
F95FILES= gparms.f90 utilities.f90 pvar.f90 igroup.f90 bio.f90\
drivers.f90 output.f90 forcing.f90 fvcom_driver.f90 fiscm.f90
SRCS = $(F95FILES)
OBJS = $(SRCS:.f90=.o)
#--------------------------------------------------------------------------
# Linking Directives
#--------------------------------------------------------------------------
$(EXEC): $(OBJS)
$(FLINK) $(FFLAGS) $(INCS) $(LDFLAGS) -o $(EXEC) $(OBJS) $(LIBS)
# $(FC) $(FFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) $(LIBS)
#--------------------------------------------------------------------------
# Target to create dependecies.
#--------------------------------------------------------------------------
depend:
makedepf90 $(SRCS) >> makedepends
#--------------------------------------------------------------------------
# Tar Up Code
#--------------------------------------------------------------------------
tarfile:
tar cvf fiscm.tar *.f90 makefile *.txt *.nml makedepends make.inc
#--------------------------------------------------------------------------
# Cleaning targets.
#--------------------------------------------------------------------------
clean:
/bin/rm -f *.o *.mod fiscm
#--------------------------------------------------------------------------
# Common rules for all Makefiles - do not edit.
#--------------------------------------------------------------------------
emptyrule::
#--------------------------------------------------------------------------
# Empty rules for directories that do not have SUBDIRS - do not edit.
#--------------------------------------------------------------------------
install::
@echo "install in $(CURRENT_DIR) done"
install.man::
@echo "install.man in $(CURRENT_DIR) done"
Makefiles::
includes::
include ./makedepends