Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / frame / Makefile
blob57d6f98323951a68860f72943b7c111973d810a8
2 include ../configure.wrf
4 LN = ln -sf
5 MAKE = make -i -r
6 RM = rm -f
10 MODULES = module_driver_constants.o \
11 module_domain_type.o \
12 module_streams.o \
13 module_domain.o \
14 $(LLIST) \
15 module_integrate.o \
16 module_timing.o \
17 module_configure.o \
18 module_tiles.o \
19 module_machine.o \
20 module_nesting.o \
21 module_wrf_error.o \
22 module_state_description.o \
23 module_sm.o \
24 module_io.o \
25 module_comm_dm.o \
26 module_comm_dm_0.o \
27 module_comm_dm_1.o \
28 module_comm_dm_2.o \
29 module_comm_dm_3.o \
30 module_comm_dm_4.o \
31 module_comm_nesting_dm.o \
32 module_dm.o \
33 module_quilt_outbuf_ops.o \
34 module_io_quilt.o \
35 module_cpl.o \
36 module_cpl_oasis3.o \
37 module_clear_halos.o
38 ALOBJS =\
39 ../inc/allocs_0.o \
40 ../inc/allocs_1.o \
41 ../inc/allocs_2.o \
42 ../inc/allocs_3.o \
43 ../inc/allocs_4.o \
44 ../inc/allocs_5.o \
45 ../inc/allocs_6.o \
46 ../inc/allocs_7.o \
47 ../inc/allocs_8.o \
48 ../inc/allocs_9.o \
49 ../inc/allocs_10.o \
50 ../inc/allocs_11.o \
51 ../inc/allocs_12.o \
52 ../inc/allocs_13.o \
53 ../inc/allocs_14.o \
54 ../inc/allocs_15.o \
55 ../inc/allocs_16.o \
56 ../inc/allocs_17.o \
57 ../inc/allocs_18.o \
58 ../inc/allocs_19.o \
59 ../inc/allocs_20.o \
60 ../inc/allocs_21.o \
61 ../inc/allocs_22.o \
62 ../inc/allocs_23.o \
63 ../inc/allocs_24.o \
64 ../inc/allocs_25.o \
65 ../inc/allocs_26.o \
66 ../inc/allocs_27.o \
67 ../inc/allocs_28.o \
68 ../inc/allocs_29.o \
69 ../inc/allocs_30.o \
70 ../inc/allocs_31.o
72 NLOBJS =\
73 nl_get_0_routines.o \
74 nl_get_1_routines.o \
75 nl_get_2_routines.o \
76 nl_get_3_routines.o \
77 nl_get_4_routines.o \
78 nl_get_5_routines.o \
79 nl_get_6_routines.o \
80 nl_get_7_routines.o \
81 nl_set_0_routines.o \
82 nl_set_1_routines.o \
83 nl_set_2_routines.o \
84 nl_set_3_routines.o \
85 nl_set_4_routines.o \
86 nl_set_5_routines.o \
87 nl_set_6_routines.o \
88 nl_set_7_routines.o
90 DEALOBJS =\
91 ../inc/deallocs_0.o \
92 ../inc/deallocs_1.o \
93 ../inc/deallocs_2.o \
94 ../inc/deallocs_3.o \
95 ../inc/deallocs_4.o \
96 ../inc/deallocs_5.o \
97 ../inc/deallocs_6.o \
98 ../inc/deallocs_7.o \
99 ../inc/deallocs_8.o \
100 ../inc/deallocs_9.o \
101 ../inc/deallocs_10.o \
102 ../inc/deallocs_11.o
104 OBJS = \
105 wrf_num_bytes_between.o \
106 wrf_shutdown.o \
107 wrf_debug.o \
108 libmassv.o \
109 collect_on_comm.o \
110 hires_timer.o \
111 clog.o
113 ifeq ($(DMPARALLEL),1)
114 RSL_OBJS= \
115 ../external/RSL_LITE/feedback_domain_em_part1.o \
116 ../external/RSL_LITE/feedback_domain_em_part2.o \
117 ../external/RSL_LITE/force_domain_em_part2.o \
118 ../external/RSL_LITE/interp_domain_em_part1.o \
119 ../external/RSL_LITE/interp_domain_em_part2.o \
120 ../external/RSL_LITE/interp_domain_em_part3.o \
121 ../external/RSL_LITE/interp_domain_em_small.o
122 endif
124 #compile as a .o but do not link into the main library
125 SPECIAL = module_internal_header_util.o pack_utils.o
128 LIBTARGET = framework
129 TARGETDIR = ./
130 $(LIBTARGET) : $(MODULES) $(OBJS) $(SPECIAL) $(NLOBJS) $(ALOBJS) $(DEALOBJS) $(RSL_OBJS)
131 $(AR) $(ARFLAGS) ../main/$(LIBWRFLIB) $(MODULES) $(OBJS) $(NLOBJS) $(ALOBJS) $(DEALOBJS) $(RSL_OBJS)
132 $(RANLIB) ../main/$(LIBWRFLIB)
134 nl_set_0_routines.o : nl_access_routines.F module_configure.o
135 $(CPP) -DNNN=0 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx0.f90
136 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx0.f90
138 nl_set_1_routines.o : nl_access_routines.F module_configure.o
139 $(CPP) -DNNN=1 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx1.f90
140 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx1.f90
142 nl_set_2_routines.o : nl_access_routines.F module_configure.o
143 $(CPP) -DNNN=2 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx2.f90
144 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx2.f90
146 nl_set_3_routines.o : nl_access_routines.F module_configure.o
147 $(CPP) -DNNN=3 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx3.f90
148 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx3.f90
150 nl_set_4_routines.o : nl_access_routines.F module_configure.o
151 $(CPP) -DNNN=4 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx4.f90
152 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx4.f90
154 nl_set_5_routines.o : nl_access_routines.F module_configure.o
155 $(CPP) -DNNN=5 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx5.f90
156 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx5.f90
158 nl_set_6_routines.o : nl_access_routines.F module_configure.o
159 $(CPP) -DNNN=6 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx6.f90
160 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx6.f90
162 nl_set_7_routines.o : nl_access_routines.F module_configure.o
163 $(CPP) -DNNN=7 -I../inc -DNL_set_ROUTINES nl_access_routines.F > xx7.f90
164 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) xx7.f90
166 nl_get_0_routines.o : nl_access_routines.F module_configure.o
167 $(CPP) -DNNN=0 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy0.f90
168 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy0.f90
170 nl_get_1_routines.o : nl_access_routines.F module_configure.o
171 $(CPP) -DNNN=1 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy1.f90
172 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy1.f90
174 nl_get_2_routines.o : nl_access_routines.F module_configure.o
175 $(CPP) -DNNN=2 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy2.f90
176 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy2.f90
178 nl_get_3_routines.o : nl_access_routines.F module_configure.o
179 $(CPP) -DNNN=3 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy3.f90
180 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy3.f90
182 nl_get_4_routines.o : nl_access_routines.F module_configure.o
183 $(CPP) -DNNN=4 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy4.f90
184 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy4.f90
186 nl_get_5_routines.o : nl_access_routines.F module_configure.o
187 $(CPP) -DNNN=5 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy5.f90
188 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy5.f90
190 nl_get_6_routines.o : nl_access_routines.F module_configure.o
191 $(CPP) -DNNN=6 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy6.f90
192 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy6.f90
194 nl_get_7_routines.o : nl_access_routines.F module_configure.o
195 $(CPP) -DNNN=7 -I../inc -DNL_get_ROUTINES nl_access_routines.F > yy7.f90
196 $(FC) -o $@ -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS_NO_G) $(MODULE_DIRS) $(FCSUFFIX) yy7.f90
198 wrf_num_bytes_between.o :
199 $(CC) -c $(CFLAGS) wrf_num_bytes_between.c
201 pack_utils.o :
202 $(CC) -c $(CFLAGS) -DIWORDSIZE=$(IWORDSIZE) pack_utils.c
204 module_internal_header_util.o :
205 $(CPP) $(CPPFLAGS) -I../inc module_internal_header_util.F > module_internal_header_util.f90
206 $(SFC) -c $(PROMOTION) $(FCSUFFIX) $(FCDEBUG) $(FCBASEOPTS) module_internal_header_util.f90
208 clean:
209 @ echo 'use the clean script'
211 module_state_description.F : ../Registry/$(REGISTRY)
212 ( cd .. ; tools/registry $(ARCHFLAGS) $(ENVCOMPDEFS) -DNEW_BDYS Registry/$(REGISTRY) ; true ) ;
214 module_io_quilt.o : module_io_quilt.F module_io_quilt_old.F
216 md_calls.inc : md_calls.m4
217 if [ "$(M4)" = NA ] ; then \
218 /bin/cp ../arch/md_calls.inc . ; \
219 else \
220 $(M4) md_calls.m4 > md_calls.inc ; \
223 # DEPENDENCIES : only dependencies after this line (don't remove the word DEPENDENCIES)
225 include ../main/depend.common
227 # DO NOT DELETE