| 2273 |
.PHONY: adAll |
.PHONY: adAll |
| 2274 |
adAll: \$(EXE_AD) ncheckLev.conf |
adAll: \$(EXE_AD) ncheckLev.conf |
| 2275 |
|
|
|
# these are all fixed format: |
|
|
CB2M_F77_TO_FF90_SRC_FILES=\$(F77_SRC_FILES:.F=_cb2m.FF90) |
|
|
CB2M_F90_SRC_FILES=\$(addsuffix _mod.FF90, \$(CB2M_F90_SRC_NAMES)) |
|
| 2276 |
CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES)) |
CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES)) |
| 2277 |
|
|
| 2278 |
.PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.ff90) |
.PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.ff90) |
| 2279 |
|
|
| 2280 |
.PHONY: adDepend |
.PHONY: adDepend |
| 2281 |
#this file is included at the bottom |
adDepend: \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(addsuffix _mod.FF90, \$(CB2M_F90_SRC_NAMES)) \$(F77_SRC_FILES:.F=_cb2m.FF90) |
|
adDepend: \$(ALL_LINKED_FILES) \$(CB2M_F90_SRC_FILES) \$(CB2M_F77_TO_FF90_SRC_FILES) |
|
| 2282 |
\$(MAKEDEPEND) -o .$FS \$(DEFINES) \$(INCLUDES) \$(F77_SRC_FILES) |
\$(MAKEDEPEND) -o .$FS \$(DEFINES) \$(INCLUDES) \$(F77_SRC_FILES) |
| 2283 |
\$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE) |
\$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE) |
| 2284 |
-rm -f makedepend.out |
-rm -f makedepend.out |
| 2285 |
|
|
|
|
|
| 2286 |
OPENAD_SUPPORT_F90_SRC_FILES = \ |
OPENAD_SUPPORT_F90_SRC_FILES = \ |
| 2287 |
w2f__types.f90 \ |
w2f__types.f90 \ |
| 2288 |
active_module.f90 \ |
active_module.f90 \ |
| 2305 |
f95 -w=unused -maxcontin=132 -c f95_test_mods.f90 > \$@ 2>&1 |
f95 -w=unused -maxcontin=132 -c f95_test_mods.f90 > \$@ 2>&1 |
| 2306 |
f95 -w=unused -maxcontin=132 -c -fixed f95_test.f90 >> \$@ 2>&1 |
f95 -w=unused -maxcontin=132 -c -fixed f95_test.f90 >> \$@ 2>&1 |
| 2307 |
|
|
| 2308 |
AD_OBJ_FILES=\$(OPENAD_SUPPORT_F90_SRC_FILES:.f90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) all_mods.xb.x2w.w2f.pp.o ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.o \$(NON_AD_F77_SRC_FILES:.F=_cb2m.o) \$(C_SRC_FILES:.c=.o) \$(F90_SRC_FILES:.F90=.o) |
AD_OBJ_FILES=\$(OPENAD_SUPPORT_F90_SRC_FILES:.f90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) all_mods.xb.x2w.w2f.pp.o ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.o \$(NON_AD_F77_SRC_FILES:.F=_cb2m.o) \$(C_SRC_FILES:.c=.o) \$(F90_SRC_FILES:.F90=.o) |
| 2309 |
|
|
| 2310 |
\$(EXE_AD): \$(AD_OBJ_FILES) |
\$(EXE_AD): \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(AD_OBJ_FILES) |
| 2311 |
@echo Creating \$@ ... |
@echo Creating \$@ ... |
| 2312 |
\$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$^ \$(LIBS) |
\$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES) \$(LIBS) |
| 2313 |
|
|
| 2314 |
# makefile debug rule |
# makefile debug rule |
| 2315 |
openad: ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f |
openad: ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f |
| 2316 |
.PHONY: openad |
.PHONY: openad |
| 2317 |
|
|
| 2318 |
CB2MFILES= cb2m1.csh cb2m1.awk cb2m2.bash |
# create the module files |
| 2319 |
# create the module files and change the header files |
%_mod.FF90 : %.h ${MODS}/cb2mGetModules.csh ${MODS}/cb2mGetModules.awk |
| 2320 |
\$(CB2M_F90_SRC_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) : \$(ALL_LINKED_FILES) \$(CB2MFILES) |
${MODS}/cb2mGetModules.csh $< ${MODS}/cb2mGetModules.awk |
| 2321 |
./cb2m1.csh \$(CB2M_F90_SRC_NAMES) |
|
| 2322 |
|
# create the header files |
| 2323 |
# change everybody else to use the module files: |
%_mod.h : %.h ${MODS}/cb2mGetHeaders.csh ${MODS}/cb2mGetHeaders.awk |
| 2324 |
\$(CB2M_F77_TO_FF90_SRC_FILES): \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(CB2M_F90_SRC_FILES) |
${MODS}/cb2mGetHeaders.csh $< ${MODS}/cb2mGetHeaders.awk |
| 2325 |
./cb2m2.bash |
|
| 2326 |
|
# change everybody else to use the new module files: |
| 2327 |
|
%_cb2m.FF90 : %.F ${MODS}/cb2mUseModules.bash |
| 2328 |
|
${MODS}/cb2mUseModules.bash $< |
| 2329 |
|
|
| 2330 |
# makefile debug rule |
# makefile debug rule |
| 2331 |
small_f: \$(CB2M_F77_PP_SRC_FILES) \$(CB2M_F90_PP_SRC_FILES) |
small_f: \$(CB2M_F90_PP_SRC_FILES) |
| 2332 |
.PHONY: small_f |
.PHONY: small_f |
| 2333 |
|
|
| 2334 |
ad_output.txt: \$(EXE_AD) |
ad_output.txt: \$(EXE_AD) |
| 2342 |
ad_input_code.$FS: ${MODS}/maxMinDefs.f \$(CB2M_AD_FILES) |
ad_input_code.$FS: ${MODS}/maxMinDefs.f \$(CB2M_AD_FILES) |
| 2343 |
cat \$^ > \$@ |
cat \$^ > \$@ |
| 2344 |
|
|
|
\$(CB2MFILES): |
|
|
\$(LN) \$(addprefix ${MODS}/, \$(CB2MFILES)) . |
|
|
|
|
| 2345 |
# strip all comments and blanks to reduce |
# strip all comments and blanks to reduce |
| 2346 |
# the file size in order to reduce perl's memory requirements |
# the file size in order to reduce perl's memory requirements |
| 2347 |
ad_input_code_sf.f : ad_input_code.f |
ad_input_code_sf.f : ad_input_code.f |
| 2352 |
# expose mfef90 specific substring handling |
# expose mfef90 specific substring handling |
| 2353 |
# add the w2f__types module |
# add the w2f__types module |
| 2354 |
ad_input_code_sf.w2f.f: ad_input_code_sf.f mfef90 whirl2f whirl2f_be w2f__types.f90 |
ad_input_code_sf.w2f.f: ad_input_code_sf.f mfef90 whirl2f whirl2f_be w2f__types.f90 |
| 2355 |
./mfef90 -F -N132 \$< |
./mfef90 -z -F -N132 \$< |
| 2356 |
./whirl2f \$< |
./whirl2f \$< |
| 2357 |
cat w2f__types.f90 \$@ > \$@.1 |
cat w2f__types.f90 \$@ > \$@.1 |
| 2358 |
mv \$@.1 \$@ |
mv \$@.1 \$@ |
| 2368 |
# Otherwise mfef90 patches in spaces to fill up to 72 (or 132) |
# Otherwise mfef90 patches in spaces to fill up to 72 (or 132) |
| 2369 |
# characters respectively. |
# characters respectively. |
| 2370 |
ad_input_code_sf.w2f.canon.B: ad_input_code_sf.w2f.canon.f mfef90 |
ad_input_code_sf.w2f.canon.B: ad_input_code_sf.w2f.canon.f mfef90 |
| 2371 |
./mfef90 -F \$< |
./mfef90 -z -F \$< |
| 2372 |
|
|
| 2373 |
# WHIRL -> XAIF |
# WHIRL -> XAIF |
| 2374 |
ad_input_code_sf.w2f.canon.xaif : ad_input_code_sf.w2f.canon.B whirl2xaif |
ad_input_code_sf.w2f.canon.xaif : ad_input_code_sf.w2f.canon.B whirl2xaif |