1041 |
fi |
fi |
1042 |
done |
done |
1043 |
|
|
1044 |
echo " Searching for CPP_OPTIONS.h in order to warn about the presence" |
echo " Searching for CPP_OPTIONS.h in order to warn about the presence" |
1045 |
echo " of \"#define ALLOW_PKGNAME\"-type statements:" |
echo " of \"#define ALLOW_PKGNAME\"-type statements:" |
1046 |
CPP_OPTIONS= |
CPP_OPTIONS= |
1047 |
spaths=". $INCLUDEDIRS" |
spaths=". $INCLUDEDIRS" |
1048 |
for i in $spaths ; do |
for i in $spaths ; do |
1292 |
@\$(EXECUTABLE) > \$@ |
@\$(EXECUTABLE) > \$@ |
1293 |
|
|
1294 |
clean: |
clean: |
1295 |
|
-cat AD_CONFIG.template > AD_CONFIG.h |
1296 |
-rm -rf *.o *.f *.p *.f90 *.mod ${RMFILES} work.{pc,pcl} |
-rm -rf *.o *.f *.p *.f90 *.mod ${RMFILES} work.{pc,pcl} |
1297 |
Clean: |
Clean: |
1298 |
@make clean |
@make clean |
1299 |
@make cleanlinks |
@make cleanlinks |
1300 |
-rm -f Makefile.bak genmake_state genmake_optfile make.log |
-rm -f Makefile.bak genmake_state genmake_*optfile make.log |
1301 |
CLEAN: |
CLEAN: |
1302 |
@make Clean |
@make Clean |
1303 |
-find \$(EXEDIR) -name "*.meta" -exec rm {} \; |
-find \$(EXEDIR) -name "*.meta" -exec rm {} \; |
1364 |
|
|
1365 |
cat >>$MAKEFILE <<EOF |
cat >>$MAKEFILE <<EOF |
1366 |
|
|
1367 |
ad_input_code.f: \$(F77FILES) |
AD_CONFIG.h: |
1368 |
@make \$(AD_FLOW_FILES) |
cat AD_CONFIG.template > AD_CONFIG.h |
|
cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f |
|
1369 |
|
|
1370 |
# ... AD ... |
# ... AD ... |
1371 |
ad: ad_taf |
ad: ad_taf |
1372 |
ad_taf_f: ad_taf_output.f |
ad_taf_f: ad_taf_output.f |
1373 |
ad_tamc_f: ad_tamc_output.f |
ad_tamc_f: ad_tamc_output.f |
1374 |
|
|
1375 |
|
ad_input_code.f: \$(SRCFILES) |
1376 |
|
cat ad_config.template > AD_CONFIG.h |
1377 |
|
@make \$(F77FILES) |
1378 |
|
@make \$(AD_FLOW_FILES) |
1379 |
|
cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f |
1380 |
|
|
1381 |
ad_taf_output.f: ad_input_code.f |
ad_taf_output.f: ad_input_code.f |
1382 |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f |
1383 |
cat ad_input_code_ad.f | sed -f adjoint_sed > ad_taf_output.f |
cat ad_input_code_ad.f | sed -f adjoint_sed > ad_taf_output.f |
1398 |
ftl_taf_f: ftl_taf_output.f |
ftl_taf_f: ftl_taf_output.f |
1399 |
ftl_tamc_f: ftl_tamc_output.f |
ftl_tamc_f: ftl_tamc_output.f |
1400 |
|
|
1401 |
ftl_taf_output.f: ad_input_code.f |
ftl_input_code.f: \$(SRCFILES) |
1402 |
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f |
cat ftl_config.template > AD_CONFIG.h |
1403 |
cat ad_input_code_ftl.f | sed -f adjoint_sed > ftl_taf_output.f |
@make \$(AD_FLOW_FILES) |
1404 |
|
cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.f |
1405 |
|
|
1406 |
|
ftl_taf_output.f: ftl_input_code.f |
1407 |
|
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.f |
1408 |
|
cat ftl_input_code_ftl.f | sed -f adjoint_sed > ftl_taf_output.f |
1409 |
|
|
1410 |
ftl_taf: ftl_taf_output.o \$(OBJFILES) |
ftl_taf: ftl_taf_output.o \$(OBJFILES) |
1411 |
\$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS) |
\$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS) |
1412 |
|
|
1413 |
ftl_tamc_output.f: ad_input_code.f |
ftl_tamc_output.f: ftl_input_code.f |
1414 |
\$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.f |
\$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.f |
1415 |
cat ad_input_code_ftl.f | sed -f adjoint_sed > ftl_tamc_output.f |
cat ftl_input_code_ftl.f | sed -f adjoint_sed > ftl_tamc_output.f |
1416 |
|
|
1417 |
ftl_tamc: ftl_tamc_output.o \$(OBJFILES) |
ftl_tamc: ftl_tamc_output.o \$(OBJFILES) |
1418 |
\$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_tamc_output.o \$(LIBS) |
\$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_tamc_output.o \$(LIBS) |
1422 |
svd: svd_taf |
svd: svd_taf |
1423 |
svd_taf_f: svd_taf_output.f |
svd_taf_f: svd_taf_output.f |
1424 |
|
|
1425 |
svd_taf_output.f: ad_input_code.f |
svd_input_code.f: \$(SRCFILES) |
1426 |
\$(TAF) \$(SVD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f |
cat svd_config.template > AD_CONFIG.h |
1427 |
cat ad_input_code_ad.f | sed -f adjoint_sed > svd_taf_output.f |
@make \$(AD_FLOW_FILES) |
1428 |
|
cat \$(AD_FLOW_FILES) \$(AD_FILES) > svd_input_code.f |
1429 |
|
|
1430 |
|
svd_taf_output.f: svd_input_code.f |
1431 |
|
\$(TAF) \$(SVD_TAF_FLAGS) \$(TAF_EXTRA) svd_input_code.f |
1432 |
|
cat svd_input_code_ad.f | sed -f adjoint_sed > svd_taf_output.f |
1433 |
|
|
1434 |
svd_taf: svd_taf_output.o \$(OBJFILES) |
svd_taf: svd_taf_output.o \$(OBJFILES) |
1435 |
\$(LINK) -o ${EXE_SVD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) svd_taf_output.o \$(LIBS) |
\$(LINK) -o ${EXE_SVD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) svd_taf_output.o \$(LIBS) |
1473 |
|
|
1474 |
printf "\n=== Done ===\n" |
printf "\n=== Done ===\n" |
1475 |
|
|
1476 |
|
# Write the "template" files for the adjoint builds |
1477 |
|
cat >>AD_CONFIG.template <<EOF |
1478 |
|
C WARNING: This file is automatically generated by genmake2 and |
1479 |
|
C used by the Makefile rules. Please DO NOT EDIT this file |
1480 |
|
C unless you are CERTAIN that you know what you're doing. |
1481 |
|
|
1482 |
|
#undef ALLOW_ADJOINT_RUN |
1483 |
|
#undef ALLOW_TANGENTLINEAR_RUN |
1484 |
|
#undef ALLOW_ECCO_OPTIMIZATION |
1485 |
|
EOF |
1486 |
|
cat >>ad_config.template <<EOF |
1487 |
|
C WARNING: This file is automatically generated by genmake2 and |
1488 |
|
C used by the Makefile rules. Please DO NOT EDIT this file |
1489 |
|
C unless you are CERTAIN that you know what you're doing. |
1490 |
|
|
1491 |
|
#undef ALLOW_ADJOINT_RUN |
1492 |
|
#undef ALLOW_TANGENTLINEAR_RUN |
1493 |
|
#undef ALLOW_ECCO_OPTIMIZATION |
1494 |
|
EOF |
1495 |
|
cat >>ftl_config.template <<EOF |
1496 |
|
C WARNING: This file is automatically generated by genmake2 and |
1497 |
|
C used by the Makefile rules. Please DO NOT EDIT this file |
1498 |
|
C unless you are CERTAIN that you know what you're doing. |
1499 |
|
|
1500 |
|
#undef ALLOW_ADJOINT_RUN |
1501 |
|
#undef ALLOW_TANGENTLINEAR_RUN |
1502 |
|
#undef ALLOW_ECCO_OPTIMIZATION |
1503 |
|
EOF |
1504 |
|
cat >>svd_config.template <<EOF |
1505 |
|
C WARNING: This file is automatically generated by genmake2 and |
1506 |
|
C used by the Makefile rules. Please DO NOT EDIT this file |
1507 |
|
C unless you are CERTAIN that you know what you're doing. |
1508 |
|
|
1509 |
|
#undef ALLOW_ADJOINT_RUN |
1510 |
|
#undef ALLOW_TANGENTLINEAR_RUN |
1511 |
|
#undef ALLOW_ECCO_OPTIMIZATION |
1512 |
|
EOF |
1513 |
|
cp AD_CONFIG.template AD_CONFIG.h |
1514 |
|
|
1515 |
|
|
1516 |
# Write the "state" for future records |
# Write the "state" for future records |
1517 |
if test "x$DUMPSTATE" != xf ; then |
if test "x$DUMPSTATE" != xf ; then |