-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefile_hwrf
572 lines (491 loc) · 16.2 KB
/
makefile_hwrf
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# REQUIRES GMAKE!!!!
#
# makefile for wgrib2
#
# compiles every #@?! library needed by wgrib2
# then tries to compile wgrib2
#
# (1) must use gnu-make
# (2) the environment variable FC must be set to fortran-90 compiler or
# higher in order to compile netcdf and the optional IPOLATES
# not needed if netcdf and IPOLATES is not used
# (3) the environment veriable CC must be set to the C compiler
#
#
# mod 1/07 M. Schwarb (libgrib2c name change)
# mod 4/09 W. Ebisuzaki (use config.h)
# mod 6/10 W. Ebisuzaki ipolates
# mod 8/11 W. Ebisuzaki support environment variable FC={fortran 90+ compiler}
# needed by optional netcdf4 and ipolates
# mod 3/12 W. Ebisuzaki support openmp, gctpc
# mod 8/12 M. Schwarb gunzip -n -f, cd "$var"
# mod 10/12 W. Ebisuzaki
# mod 7/13 W. Ebisuzaki added got netcdf4 working again, added subdirectroy lib, bin, include, man
#
# Optional modules:
#
# NETCDF3: link in netcdf3 library to write netcdf3 files
# change: USE_NETCDF3=1 and USE_NETCDF4=0 in configuration below
#
# NETCDF4: link in netcdf4 library to write netcdf3/4 files
# change: USE_NETCDF3=0 and USE_NETCDF4=1 in configuration below
# need to download netcdf4 and hdf5 libraries and to put into grib2 directory
# need to define environment variable FC to be the command for the fortran compiler
#
# IPOLATES: link in IPOLATES library to interpolate to new grids
# change: USE_IPOLATES=1 in configuration below
# need to define environment variable FC to be the command for the fortran compiler
# need to modify makefile and perhaps source code
#
# MYSQL: link in interface to MySQL to write to mysql database
# change: USE_MYSQL=1 in configuration below
# need to have mysql installed
# may need to modify makefile
#
# UDF: add commands for user-defined functions and shell commands
# change: USE_UDF=1 in configuration below
#
# REGEX: use regular expression library, on by default
# change: USE_REGEX=0 to turn off (configuration below)
#
# TIGGE: ability for TIGGE-like variable names, on by default
# change: USE_TIGGE=0 to turn off (configuration below)
#
# USE_PROJ4: right now the proj4 library is used to confirm that the
# gctpc code is working right and is not very useful. This may change.
#
# USE_G2CLIB: include NCEP's g2clib (for testing purposes)
#
# To turn off PNG support
# USE_PNG=0
# USE_G2CLIB=0
#
# To turn off JPEG200 support
# USE_JASPER
# USE_G2CLIB=0
#
# on NCEP AIX
# export CC=/usr/vacpp/bin/xlc_r
# export CPP=/usr/bin/cpp
# export FC=xlf_r
#
# for clang
# export CC=clang
# export FC="gfortran -fplugin=dragonegg"
#
# for OS-X: uncomment line for makefile -f scripts/makefile.darwin
#
SHELL=/bin/sh
#
# netcdf3: write netcdf files with netcdf-3 library
# netcdf4: write netcdf files with netcdf-4 library
# regex: regular expression package used by (match,not), POSIX-2
# tigge: enable -tigge option for tigge names
# mysql: write to mysql files
# ipolates: fortran interpolation library
# udf: user defined functions
# openmp: multicore support using OpenMP
# wmo_validation: used for testing new templates
#
# the flags are stored in wgrib2/config.h
#
# Warning do not set both USE_NETCDF3 and USE_NETCDF4 to one
USE_NETCDF3=1
USE_NETCDF4=0
USE_REGEX=1
USE_TIGGE=1
USE_MYSQL=0
USE_IPOLATES=1
USE_UDF=0
USE_OPENMP=1
USE_PROJ4=0
USE_G2CLIB=1
USE_WMO_VALIDATION=0
USE_PNG=1
USE_JASPER=1
# Add any customization comments, appears in help and config pages
BUILD_COMMENTS=HWRF interpolation
# often enviroment variable FC=fortran compiler, is set to f77, need f90 compiler
# FC=gfortran
# CC=gcc
ifeq ($(USE_PNG),0)
ifeq ($(USE_G2CLIB),1)
$(error ERROR, USE_G2CLIB = 1 and USE_PNG = 0 are incompatible)
endif
endif
ifeq ($(USE_JASPER),0)
ifeq ($(USE_G2CLIB),1)
$(error ERROR, USE_G2CLIB = 1 and USE_JASPER = 0 are incompatible)
endif
endif
ifeq ($(USE_NETCDF3),1)
ifeq ($(USE_NETCDF4),1)
$(error ERROR, USE_NETCDF3 = 1 or USE_NETCDF4 = 1, not both)
endif
endif
ifeq ($(USE_NETCDF4),1)
ifeq ($(FC),)
$(error ERROR, USE_NETCDF4 = 1: must set fortran90 compiler by environement variable FC)
endif
endif
ifeq ($(USE_IPOLATES),1)
ifeq ($(FC),)
$(error ERROR, USE_IPOLATES = 1: must set fortran90 compiler by environement variable FC)
endif
endif
# wCPPFLAGS has the directory of the includes
# wLDFLAGS has the directory/name of the library
ifeq ($(findstring gcc,$(notdir $(CC))),gcc)
wCPPFLAGS+=-Wall -Wmissing-prototypes -Wold-style-definition -Werror=format-security -ffast-math -O3 -g
hdf5CFLAGS+=-Wall -Wmissing-prototypes -Wold-style-definition -O1 -g
endif
ifeq ($(findstring opencc,$(notdir $(CC))),opencc)
wCPPFLAGS+=-O3 -Wall -ffast-math -opencc
hdf5CFLAGS+=-O1 -Wall -opencc
endif
ifeq ($(findstring icc,$(notdir $(CC))),icc)
wCPPFLAGS+=-O2
hdf5CFLAGS+=-O2
$(error ERROR, makefile does not make jasper correctly with intel compiler)
endif
ifeq ($(findstring pgcc,$(notdir $(CC))),pgcc)
wCPPFLAGS+=-O2
hdf5CFLAGS+=-O2
$(error ERROR, makefile does not make jasper correctly with portland compiler)
endif
ifeq ($(findstring xlc_r,$(notdir $(CC))),xlc_r)
wCPPFLAGS+=-O3
hdf5CFLAGS+=-O2
endif
ifeq ($(findstring clang,$(notdir $(CC))),clang)
wCPPFLAGS+=-O3
hdf5CFLAGS+=-O2
endif
ifndef wCPPFLAGS
wCPPFLAGS+=-O3
hdf5CFLAGS+=-O2
endif
cwd:=${CURDIR}
lib:=${cwd}/lib
wLDFLAGS:=-L${lib}
a:=$(shell mkdir -p ${lib})
wCPPFLAGS+=-I${cwd}/include
CONFIG_H=${cwd}/wgrib2/config.h
a:=$(shell echo "/* config.h */" > ${CONFIG_H})
ifeq ($(USE_REGEX),1)
a:=$(shell echo "\#define USE_REGEX" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_REGEX" >> ${CONFIG_H})
endif
ifeq ($(USE_TIGGE),1)
a:=$(shell echo "\#define USE_TIGGE" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_TIGGE" >> ${CONFIG_H})
endif
# grib2c library
ifeq ($(USE_PNG),1)
g:=${cwd}/g2clib-1.4.0
glib:=${lib}/libgrib2c.a
wLDFLAGS+=-lgrib2c
wCPPFLAGS+=-I$g
else
ifeq ($(USE_JASPER),1)
g:=${cwd}/g2clib-1.4.0
glib:=${lib}/libgrib2c.a
wLDFLAGS+=-lgrib2c
wCPPFLAGS+=-I$g
endif
endif
ifeq ($(USE_G2CLIB),1)
a:=$(shell echo "\#define USE_G2CLIB" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_G2CLIB" >> ${CONFIG_H})
endif
# gctpc library
gctpc:=${cwd}/gctpc
gctpcsrc:=gctpc20a.tgz
gctpclib:=${lib}/libgeo.a
wLDFLAGS+=-lgeo
# wCPPFLAGS+=-I${gctpc}/source
# proj4 library
ifeq ($(USE_PROJ4),1)
proj4:=${cwd}/proj-4.8.0
proj4src:=${cwd}/proj-4.8.0.tar.gz
proj4lib:=${lib}/libproj.a
wLDFLAGS+=-lproj
# wCPPFLAGS+=-I${proj4}/src
a:=$(shell echo "\#define USE_PROJ4" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_PROJ4" >> ${CONFIG_H})
endif
# Jasper
ifeq ($(USE_JASPER),1)
j=${cwd}/jasper-1.900.1
# jsrc=jasper_1.900.1-10ubuntu1.debian.tgz
jsrc=jasper-fedora19.tgz
jlib=${lib}/libjasper.a
wLDFLAGS+=-ljasper
# wCPPFLAGS+=-I$j/src/libjasper/include
a:=$(shell echo "\#define USE_JASPER" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_JASPER" >> ${CONFIG_H})
endif
ifeq ($(USE_NETCDF3),1)
n:=${cwd}/netcdf-3.6.3
netcdfsrc=netcdf-3.6.3.tar.gz
nlib:=${lib}/libnetcdf.a
wLDFLAGS+=-lnetcdf
# wCPPFLAGS+=-I$n/libsrc
a:=$(shell echo "\#define USE_NETCDF3" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_NETCDF3" >> ${CONFIG_H})
endif
ifeq ($(USE_NETCDF4),1)
n4:=${cwd}/netcdf-4.3.0
netcdf4src=netcdf-4.3.0.tar.gz
n4lib:=${lib}/libnetcdf.a
h5:=${cwd}/hdf5-1.8.11
hdf5src:=hdf5-1.8.11.tar.gz
h5lib:=${lib}/libhdf5.a
wLDFLAGS+=-lnetcdf -lhdf5_hl -lhdf5 -ldl
# wCPPFLAGS+=-I${n4}/include -I${h5}/src -I${h5}/hl/src
a:=$(shell echo "\#define USE_NETCDF4" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_NETCDF4" >> ${CONFIG_H})
endif
ifeq ($(USE_MYSQL),1)
wCPPFLAGS+=`mysql_config --cflags`
wLDFLAGS+=`mysql_config --libs`
a:=$(shell echo "\#define USE_MYSQL" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_MYSQL" >> ${CONFIG_H})
endif
ifeq ($(USE_IPOLATES),1)
ip:=${cwd}/iplib_hwrf
iplib:=${lib}/libipolate_hwrf.a
wLDFLAGS+=-lipolate_hwrf
# for compiling with fortran library
# wLDFLAGS+= (libraries need by the fortran code)
# wCPPFLAGS+= -D(FORTRAN Name) see New_grid.c
# for G95 - personal system
ifeq ($(findstring g95,$(notdir $(FC))),g95)
# wLDFLAGS+=-L/export/cpc-lw-webisuzak/wd51we/g95-install/lib/gcc-lib/i686-unknown-linux-gnu/4.0.3 -lf95
wLDFLAGS+=-L/export/cpc-lw-webisuzak/wd51we/g95-install_64/lib/gcc-lib/x86_64-unknown-linux-gnu/4.0.3 -lf95
wCPPFLAGS+=-DG95
wFFLAGS+=-O2
endif
# for gfortran - ubuntu and cygwin 1.7.7-1
ifeq ($(findstring gfortran,$(notdir $(FC))),gfortran)
wLDFLAGS+=-lgfortran
wCPPFLAGS+=-DGFORTRAN
wFFLAGS+=-O2
endif
# for open64 fortran - personal system
ifeq ($(findstring openf95,$(notdir $(FC))),openf95)
wLDFLAGS+=/export/cpc-lw-webisuzak/wd51we/opt/x86_open64-4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/libfortran.a
wLDFLAGS+=/export/cpc-lw-webisuzak/wd51we/opt/x86_open64-4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/libffio.a
wCPPFLAGS+=-DOPENF95
wFFLAGS+=-O2
endif
# for portland f95
ifeq ($(notdir $(FC)),pgf95)
# wLDFLAGS+=/export/cpc-lw-webisuzak/wd51we/opt/x86_open64-4.2.5.1/lib/gcc-lib/x86_64-open64-linux/4.2.5.1/libfortran.a
# wLDFLAGS+=/export/cpc-lw-webisuzak/wd51we/opt/x86_open64-4.2.5.1/lib/gcc-lib/x86_64-open64-linux/4.2.5.1/libffio.a
wCPPFLAGS+=-DPGF95
wFFLAGS+=-O2
endif
# intel fortran
ifeq ($(notdir $(FC)),ifort)
wCPPFLAGS+=-DIFORT -cxxlib
wLDFLAGS+=-lifcore -lc -limf -lintlc
wFFLAGS+=-O2 -nofor_main -cxxlib
endif
# NCEP CCS:
ifeq ($(findstring xlf_r,$(notdir $(FC))),xlf_r)
wLDFLAGS+=-L/usr/lib - -lxlf90_r
wCPPFLAGS+=-DXLF
wFFLAGS+=-O2
endif
ifndef wFFLAGS
$(error ERROR, did not recognize fortran compiler, cannot use IPOLATES, set FC=f90 compiler)
endif
a:=$(shell echo "\#define USE_IPOLATES" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_IPOLATES" >> ${CONFIG_H})
endif
ifeq ($(USE_UDF),1)
a:=$(shell echo "\#define USE_UDF" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define USE_UDF" >> ${CONFIG_H})
endif
# OPENMP .. only select configurations
ifeq ($(USE_OPENMP),1)
ifeq ($(findstring gcc,$(notdir $(CC))),gcc)
ifeq ($(findstring gfortran,$(notdir $(FC))),gfortran)
a:=$(shell echo "\#define USE_OPENMP" >> ${CONFIG_H})
wCPPFLAGS+=-fopenmp
wFFLAGS+=-fopenmp
endif
endif
ifeq ($(findstring opencc,$(notdir $(CC))),opencc)
ifeq ($(findstring openf95,$(notdir $(FC))),openf95)
a:=$(shell echo "\#define USE_OPENMP" >> ${CONFIG_H})
wCPPFLAGS+=-fopenmp
wFFLAGS+=-fopenmp
endif
endif
ifeq ($(notdir $(CC)),icc)
ifeq ($(notdir $(FC)),ifort)
a:=$(shell echo "\#define USE_OPENMP" >> ${CONFIG_H})
wCPPFLAGS+=-openmp
wFFLAGS+=-openmp
endif
endif
ifeq ($(findstring xlc_r,$(notdir $(CC))),xlc_r)
ifeq ($(findstring xlf_r,$(notdir $(FC))),xlf_r)
a:=$(shell echo "\#define USE_OPENMP" >> ${CONFIG_H})
wCPPFLAGS+=-qsmp=omp
wFFLAGS+=-qsmp=omp
endif
endif
endif
# save fortran and C compiler names in config.h file
a:=$(shell echo "\#define CC \"${CC}\"" >> ${CONFIG_H})
a:=$(shell echo "\#define FORTRAN \"${FC}\"" >> ${CONFIG_H})
a:=$(shell echo "\#define BUILD_COMMENTS \"${BUILD_COMMENTS}\"" >> ${CONFIG_H})
# png
ifeq ($(USE_PNG),1)
p=${cwd}/libpng-1.2.50
psrc=${cwd}/libpng-1.2.50.tar.gz
plib=${lib}/libpng.a
wLDFLAGS+=-lpng
# wCPPFLAGS+=-I$p
a:=$(shell echo "\#define USE_PNG" >> ${CONFIG_H})
# z
z=${cwd}/zlib-1.2.8
zlib=${lib}/libz.a
wLDFLAGS+=-lz
# wCPPFLAGS+=-I$z
else
a:=$(shell echo "//\#define USE_PNG" >> ${CONFIG_H})
endif
# WMO Validation testing mode
ifeq ($(USE_WMO_VALIDATION),1)
a:=$(shell echo "\#define WMO_VALIDATION" >> ${CONFIG_H})
else
a:=$(shell echo "//\#define WMO_VALIDATION" >> ${CONFIG_H})
endif
wLDFLAGS+=-lm
wCPPFLAGS+=-I/usr/include ${CPPFLAGS}
# -----------------------------------------------------
# check if make is GNU make else use gmake
make_is_gnu:=$(word 1,$(shell make -v))
ifeq ($(make_is_gnu),GNU)
MAKE:=make
else
MAKE:=gmake
endif
w=wgrib2
prog=$w/wgrib2
all: ${netcdf4src} ${hdf5src} ${prog} aux_progs/gmerge aux_progs/smallest_grib2 aux_progs/smallest_4
${prog}: $w/*.c $w/*.h ${jlib} ${nlib} ${zlib} ${plib} ${h5lib} ${glib} ${n4lib} ${iplib} ${gctpclib} ${proj4lib}
cd "$w" && export LDFLAGS="${wLDFLAGS}" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE}
fast: $w/*.c $w/*.h ${jlib} ${nlib} ${zlib} ${plib} ${h5lib} ${glib} ${n4lib} ${iplib} ${gctpclib} ${proj4lib}
cd "$w" && export LDFLAGS="${wLDFLAGS}" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE} fast
${jlib}:
cp ${jsrc} tmpj.tar.gz
gunzip -n -f tmpj.tar.gz
tar -xvf tmpj.tar
rm tmpj.tar
cd "$j" && export CFLAGS="${wCPPFLAGS}" && ./configure --without-x --disable-libjpeg --disable-opengl --prefix=${cwd} && ${MAKE} check install
${plib}: ${zlib}
cp ${psrc} tmpp.tar.gz
gunzip -n -f tmpp.tar.gz
tar -xvf tmpp.tar
rm tmpp.tar
# for OSX
# export LDFLAGS="-L$z" && cd "$p" && export CPPFLAGS="${wCPPFLAGS}" && make -f scripts/makefile.darwin
# for everybody else
export LDFLAGS="-L${lib}" && cd "$p" && export CPPFLAGS="${wCPPFLAGS}" && ./configure --disable-shared --prefix=${cwd} && ${MAKE} check install
${zlib}:
cp $z.tar.gz tmpz.tar.gz
gunzip -f tmpz.tar.gz
tar -xvf tmpz.tar
rm tmpz.tar
cd "$z" && export CFLAGS="${wCPPFLAGS}" && ./configure --prefix=${cwd} && ${MAKE} check install
${glib}: ${jlib} ${plib} ${zlib}
touch ${glib}
rm ${glib}
cd "$g" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE} && cp libgrib2c.a ${lib}
${gctpclib}:
cp ${gctpcsrc} tmpgctpc.tar.gz
gunzip -n -f tmpgctpc.tar.gz
tar -xvf tmpgctpc.tar
rm tmpgctpc.tar
cp makefile.gctpc proj.h ${gctpc}/source/
cd "${gctpc}/source" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE} -f makefile.gctpc
cp ${gctpc}/source/libgeo.a ${lib}
cp ${gctpc}/source/proj.h ${cwd}/include
${proj4lib}:
cp ${proj4src} tmpproj4.tar.gz
gunzip -f tmpproj4.tar.gz
tar -xvf tmpproj4.tar
rm tmpproj4.tar
cd ${proj4} && ./configure --disable-shared --prefix=${cwd} && ${MAKE} check install
${nlib}:
cp ${netcdfsrc} tmpn.tar.gz
gunzip -f tmpn.tar.gz
tar -xvf tmpn.tar
rm tmpn.tar
cd $n && export CPPFLAGS="${wCPPFLAGS}" && ./configure --enable-c-only --prefix=${cwd} && ${MAKE} check install
${n4lib}: ${zlib} ${netcdf4src} ${h5lib}
cp ${netcdf4src} tmpn4.tar.gz
gunzip -n -f tmpn4.tar.gz
tar -xvf tmpn4.tar
rm tmpn4.tar
cd "${n4}" && export CPPFLAGS="${wCPPFLAGS}" && export LDFLAGS="-L${lib}" && export LIBS="-lhdf5 -ldl" && ./configure --disable-fortran --disable-cxx --disable-dap --enable-netcdf-4 --prefix=${cwd} --disable-shared && ${MAKE} install
${netcdf4src}:
$(error ERROR, get netcdf4 source by "wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.0.tar.gz" )
${h5lib}: ${hdf5src}
cp ${hdf5src} tmph5.tar.gz
gunzip -n -f tmph5.tar.gz
tar -xvf tmph5.tar
rm tmph5.tar
cd "${h5}" && export CFLAGS="${hdf5CFLAGS}" && export LDFLAGS="${LDFLAGS}" && ./configure --disable-shared --with-zlib=$z --prefix=${cwd} && ${MAKE} all check install
${hdf5src}:
$(error ERROR, get hdf5 source by "wget http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.11/src/hdf5-1.8.11.tar.gz" )
${iplib}:
cd "${ip}" && export FFLAGS="${wFFLAGS}" && ${MAKE} && cp libipolate.a ${iplib}
aux_progs/gmerge: aux_progs/gmerge.c
cd aux_progs && ${MAKE} -f gmerge.make
aux_progs/smallest_grib2: aux_progs/smallest_grib2.c
cd aux_progs && ${MAKE} -f smallest_grib2.make
aux_progs/smallest_4: aux_progs/smallest_4.c
cd aux_progs && ${MAKE} -f smallest_4.make
clean:
[ -d "${lib}" ] && rm -r ${lib}
[ -d "${cwd}/bin" ] && rm -r ${cwd}/bin
[ -d "${cwd}/include" ] && rm -r ${cwd}/include
[ -d "${cwd}/man" ] && rm -r ${cwd}/man
cd $w && ${MAKE} clean
cd $g && touch junk.a junk.o && rm *.o *.a
[ -d "$j" ] && rm -rf $j
[ -d "$p" ] && rm -rf $p
[ -d "$z" ] && rm -rf $z
[ -d "${gctpc}" ] && rm -rf ${gctpc}
ifeq ($(USE_IPOLATES),1)
[ -d "${ip}" ] && touch ${ip}/junk.o ${ip}/junk.a && rm ${ip}/*.o ${ip}/*.a
endif
ifeq ($(USE_NETCDF3),1)
[ -d "$n" ] && rm -rf $n
endif
ifeq ($(USE_NETCDF4),1)
[ -d "${n4}" ] && rm -rf ${n4}
[ -d "${h5}" ] && rm -rf ${h5}
endif
ifeq ($(USE_PROJ4),1)
[ -d "${proj4}" ] && rm -rf ${proj4}
endif
cd aux_progs && ${MAKE} clean -f gmerge.make
cd aux_progs && ${MAKE} clean -f smallest_grib2.make
cd aux_progs && ${MAKE} clean -f smallest_4.make