Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_IRENE-AMD.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_IRENE-AMD.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_IRENE-AMD.path	(revision 8387)
@@ -11,2 +11,6 @@
 XIOS_LIB="-lxios"
 
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
+OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_IRENE.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_IRENE.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_IRENE.path	(revision 8387)
@@ -11,2 +11,6 @@
 XIOS_LIB="-lxios"
 
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
+OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY.path	(revision 8387)
@@ -11,5 +11,6 @@
 XIOS_LIB="-lxios"
 
-OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib"
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
 OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
-OASIS_LIB=""
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY_OPENMPI.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY_OPENMPI.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-X64_JEANZAY_OPENMPI.path	(revision 8387)
@@ -11,5 +11,6 @@
 XIOS_LIB="-lxios"
 
-OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib"
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
 OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
-OASIS_LIB=""
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_LSCE.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_LSCE.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_LSCE.path	(revision 8387)
@@ -11,2 +11,6 @@
 XIOS_LIB="-lxios"
 
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
+OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_LSCE_2023.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_LSCE_2023.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_LSCE_2023.path	(revision 8387)
@@ -11,2 +11,6 @@
 XIOS_LIB="-lxios"
 
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
+OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_MESOIPSL.path
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_MESOIPSL.path	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/arch/arch-ifort_MESOIPSL.path	(revision 8387)
@@ -11,5 +11,6 @@
 XIOS_LIB="-lxios"
 
-OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib"
+OASIS_INCDIR="-I${ORCHDIR}/../oasis3-mct/BLD/build/lib/psmile.MPI1 -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/scrip -I${ORCHDIR}/../oasis3-mct/BLD/build/lib/mct"
 OASIS_LIBDIR="-L${ORCHDIR}/../oasis3-mct/BLD/lib"
-OASIS_LIB=""
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
Index: branches/ORCHIDEE_2_2/ORCHIDEE/makeorchidee_fcm
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/makeorchidee_fcm	(revision 8380)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/makeorchidee_fcm	(revision 8387)
@@ -58,4 +58,8 @@
 arch_path="arch"
 
+# Option linkwithoasis is used when XIOS is compiled with OASIS. This is the case in IPSLCM7 configuration 
+# where the OASIS libraries needs to be included in the creation of the executables. 
+linkwithoasis=FALSE
+
 # Path to store files produced during compilation
 # Note: config_path was previously named .config
@@ -105,4 +109,7 @@
         is_other_opt=TRUE
         is_driver_opt=TRUE ; shift ;;
+    
+    "-linkwithoasis")
+	linkwithoasis=TRUE ; shift ;;
 
     "-arch")
@@ -492,10 +499,16 @@
 echo "XXXXXX $is_oasisdriver_opt"
 
+
 if [[ "$is_oasisdriver_opt" == "TRUE" ]] ; then
     CPP_KEY="OASIS ${CPP_KEY}"
     TARGET="${TARGET} driver2oasis.exe orchideeoasis.exe"
-    INCDIR="${INCDIR} ${OASIS_INCDIR}/psmile.MPI1 ${OASIS_INCDIR}/scrip  ${OASIS_INCDIR}/mct"
-    LIBDIR="${LIBDIR} ${OASIS_LIBDIR} -lpsmile.MPI1 -lmct -lmpeu -lscrip"
+    INCDIR="${INCDIR} ${OASIS_INCDIR}"
+    LIBDIR="${LIBDIR} ${OASIS_LIBDIR} ${OASIS_LIB}"
     echo "OASIS : ${INCDIR}"
+fi
+
+
+if [[ "$linkwithoasis" == "TRUE" ]] ; then 
+    LIBDIR="${LIBDIR} ${OASIS_LIBDIR} ${OASIS_LIB}"
 fi
 
