Index: LMDZ4/branches/LMDZ4_V3_patches/makegcm_fcm
===================================================================
--- LMDZ4/branches/LMDZ4_V3_patches/makegcm_fcm	(revision 844)
+++ LMDZ4/branches/LMDZ4_V3_patches/makegcm_fcm	(revision 845)
@@ -24,9 +24,8 @@
 set veget=false
 set chimie=false
-set psmile=false
 set parallel=false
 set io=ioipsl
 
-set LMDGCM=$PWD
+set LMDGCM=`/bin/pwd`
 set LIBOGCM=$LMDGCM/libo
 set LIBFGCM=$LMDGCM/libf
@@ -60,5 +59,5 @@
 [-p PHYS]              : compilation avec la physique libf/phyPHYS, (def: lmd)
 [-debug]               : compile avec options debug.
-[-c false/true]        : couplé océan : mpi1/mpi2/false (def: false)
+[-c false/MPI1/MPI2]   : couplé océan : MPI1/MPI2/false (def: false)
 [-v false/true]        : avec ou sans végétation (def: false)
 [-chimie SCHEMA/false] : nom du schéma chimique ou false (def)
@@ -155,5 +154,25 @@
 
 
-if ( "$chimie" == 'true' ) then
+if ( "$chimie" == 'AER' ) then
+    set CPP_KEY="$CPP_KEY INCA INCA_AER"
+    set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
+    set LIB="$LIB -L${INCA_LIBDIR} -lchimie" 
+else if  ( "$chimie" == 'CH4' ) then
+    set CPP_KEY="$CPP_KEY INCA INCA_CH4"
+    set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
+    set LIB="$LIB -L${INCA_LIBDIR} -lchimie" 
+else if  ( "$chimie" == 'CH4_AER' ) then
+    set CPP_KEY="$CPP_KEY INCA INCA_AER INCA_CH4"
+    set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
+    set LIB="$LIB -L${INCA_LIBDIR} -lchimie" 
+else if  ( "$chimie" == 'NMHC' ) then
+    set CPP_KEY="$CPP_KEY INCA INCA_NMHC"
+    set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
+    set LIB="$LIB -L${INCA_LIBDIR} -lchimie" 
+else if  ( "$chimie" == 'NMHC_AER' ) then
+    set CPP_KEY="$CPP_KEY INCA INCA_AER INCA_NMHC"
+    set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
+    set LIB="$LIB -L${INCA_LIBDIR} -lchimie" 
+else if ( "$chimie" == 'GES' ) then
     set CPP_KEY="$CPP_KEY INCA"
     set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
@@ -163,7 +182,6 @@
 if ( "$couple" != 'false' ) then
    set CPP_KEY="$CPP_KEY CPP_COUPLE"
-   set CPP_KEY="$CPP_KEY CPP_PSMILE"
-   set INCLUDE="$INCLUDE -I${OASIS_INCDIR}.$couple"
-   set LIB="$LIB -L${OASIS_LIBDIR} -loasis.$couple"
+   set INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
+   set LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
 endif
 
@@ -175,5 +193,5 @@
    set CPP_KEY="$CPP_KEY CPP_VEGET"
    set INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
-   set LIB="${LIB} -L${ORCH_LIBDIR} -lsechiba -lparameters -lstomate -lparallel"
+   set LIB="${LIB} -L${ORCH_LIBDIR} -lsechiba -lparameters -lstomate -lparallel -lorglob"
 endif
 
@@ -290,5 +308,5 @@
 
 set SUFF_NAME=_${dim_full}
-set SUFF_NAME=${SUFF_NAME}_t${ntrac}
+set SUFF_NAME=${SUFF_NAME}_t${ntrac}_phy${physique}
 
 if ( "$parallel" == 'true' ) then
@@ -311,30 +329,4 @@
   set SUFF_NAME=${SUFF_NAME}_inca
 endif
- 
-#########################################################
-# On adapte certains include à F90 (mener a disparaitre)
-#########################################################
-#sed -e 's/^c/\!/' $libf/grid/dimensions.h >! $libf/grid/dimensions90.tmp
-#if ( ! -f $libf/grid/dimensions90.h || `diff $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h | wc -w` ) then
-#      \mv $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h
-#endif
-#awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     s/) {if (NR > 1) print p0," &"; sub ("     s","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/dyn3d/paramet.h >! $libf/dyn3d/paramet90.tmp
-#if ( ! -f $libf/dyn3d/paramet90.h || `diff $libf/dyn3d/paramet90.tmp $libf/dyn3d/paramet90.h | wc -w` ) then
-#      \mv $libf/dyn3d/paramet90.tmp $libf/dyn3d/paramet90.h
-#endif
-#awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     \./) {if (NR > 1) print p0," &"; sub ("     \.","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/dyn3d/control.h >! $libf/dyn3d/control.tmp
-#if ( ! -f $libf/dyn3d/control.inc  || `diff $libf/dyn3d/control.tmp $libf/dyn3d/control.inc | wc -w` ) then
-#      \mv $libf/dyn3d/control.tmp $libf/dyn3d/control.inc
-#endif
-#awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     S/) {if (NR > 1) print p0," &"; sub ("     S","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/phylmd/YOMCST.h >! $libf/phylmd/YOMCST.tmp
-#if ( ! -f $libf/phylmd/YOMCST.inc  || `diff $libf/phylmd/YOMCST.tmp $libf/phylmd/YOMCST.inc | wc -w` ) then
-#      \mv $libf/phylmd/YOMCST.tmp $libf/phylmd/YOMCST.inc
-#endif
-#awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     S/) {if (NR > 1) print p0," &"; sub ("     S","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/phylmd/clesphys.h >! $libf/phylmd/clesphys.tmp
-#if ( ! -f $libf/phylmd/clesphys.inc  || `diff $libf/phylmd/clesphys.tmp $libf/phylmd/clesphys.inc | wc -w` ) then
-#      \mv $libf/phylmd/clesphys.tmp $libf/phylmd/clesphys.inc
-#endif
-
-#########################################################
 
 cd $LMDGCM
