File: yMakefile

package info (click to toggle)
ncl 6.3.0-13
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 196,648 kB
  • ctags: 70,631
  • sloc: ansic: 603,601; fortran: 441,469; sed: 11,222; csh: 8,350; yacc: 4,253; xml: 1,928; sh: 1,526; lex: 1,266; python: 1,067; f90: 652; perl: 479; java: 447; objc: 291; makefile: 109
file content (347 lines) | stat: -rw-r--r-- 11,189 bytes parent folder | download | duplicates (2)
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
#
#      $Id: yMakefile,v 1.6.6.1 2010/05/13 00:14:54 dbrown Exp $
#
###########################################################################
#			   Copyright (C)  1993			 	  #
#	     University Corporation for Atmospheric Research		  #
#			   All Rights Reserved				  #
#									  #
###########################################################################
#
#	File:		yMakefile for the NIO library
#
#	Author:		David Brown
#			National Center for Atmospheric Research
#			POB 3000, Boulder, Colorado
#
#	Date:		2009/05/12
#
#	Description:	
#
#	Usage:
#
#	Environment:
#
#	Files:
#
#
#	Options:


MYLIB_IO        =       libnio


#if defined(linux)
EXTRA_CCOPTIONS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
#endif

#ifdef BuildNetCDF4
NETCDF4_DEFS = -DUSE_NETCDF4
#else
#define NETCDF4LIB
#endif

#ifdef BuildHDF4
HDF4_DEFS = -DBuildHDF4 $(HDF4_NETCDF)
HDF4_SRCS = NclHDF.c
HDF4_OBJS = NclHDF.o
#else
#define HDF4_SRCS
#define HDF4_OBJS
#define HDFLIB
#endif

#if defined BuildHDF4 && defined BuildHDFEOS
HDFEOS_DEFS = -DBuildHDFEOS $(HDF4_NETCDF)
HDFEOS_SRCS = NclHDFEOS.c
HDFEOS_OBJS = NclHDFEOS.o
#else
#define HDFEOS_SRCS
#define HDFEOS_OBJS
#define HDFEOSLIB
#endif

#ifdef BuildHDF5
HDF5_DEFS = -DBuildHDF5
HDF5_SRCS = NclHDF5.c h5reader.c h5writer.c
HDF5_OBJS = NclHDF5.o h5reader.o h5writer.o
#else
#define HDF5_SRCS
#define HDF5_OBJS
#define HDF5LIB
#endif

#ifdef BuildHDFEOS5
HDFEOS5_DEFS = -DBuildHDFEOS5 $(HDF4_NETCDF)
HDFEOS5_SRCS = NclHDFEOS5.c
HDFEOS5_OBJS = NclHDFEOS5.o
#else
#define HDFEOS5_SRCS
#define HDFEOS5_OBJS
#define HDFEOS5LIB
#endif

#ifdef BuildGRIB2
#if defined(IRIX64) || defined(x86_64) || defined(__LP64__)
GRIB2_DEFS = -DBuildGRIB2 -D__64BIT__
#else
GRIB2_DEFS = -DBuildGRIB2
#endif
GRIB2_SRCS = NclGRIB2.c
GRIB2_OBJS = NclGRIB2.o
#else
#define GRIB2_SRCS
#define GRIB2_OBJS
#define GRIB2LIB
#endif

#ifdef BuildGDAL
GDAL_DEFS = -DBuildGDAL
GDAL_SRCS = NclOGR.c
GDAL_OBJS = NclOGR.o
#else
#define GDAL_SRCS
#define GDAL_OBJS
#define GDALLIB
#endif

NIO_DEFS = -DNIO_LIB_ONLY  -DENV_DEFS='$(NGENV_DESCRIPT)'


#define APPEND_UNDERSCORE 1
#define NO_APPEND_UNDERSCORE 2
#define CAPS_NO_APPEND_UNDERSCORE 3

#if defined(AIX) 
NGCALLF_DEF= -DFORTRAN_CALLING_METHOD=NO_APPEND_UNDERSCORE
#endif

EXTRA_CDEFINES = $(OS1_DEF) $(MAJOR_DEF) $(NETCDF4_DEFS) $(HDFEOS_DEFS) $(HDF4_DEFS) $(HDFEOS5_DEFS) $(HDF5_DEFS) $(GRIB2_DEFS) $(GDAL_DEFS) $(NIO_DEFS) $(NGCALLF_DEF)

GEN_HDRS	=	NclTypeobj.h NclTypelogical.h \
			NclTypedouble.h NclTypefloat.h \
			NclTypeint.h NclTypelong.h \
			NclTypeshort.h NclTypestring.h \
			NclTypeushort.h NclTypeuint.h NclTypeulong.h \
			NclTypeint64.h NclTypeuint64.h \
			NclTypeubyte.h NclTypebyte.h NclTypechar.h TypeSupport.h 

STATIC_HDRS	=	ApiRecords.h AttSupport.h DataSupport.h FileSupport.h  \
			NclAtt.h NclCallBacksI.h NclData.h AdvancedFileSupport.h \
			NclFile.h NclFileInterfaces.h NclMdInc.h NclHLUObj.h\
			NclAdvancedFile.h NclAdvancedGroup.h NclAdvancedFileStructure.h \
			NclMultiDValData.h NclMultiDValHLUObjData.h \
			OpsList.h Symbol.h VarSupport.h ListSupport.h \
			NclFileVar.h NclHLUVar.h HLUSupport.h NclCoordVar.h \
			NclType.h defs.h NclGroup.h NclVar.h NclDataDefs.h NclFileInterfaces.h \
			NclList.h NclMultiDValnclfileData.h \
			NclOneDValCoordData.h \
			date.h NclCCM.h NclGRIB.h NclGRIB2.h date.h tables.h \
			NclMultiDVallistData.h NclTypelist.h ccmhdr.h h5data_struct.h \
			cptec_254_gtb.h dwd_002_gtb.h dwd_201_gtb.h dwd_202_gtb.h \
			dwd_203_gtb.h dwd_204_gtb.h dwd_205_gtb.h dwd_206_gtb.h dwd_207_gtb.h \
			ecmwf_128_gtb.h ecmwf_129_gtb.h ecmwf_130_gtb.h ecmwf_131_gtb.h \
			ecmwf_132_gtb.h ecmwf_133_gtb.h ecmwf_140_gtb.h ecmwf_150_gtb.h ecmwf_151_gtb.h \
			ecmwf_160_gtb.h ecmwf_162_gtb.h ecmwf_170_gtb.h ecmwf_171_gtb.h ecmwf_172_gtb.h \
			ecmwf_173_gtb.h ecmwf_174_gtb.h ecmwf_175_gtb.h ecmwf_180_gtb.h ecmwf_190_gtb.h \
			ecmwf_200_gtb.h ecmwf_201_gtb.h ecmwf_210_gtb.h ecmwf_211_gtb.h ecmwf_228_gtb.h \
			ecmwf_230_gtb.h ecmwf_234_gtb.h ecmwf_213_gtb.h ecmwf_214_gtb.h ecmwf_215_gtb.h \
			ecmwf_217_gtb.h ecmwf_218_gtb.h ecmwf_219_gtb.h ecmwf_220_gtb.h ecmwf_221_gtb.h \
			fnmoc_gtb.h fsl0_gtb.h fsl1_gtb.h fsl2_gtb.h ncep_opn_gtb.h \
			ncep_reanal_gtb.h ncep_128_gtb.h ncep_129_gtb.h	 ncep_130_gtb.h \
			ncep_131_gtb.h	ncep_133_gtb.h	ncep_140_gtb.h	ncep_141_gtb.h jma_3_gtb.h \
			jra55_gtb.h mpi_128_gtb.h mpi_180_gtb.h mpi_199_gtb.h mpi_181_gtb.h \
			NclOptions.h NclGrpFuncs.null NclHDF.h

INSTALL_HDRS	=	nio.h niohlu.h nioNresDB.h defs.h Symbol.h NclDataDefs.h NclFile.h \
			nioc.h nioError.h NclData.h nioBase.h nioCallbacks.h nioConvertP.h NclType.h \
			nioConvert.h niohluP.h nioNgSizeT.h nioUtils.h ListSupport.h AdvancedFileSupport.h \
			NclGroup.h NclVar.h NclFileInterfaces.h DataSupport.h FileSupport.h NclMdInc.h \
			TypeSupport.h NclTypedouble.h NclTypefloat.h NclTypelong.h NclTypeint.h \
			NclTypeshort.h NclTypestring.h NclTypelogical.h NclTypeubyte.h NclTypebyte.h NclTypechar.h \
			NclTypeobj.h NclTypeint64.h NclTypeulong.h NclTypeuint.h NclTypeushort.h \
			NclTypeuint64.h NclMultiDValData.h NclMultiDValHLUObjData.h \
			NclMultiDValnclfileData.h NclOneDValCoordData.h NclMultiDVallistData.h

NIO_ONLY_HDRS	=	cmpf.h nioBase.h nioBaseI.h nioBaseP.h nioCallbacks.h nioCallbacksP.h \
			nioc.h nioConvert.h nioConvertP.h nioError.h nio.h niohlu.h niohluP.h \
			nioNresDB.h nio_path.h nioResList.h nioVarArg.h nioNgSizeT.h nioUtils.h

HDRS		=	$(GEN_HDRS) $(STATIC_HDRS) $(NIO_ONLY_HDRS)


GEN_TYPE_SRCS	=	NclTypedouble.c NclTypefloat.c \
			NclTypeint.c NclTypelogical.c \
			NclTypelong.c NclTypeobj.c \
			NclTypeshort.c NclTypestring.c \
			NclTypeushort.c NclTypeuint.c NclTypeulong.c \
			NclTypeint64.c NclTypeuint64.c \
			NclTypebyte.c NclTypeubyte.c NclTypechar.c TypeSupport.c \
			NclMultiDValData.c 

STATIC_SRCS	=	AddFileFormats.c AttSupport.c DataSupport.c \
			FileSupport.c Formats.c GetGrids.c \
			InitData.c Memory.c NclAtt.c NclCCM.c \
			NclCoordVar.c NclData.c NclFile.c NclFileVar.c \
			NclAdvancedFile.c NclAdvancedGroup.c  \
			NclGRIB.c NclMultiDValnclfileData.c \
			NclNetCdf.c NclOneDValCoordData.c NclType.c \
			NclTypelist.c NclGroup.c NclVar.c VarSupport.c \
			AdvancedFileSupport.c ListSupport.c NclList.c \
			NclMultiDVallistData.c NclNetCDF4.c NclNewHDF5.c NclNewHDFEOS5.c \
			ctoiee.c date.c cmpf.c

NIO_ONLY_CSRCS	=	cmpf.c nioBase.c nio.c nioCallbacks.c nioConvert.c nioError.c niohlu.c nio_io.c \
			nioNclHLUStub.c nioNresDB.c nioQuarks.c nio_path.c nioUtils.c

NIO_ONLY_FSRCS	=	llmap.f llmisc.f


GEN_SRCS	=	$(GEN_TYPE_SRCS)

CSRCS		=	$(STATIC_SRCS) $(HDFEOS_SRCS) $(HDF4_SRCS) $(HDFEOS5_SRCS) $(HDF5_SRCS) $(GRIB2_SRCS) $(GDAL_SRCS)

OPT_CSRCS	=	NclHDF.c NclHDFEOS.c NclHDFEOS5.c NclHDF5.c NclGRIB2.c NclOGR.c h5reader.c h5writer.c NclAdvancedOGR.c

FSRCS		=	qu2reg3.f rowina3.f scm0.f ncepcode.f

SRCS		=	$(GEN_SRCS) $(IO_SRCS) $(NIO_ONLY_CSRCS) $(NIO_ONLY_FSRCS) $(FSRCS)

NIO_CP_SRCS	=	$(GEN_TYPE_SRCS) $(STATIC_SRCS) $(NIO_ONLY_CSRCS) $(NIO_ONLY_FSRCS) $(FSRCS) $(OPT_CSRCS)


GEN_TYPE_OBJS	=	NclTypedouble.o NclTypefloat.o \
			NclTypeint.o NclTypelogical.o \
			NclTypelong.o NclTypeobj.o \
			NclTypeshort.o NclTypestring.o \
			NclTypeushort.o NclTypeuint.o NclTypeulong.o \
			NclTypeint64.o NclTypeuint64.o \
			NclTypebyte.o NclTypeubyte.o NclTypechar.o TypeSupport.o \
			NclMultiDValData.o 

STATIC_OBJS	=	AddFileFormats.o AttSupport.o DataSupport.o \
			FileSupport.o Formats.o GetGrids.o \
			InitData.o Memory.o NclAtt.o NclCCM.o \
			NclCoordVar.o NclData.o NclFile.o NclFileVar.o \
			NclAdvancedFile.o NclAdvancedGroup.o \
			NclGRIB.o NclHDF.o NclMultiDValnclfileData.o \
			NclNetCdf.o NclOneDValCoordData.o NclType.o \
			NclTypelist.o NclGroup.o NclVar.o VarSupport.o \
			AdvancedFileSupport.o ListSupport.o NclList.o \
			NclMultiDVallistData.o NclNetCDF4.o NclNewHDF5.o NclNewHDFEOS5.o \
			ctoiee.o date.o

NIO_ONLY_COBJS	=	nio.o nio_io.o nioError.o nioNresDB.o nioCallbacks.o \
			nioQuarks.o cmpf.o nioBase.o \
			nioConvert.o  niohlu.o \
			nioNclHLUStub.o nio_path.o nioUtils.o

NIO_ONLY_FOBJS	=	llmap.o llmisc.o

FOBJS		=	qu2reg3.o rowina3.o scm0.o ncepcode.o

COMMON_OBJS	=	$(GEN_TYPE_OBJS) $(STATIC_OBJS) $(FOBJS) $(HDFEOS_OBJS) $(HDF4_OBJS) $(HDFEOS5_OBJS) $(HDF5_OBJS) $(GRIB2_OBJS) $(GDAL_OBJS) 
OBJS		=	$(COMMON_OBJS) $(NIO_ONLY_COBJS) $(NIO_ONLY_FOBJS) 


ConditionalInstallTarget($(HDRS),$(INSTALL_INC),$(PYNIOSRC),$(PYNIOSRC)/libsrc)
ConditionalInstallTarget($(NIO_CP_SRCS),$(INSTALL_INC),$(PYNIOSRC),$(PYNIOSRC)/libsrc)

LibraryTarget($(MYLIB_IO),$(OBJS))

depend-local:: $(HDRS) $(SRCS)
DependTarget($(SRCS))

CleanFilesTarget($(GEN_HDRS) $(GEN_SRCS))

TypeSupport.h: TypeSupport.h.sed TypeSupportMatTemplate.h.sed TypeSupportOpTemplate.h.sed TypeSupportMonoOpTemplate.h.sed
	@$(SHELL) type_support_h.sh

TypeSupport.c: TypeSupport.c.sed TypeSupportMatTemplate.c.sed TypeSupportOpTemplate.c.sed TypeSupportMonoOpTemplate.c.sed
	@$(SHELL) type_support_c.sh

NclMultiDValData.c: NclMultiDValData.c.sed MultiDValOp.c.sed NclMultiDValData.h math_funcs.sh MatMulDValOp.c.sed
	@$(SHELL) multid_data_c.sh
#
# Data Object dependancies
#

#define	NclTypeRule_h(type)\
]\
NclType##type.h:	data_h.sh NclType.h.sed]\
	@$(SHELL) data_h.sh type]

#define NclTypeRule_c(type,xtra_dep)\
]\
NclType##type.c:	type##_data_c.sh op_funcs.sh NclType##type.c.specific xtra_dep]\
	@$(SHELL) type##_data_c.sh]

#define NclTypeRule(type,xtra_dep)\
NclTypeRule_h(type)\
NclTypeRule_c(type,xtra_dep)

NUM_OP_TMPL	=	TypeDivOpTemplate.c.sed \
			TypeFunctionOpTemplate.c.sed \
			TypeMatMulOpTemplate.c.sed \
			TypeIsMonoFunc.c.sed \
			TypeMonoOpTemplate.c.sed \
			TypeResetMissing.c.sed \
			TypeSelectOpTemplate.c.sed \
			TypeSimpleOpTemplate.c.sed \
			TypeXorOpTemplate.c.sed \
			TypeInitClassTemplate.c.sed \
			NclType.c.sed \
			NclType.h.sed 

STR_OP_TMPL	=	TypestringCompareOpTemplate.c.sed \
			TypestringSelectOpTemplate.c.sed \
			TypeInitClassTemplate.c.sed \
			NclTypestring.c.sed

FILE_OP_TMPL	=	NclMultiDValData.c.sed MultiDValOp.c.sed 


NclTypeRule(double,$(NUM_OP_TMPL))
NclTypeRule(float,$(NUM_OP_TMPL))
NclTypeRule(int,$(NUM_OP_TMPL))
NclTypeRule(long,$(NUM_OP_TMPL))
NclTypeRule(short,$(NUM_OP_TMPL))
NclTypeRule(logical,$(NUM_OP_TMPL))
NclTypeRule(string,$(STR_OP_TMPL))
NclTypeRule(obj,$(NUM_OP_TMPL))
NclTypeRule(char,$(NUM_OP_TMPL))
NclTypeRule(byte,$(NUM_OP_TMPL))
NclTypeRule(ubyte,$(NUM_OP_TMPL))
NclTypeRule(int64,$(NUM_OP_TMPL))
NclTypeRule(ushort,$(NUM_OP_TMPL))
NclTypeRule(uint,$(NUM_OP_TMPL))
NclTypeRule(ulong,$(NUM_OP_TMPL))
NclTypeRule(uint64,$(NUM_OP_TMPL))


#
# Data Format Dependencies
#
 
NclHDF.o: NclHDF.c
	  @echo 
	  @echo Compiling NclHDF.c will generate warning messages.
	  @echo These can safely be ignored.
      $(CC) -c $(HDFDEFINES) $(HDF4_NETCDF) $(CFLAGS) NclHDF.c
	  @echo 

NclHDFEOS.o: NclHDFEOS.c
	  @echo 
	  @echo Compiling NclHDFEOS.c will generate warning messages.
	  @echo These can safely be ignored.
      $(CC) -c $(HDFDEFINES) $(HDF4_NETCDF) $(CFLAGS) NclHDFEOS.c
	  @echo 

NclHDFEOS5.o: NclHDFEOS5.c
	  @echo 
	  @echo Compiling NclHDFEOS5.c will generate warning messages.
	  @echo These can safely be ignored.
      $(CC) -c $(HDFDEFINES) $(HDF4_NETCDF) $(CFLAGS) NclHDFEOS5.c
	  @echo