Ignore:
Timestamp:
Feb 9, 2023, 5:27:51 PM (23 months ago)
Author:
Laurent Fairhead
Message:

Travail de fermeture du ticket #115: harmonisation des LIBDIR INCDIR dans les arch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/makelmdz_fcm

    r4283 r4426  
    370370then
    371371   CPP_KEY="$CPP_KEY INCA"
    372    INCLUDE="$INCLUDE -I${INCA_INCDIR}"
    373    LIB="$LIB -L${INCA_LIBDIR} -lchimie"
     372   INCLUDE="$INCLUDE ${INCA_INCDIR}"
     373   LIB="$LIB ${INCA_LIBDIR} ${INCA_LIB}"
    374374fi
    375375
     
    405405    else
    406406        CPP_KEY="$CPP_KEY CPP_COUPLE CPP_OMCT"
    407         INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
    408         LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu"
     407        INCLUDE="$INCLUDE ${OASIS_INCDIR}"
     408        LIB="$LIB ${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu"
    409409    fi
    410410fi
     
    436436if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" -o "$veget" = "orchidee2.1" -o "$veget" = "orchideetrunk" ]
    437437then
     438        echo "doing orchidee"
    438439#NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
    439440#    For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    440441#    option orchidee1.9 : Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
    441    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
     442   INCLUDE="${INCLUDE} ${ORCH_INCDIR}"
    442443   CPP_KEY="$CPP_KEY CPP_VEGET"
    443444# temporary, for Orchidee versions 1.9.* (before openmp activation)
     
    446447   fi
    447448   if [[ "$veget" == "orchidee2.0" ]] ; then
    448       orch_libs="sechiba parameters stomate parallel orglob orchidee"
     449      orch_libs="-lsechiba -lparameters -lstomate -lparallel -lorglob -lorchidee"
    449450      CPP_KEY="$CPP_KEY ORCHIDEE_NOUNSTRUCT"
    450451   elif [[ "$veget" == "orchidee2.1" ]] ; then
    451452      CPP_KEY="$CPP_KEY ORCHIDEE_NOLIC"
    452       orch_libs="sechiba parameters stomate parallel orglob orchidee"
     453      orch_libs="-lsechiba -lparameters -lstomate -lparallel -lorglob -lorchidee"
    453454   elif [[ "$veget" == "orchideetrunk" ]] ; then
    454       orch_libs="orchidee"
     455      orch_libs="-lorchidee"
    455456   else
    456       orch_libs="sechiba parameters stomate parallel orglob"
     457      orch_libs="-lsechiba -lparameters -lstomate -lparallel -lorglob"
    457458   fi
    458    LIB="${LIB} -L${ORCH_LIBDIR}"
    459    for lib in ${orch_libs} ; do
    460       if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
    461          LIB="${LIB} -l${LIBPREFIX}$lib "
    462       fi
    463    done
     459   LIB="${LIB} ${ORCH_LIBDIR} ${orch_libs}"
     460#   for lib in ${orch_libs} ; do
     461#      if [ -f ${ORCH_LIBDIR#-L}/lib${LIBPREFIX}$lib.a ] ; then
     462#         LIB="${LIB} -l${LIBPREFIX}$lib "
     463#      fi
     464#   done
     465   echo "orchidee lib"
     466   echo ${LIB}
    464467elif [[ "$veget" != "false" ]] ; then
    465468   echo "Option -v $veget does not exist"
     
    501504then
    502505   CPP_KEY="$CPP_KEY CPP_IOIPSL"
    503    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
    504    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
     506   INCLUDE="$INCLUDE ${IOIPSL_INCDIR}"
     507   LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB}"
    505508elif [[ $io == mix ]]
    506509then
    507510   # For now, xios implies also using ioipsl
    508511   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
    509    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    510    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios -l${LIBPREFIX}stdc++"
     512   INCLUDE="$INCLUDE ${IOIPSL_INCDIR} ${XIOS_INCDIR}"
     513   LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB} ${XIOS_LIBDIR} ${XIOS_LIB}"
    511514elif [[ $io == xios ]]
    512515then
    513516   # For now, xios implies also using ioipsl
    514517   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
    515    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    516    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios -l${LIBPREFIX}stdc++"
     518   INCLUDE="$INCLUDE ${IOIPSL_INCDIR} ${XIOS_INCDIR}"
     519   LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB} ${XIOS_LIBDIR} ${XIOS_LIB}"
    517520fi
    518521
     
    545548
    546549INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
    547 LIB="$LIB ${NETCDF_LIBDIR}"
     550LIB="$LIB ${NETCDF_LIBDIR} ${NETCDF_LIB}"
    548551
    549552########################################################################
Note: See TracChangeset for help on using the changeset viewer.