-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.gfortran.in
209 lines (186 loc) · 5.63 KB
/
Makefile.gfortran.in
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Generated automatically from Makefile.in by configure.
# -*-Mode: indented-text;-*-
# Makefile: LATS makefile
#
# Copyright: 1996, Regents of the University of California
# This software may not be distributed to others without
# permission of the author.
#
# Author: Bob Drach, Lawrence Livermore National Laboratory
#
# Version: $Id: Makefile.in,v 1.12 1996/10/29 00:20:44 drach Exp $
#
# Revision History:
#
# $Log: Makefile.in,v $
# Revision 1.12 1996/10/29 00:20:44 drach
# - Removed name conflicts with CDMS
#
# Revision 1.11 1996/10/22 19:04:57 fiorino
# latsgrib bug in .ctl creator
#
# Revision 1.10 1996/10/16 22:09:51 drach
# - Added automatic gribmap generation
# - Restricted LATS_GRADS_GRIB convention to one grid per file
#
# Revision 1.9 1996/09/30 18:54:46 drach
# - permit installation without the sources being present
# - separate FORTRAN debug flag, since -O doesn't work on the Cray
#
# Revision 1.8 1996/09/17 16:52:31 drach
# - Misc. cleanup
#
# Revision 1.7 1996/08/29 19:27:17 drach
# - Cleaned up configuration macros, Makefile.in for portability
#
# Revision 1.6 1996/08/27 19:39:03 drach
# - Added FORTRAN test
# - Ported to other UNIX platforms
#
# Revision 1.5 1996/07/12 00:36:21 drach
# - (GRIB) use undefined flag only when set via lats_miss_XX
# - (GRIB) use delta when checking for missing data
# - (GRIB) define maximum and default precision
# - fixed lats_vartab to work correctly.
# - Added report of routine names, vertical dimension types
#
# Revision 1.4 1996/06/27 19:19:34 drach
# - Misc. cleanup
#
# Revision 1.3 1996/06/27 01:32:49 drach
# - Fixed up file permissions on install
#
# Revision 1.2 1996/06/27 01:02:38 drach
# - Added installation directives
#
# Revision 1.1 1996/06/12 18:09:23 drach
# - Initial versions
#
#
#
# Note: to generate Makefile from Makefile.in:
# ./configure --cache-file=/dev/null \
# [--with-ncinc=<netCDF include directory>] \
# [--with-nclib=<netCDF library directory>] \
# [--prefix=<installation directory]
# Install prefix for architecture-independent files
prefix=@cdat_EXTERNALS@
# Install prefix for architecture-dependent files
exec_prefix= $(prefix)
# Expanded directories
BINDIR=$(exec_prefix)/bin
INCLUDEDIR=$(prefix)/include
LIBDIR=$(exec_prefix)/lib
MANDIR=$(prefix)/man
PARMDIR=$(prefix)/lib/lats
#CC = cc
#CFLAGS = -I. -I@cdat_EXTERNALS@/include $(DEBUG) -I/usr/include/malloc
COPTS = -I. -I@cdat_EXTERNALS@/include $(DEBUG) -I/usr/include/malloc
CPPOPTS = -DHAVE_NETCDF -DLATS_CHANGE_GRADS_NAMES -DSTNDALN=1 -DBYTEORDER=1 -DGRADS_CRAY=0
DEBUG = -O
DEFS = -DOS_NAME=Linux -DOS_MAJOR=2
#FC = gfortran
#FDEBUG =
#FFLAGS = -I. $(FDEBUG) -Wno-all
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = /usr/bin/install -c
LDFLAGS = -L. -llats -L@cdat_EXTERNALS@/lib -lnetcdf -lm
OS = linux
RANLIB = :
# Shell to run make subcommands
SHELL = /bin/sh
#
# mf configuration
#
LATSLSVER="1.0"
# Do not change values below this line
#
LIBRARY = liblats.a
OBJS = lats.o latsint.o latsnc.o latsgrib.o latstime.o latsstat.o latsfort.o fgbds.o \
fgutil.o latsgribmap.o gaddes.o gagmap.o gamach.o gautil.o
all: $(LIBRARY) latsls
latsls: latsls.o latsint.o
$(CC) latsls.o latsint.o $(CPPFLAGS) $(CPPOPTS) $(CFLAGS) $(COPTS) -o latsls
$(LIBRARY): $(OBJS)
ar rv $(LIBRARY) $?
$(RANLIB) $(LIBRARY)
install: libinstall
libinstall:
-if test ! -d $(PARMDIR); \
then mkdir $(PARMDIR); \
fi
echo "LIBDIR"$(LIBDIR)
$(INSTALL_PROGRAM) -m 644 $(LIBRARY) $(LIBDIR)/$(LIBRARY)
(cd $(LIBDIR); $(RANLIB) $(LIBRARY))
$(INSTALL_PROGRAM) -m 644 lats.h $(INCLUDEDIR)/lats.h
$(INSTALL_PROGRAM) -m 644 lats.inc $(INCLUDEDIR)/lats.inc
$(INSTALL_PROGRAM) -m 644 amip2.parms $(PARMDIR)/amip2.parms
test: $(LIBRARY) testnc wgrib testgrib testf
@echo "test netCDF"
@if test -f testnc.nc; \
then rm -f testnc.nc; \
fi
@testnc
@rm -f testnc.nc
@echo "test GRIB"
@if test -f testgrib.grb; \
then rm -f testgrib.grb; \
fi
@if test -f testgrib.ctl; \
then rm -f testgrib.ctl; \
fi
@if test -f testgrib.bin; \
then rm -f testgrib.bin; \
fi
@testgrib
@rm -f testgrib.grb
@rm -f testgrib.ctl
@rm -f testgrib.bin
@echo "test FORTRAN"
@if test -f testf.nc; \
then rm -f testf.ne; \
fi
@testf
@rm -f testf.nc
lats.o: lats.c latsint.h lats.h
latsint.o: latsint.c latsint.h lats.h latsparm.h
latsnc.o: latsnc.c latsint.h lats.h
latsgrib.o: latsgrib.c fgrib.h fgrib_init.h latsint.h lats.h
latstime.o: latstime.c latsint.h lats.h latstime.h
latsstat.o: latsstat.c latsint.h lats.h
latsfort.o: latsfort.c lats.h cfortran.h
fgbds.o: grads.h fgbds.c fgrib.h
fgutil.o: fgutil.c fgrib.h
latsgribmap.o: grads.h gagmap.h
gaddes.o: grads.h
gagmap.o: grads.h gagmap.h
gamach.o: grads.h
gautil.o: grads.h
latsls.o: latsint.h latsls.c latsint.o
$(CC) -c latsls.c $(CPPFLAGS) $(CPPOPTS) $(DEFS) $(CFLAGS) $(COPTS) -DLATSLS_VERSION=\"$(LATSLSVER)\"
.SUFFIXES: .F
.c.o:
$(CC) $(CPPFLAGS) $(CPPOPTS) $(DEFS) $(CFLAGS) $(COPTS) -c $<
.c:
$(CC) $(CPPFLAGS) $(CPPOPTS) $(DEFS) $(CFLAGS) $(COPTS) -o $@ $< $(LDFLAGS)
.F:
case $(OS) in \
'aix') \
/usr/ccs/lib/cpp -P $(CPPFLAGS) $(CPPOPTS) $(CFLAGS) $(COPTS) $(INCLUDES) $(DEFS) $< [email protected]; \
$(FC) $(FFLAGS) $(LDFLAGS) $(LIBS) [email protected] -o $@; \
rm [email protected]; \
;; \
*) \
$(FC) $(CPPFLAGS) $(CPPOPTS) $(INCLUDES) $(DEFS) $(FFLAGS) -o $@ $< $(LDFLAGS) $(LIBS); \
;; \
esac
clean:
-rm -f *.o core *.~*~ testnc testgrib testf testf.f
distclean: clean
-rm -f $(LIBRARY) testnc testnc.nc testgrib testgrib.grb \
testgrib.ctl testgrib.bin testgrib.gmp testf.nc latsls wgrib
settest:
cp liblats.a lib/
cp wgrib bin/
cp latsls bin/