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