Repository navigation
Expand file tree
/
Copy pathrap_make.NNT
More file actions
235 lines (190 loc) · 6.08 KB
/
Copy pathrap_make.NNT
File metadata and controls
235 lines (190 loc) · 6.08 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
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
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** Copyright UCAR (c) 1992 - 2010
# ** University Corporation for Atmospheric Research(UCAR)
# ** National Center for Atmospheric Research(NCAR)
# ** Research Applications Laboratory(RAL)
# ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
###########################################################
#
# Macros for NSAP's RHEL code base
# Adopted from rap_make.LINUX_64_wheezy
#
############################################################
#
# system utilities
#
SHELL = /bin/sh
RM = /bin/rm -f
MV = /bin/mv -f
CP = /bin/cp
CP_DIR = /bin/cp -r
MKDIR = /bin/mkdir -p
TEST = /usr/bin/test
PERL = /usr/bin/perl
AWK = /usr/bin/awk
DATE = date -u
PWD = pwd
#
# includes
#
SYS_INCLUDES =
SYS_X_INCLUDES = -I/usr/include/X11
SYS_XVIEW_INCLUDES =
#
# LD_LIBRARY_PATH
#
SYS_LD_LIBRARY_PATH =
#
# lint
#
LINT = alint
LINTFILTER = $(RAP_MAKE_BIN_DIR)/lint_filter.$(HOST_OS)
SYS_LINTFLAGS = -aux -DLINT -D$(HOST_OS)
#
# cppcheck
#
SYS_CPPCHECKFLAGS=$(LOC_INCLUDES) -d $(RAP_INC_DIR) -d $(RAP_SHARED_INC_DIR)
SYS_CPPCHECKFLAGS2=-I$(LOC_INC_DIR)
#
# compile
#
# gcc
#
CC = gcc
SYS_CFLAGS = $(GCC_WARNINGS) -D$(HOST_OS) -D_BSD_TYPES -DF_UNDERSCORE2 $(MY_CFLAGS)
PROFILE_FLAG = -pg
DEBUG_FLAG = -g
OPT_FLAG = -O2
# pgc
PGI_CC = pgcc
PGI_SYS_CFLAGS = -D$(HOST_OS) -D_BSD_TYPES -DF_UNDERSCORE2 -Minform,severe -silent $(MY_PGI_CFLAGS)
# intel c
INTEL_CC = icc
INTEL_SYS_CFLAGS = -D$(HOST_OS) -D_BSD_TYPES -DF_UNDERSCORE2 $(MY_INTEL_CFLAGS)
#
# cc
#
SYS_CPPC_CFLAGS = $(SYS_CFLAGS) $(MY_CPPC_CFLAGS)
CPPC = g++
SYS_CPPC_INCLUDES =
ACC = $(CC)
PGI_CPPC = pgCC
PGI_SYS_CPPC_CFLAGS = -D$(HOST_OS) -D_BSD_TYPES -DF_UNDERSCORE2 -Minform=severe -silent -fPIC $(MY_PGI_CPPC_CFLAGS)
INTEL_CPPC = icc
INTEL_SYS_CPPC_CFLAGS = -D$(HOST_OS) -D_BSD_TYPES -DF_UNDERSCORE2 $(MY_INTEL_CPPC_CFLAGS)
# fortran
FC = gfortran
F90C = gfortran
F95C = gfortran
F90FLAGS=$(MY_F90FFLAGS) $(LOC_F90FFLAGS)
PGI_F90C=pgf90
PGI_FC=pgf90
PGI_F95C=pgf95
SYS_PGI_FFLAGS=-DLITENDIAN $(MY_PGI_FFLAGS)
INTEL_F90C = ifort
INTEL_FC = ifort
INTEL_F95C = ifort
SYS_INTEL_FFLAGS=$(MY_INTEL_FFLAGS)
# Compile -- special for C <-> FORTRAN
# The "NATIVE" compilers need to be either both GNU or both
# non-GNU for these compiles to work. If you use GNU, then
# the USE_GNU_F2C must be set to "-DUSE_GNU_F2C" (no quotes).
NATIVE_CC = gcc
NATIVE_FC = gfortran
NATIVE_LIB_DIR =
F_TO_C_LIBS = -lg2c
USE_GNU_F2C = -DUSE_GNU_F2C
SYS_FFLAGS = -DLITENDIAN $(MY_FFLAGS)
#
# link
#
STATIC_FLAG=-static
SYS_LIBS =
SYS_CPPC_LIBS =
# Don't include -lXm, -lXpm as it fails with the libc6 version of libX11
SYS_X_LIBS = -lXext -lXt -lX11 -lSM -lICE
SYS_LDFLAGS = -L/usr/lib64 $(MY_LDFLAGS)
SYS_CPPC_LDFLAGS = -L/usr/lib64 $(MY_CPPC_LDFLAGS)
SYS_X_LDFLAGS = -L/usr/lib/X11
SYS_F_LDFLAGS = $(MY_F_LDFLAGS)
SYS_XVIEW_LDFLAGS =
SYS_MOTIF_LDFLAGS =
SYS_MOTIF_LIBS = -lXm -lXp -lXext
LEX_LIB = -ll
YACC_LIB =
SYS_UCB_LIBS =
SYS_UCB_LDFLAGS =
#
# Archiving libs
#
AR = ar
ARFLAGS = rv
RANLIB = na
HAVE_RANLIB=FALSE
#
# yacc and lex
#
YACC = yacc
LEX = lex
SYS_YACCFLAGS = -d -t -v
SYS_LEXFLAGS =
# NCAR Graphics
# NCG_INC_DIR defines location of NCAR Graphics include files
# NCG_LIB_DIR defines location of NCAR Graphics libraries
# NCAR_CC defines name of script to do NCAR Graphics links
# NCAR_CPPC defines name of script to do NCAR Graphics links
NNT_NCG=/opt/ncl
NCG_INC_DIR=-I$(NNT_NCG)/include
NCG_LIB_DIR=-L$(NNT_NCG)/lib
NCAR_CC=ncargcc
NCAR_CPPC=ncarg++
# netCDF - The NNT environment does not have include all the versions
# of netCDF that are installed and supported under Debian
# Important: netCDF 4 has an implicit dependency
# on HDF5, udunits2, and zlib that was not the case in netCDF 3
# Most importantly, the linker will make use of RUN_PATH over RPATH
# as a result of the --enable-new-dtags option
# to allow developers to override library locations for their own local development
NNT_SZIP=/opt/szip
SZIP_INCLUDES=$(MY_SZIP_INCS) -I$(NNT_SZIP)/include
SZIP_LDFLAGS=$(MY_SZIP_LDFLAGS) -L$(NNT_SZIP)/lib -Wl,-rpath,$(NNT_SZIP)/lib,--enable-new-dtags
SZIP_LIBS=$(MY_SZIP_LIBS) -lsz
NNT_UDNT2=/opt/udunits2
UDUNITS_INCS=$(MY_UDUNITS_INCS) -I$(NNT_UDNT2)/include
UDUNITS_LDFLAGS=$(MY_UDUNITS_LDFLAGS) -L$(NNT_UDNT2)/lib -Wl,-rpath,$(NNT_UDNT2)/lib,--enable-new-dtags
UDUNITS_LIBS=$(MY_UDUNITS_LIBS) -ludunits2
NNT_HDF5=/opt/hdf5
HDF5_INCLUDES=$(MY_HDF5_INCS) -I$(NNT_HDF5)/include $(SZIP_INCLUDES)
HDF5_LDFLAGS=$(MY_HDF5_LDFLAGS) -L$(NNT_HDF5)/lib $(SZIP_LDFLAGS) -Wl,-rpath,$(NNT_HDF5)/lib,--enable-new-dtags
NNT_NCDF=/opt/netcdf
NETCDF_INCS=$(MY_NETCDF_INCS) -I$(NNT_NCDF)/include $(HDF5_INCLUDES) $(UDUNITS_INCS)
NETCDF_LDFLAGS=$(MY_NETCDF_LDFLAGS) -L$(NNT_NCDF)/lib $(HDF5_LDFLAGS) $(UDUNITS_LDFLAGS) -Wl,-rpath,$(NNT_NCDF)/lib,--enable-new-dtags
NETCDF4_INCS=$(MY_NETCDF4_INCS) -I$(NNT_NCDF)/include $(HDF5_INCLUDES) $(UDUNITS_INCS)
NETCDF4_LDFLAGS=$(MY_NETCDF4_LDFLAGS) -L$(NNT_NCDF)/lib $(HDF5_LDFLAGS) $(UDUNITS_LDFLAGS) -Wl,-rpath,$(NNT_NCDF)/lib,--enable-new-dtags
NNT_PGI_NCDF=/opt/netcdf-pgi
PGI_NETCDF_INCS=$(MY_PGI_NETCDF_INCS) -I$(NNT_PGI_NCDF)/include $(HDF5_INCLUDES) $(UDUNITS_INCS)
PGI_NETCDF_LDFLAGS=$(MY_PGI_NETCDF_LDFLAGS) -L$(NNT_PGI_NCDF)/lib $(HDF5_LDFLAGS) $(UDUNITS_LDFLAGS) -Wl,-rpath,$(NNT_PGI_NCDF)/lib,--enable-new-dtags
NETCDF_C_LIB=-lnetcdf
NETCDF_C++_LIB=-lnetcdf_c++
NETCDF_FF_LIB=-lnetcdff
NETCDF_C_AND_C++_LIBS= -lnetcdf_c++ -lnetcdf
NETCDF_C_AND_F_LIBS=-lnetcdff -lnetcdf
NETCDF3_LIB_LIST=
NETCDF4_LIBS=-lNcxx -lnetcdf_c++ -lnetcdf -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5 -lsz -ludunits2
NETCDF_LIB_LIST=$(NETCDF4_LIBS)
NETCDF_LIBS=$(NETCDF4_LIBS)
NETCDF_INCLUDES=$(NETCDF4_INCS)
NETCDF_LDFLAGS=$(NETCDF4_LDFLAGS)
#
# Jasper
#
JASPER_INCLUDES = -I/usr/local/jasper/include
JASPER_LDFLAGS = -L/usr/local/jasper/lib
JASPER_LIBS = -ljasper
# MADIS
# These have the MY_MADIS_LIBS first intentionally.
#MADIS_LIBS = $(MY_MADIS_LIBS) /opt/madis-gcc/lib/madislib.a
MADIS_LIBS = $(MY_MADIS_LIBS)
PGI_MADIS_LIBS = $(MY_PGI_MADIS_LIBS) /opt/madis-pgi/lib/madislib.a
INTEL_MADIS_LIBS = $(MY_INTEL_MADIS_LIBS) /opt/madis-intel/lib/madislib.a