Index: /trunk/LMDZ.COMMON/bld.cfg
===================================================================
--- /trunk/LMDZ.COMMON/bld.cfg	(revision 3470)
+++ /trunk/LMDZ.COMMON/bld.cfg	(revision 3471)
@@ -16,5 +16,5 @@
 inc config.fcm
 
-%CONFIG_NAME       %{ARCH}%SUFF_NAME
+%CONFIG_NAME       %{ARCH}%{SUFF_NAME}%{SUFF_DEBUG}
 %BASE_CONFIG_PATH  %LIBO/%CONFIG_NAME
 %CONFIG_PATH       %BASE_CONFIG_PATH/.config
@@ -53,5 +53,5 @@
 bld::outfile_ext::exe    %SUFF_NAME
 bld::target              liblmdz.a %EXEC%SUFF_NAME
-bld::exe_dep             
+bld::exe_dep
 
 
@@ -64,5 +64,5 @@
 bld::tool::fpp       %FPP
 bld::tool::cpp       %CPP
-bld::tool::fc        %COMPILER 
+bld::tool::fc        %COMPILER
 bld::tool::cc        %C_COMPILER
 bld::tool::ld        %LINK
@@ -71,5 +71,5 @@
 bld::tool::fflags    %FFLAGS %INCDIR
 bld::tool::cflags    %C_OPTIM %INCDIR
-bld::tool::ldflags   %LD_FLAGS %LIB  
+bld::tool::ldflags   %LD_FLAGS %LIB
 
 bld::tool::cppflags  %CPP_FLAGS %INCDIR
Index: /trunk/LMDZ.COMMON/makelmdz_fcm
===================================================================
--- /trunk/LMDZ.COMMON/makelmdz_fcm	(revision 3470)
+++ /trunk/LMDZ.COMMON/makelmdz_fcm	(revision 3471)
@@ -65,5 +65,5 @@
 ########################################################################
 
-CPP_KEY="" 
+CPP_KEY=""
 INCLUDE_DIR=""
 LIB=""
@@ -117,5 +117,5 @@
 [-ext_src path]            : path to an additional set of routines to compile with the model
 [-arch_path path]          : path to architecture files (default: $arch_default_path)
- -arch arch                : target architecture 
+ -arch arch                : target architecture
  exec                      : executable to build
 fin
@@ -124,5 +124,5 @@
       "-d")
 	  dim=$2 ; shift ; shift ;;
-      
+
       "-p")
 	  physique="$2" ;  shift ; shift ;;
@@ -172,5 +172,5 @@
       "-parallel")
 	  parallel="$2" ; shift ; shift ;;
-      
+
       "-include")
 	  INCLUDE_DIR="$INCLUDE_DIR -I$2" ; shift ; shift ;;
@@ -223,5 +223,5 @@
 
 ###############################################################
-# path to fcm 
+# path to fcm
 ###############################################################
 # handle case when provided path to fcm was given as a relative
@@ -258,5 +258,5 @@
     ln -s $arch_default_path/arch-${arch}.path arch.path
   fi
-        
+
   if test -f $arch_path/arch-${arch}.env
   then
@@ -397,5 +397,5 @@
    echo "Option -v $veget does not exist"
    echo "Use ./makelmdz_fcm -h for more information"
-   exit 
+   exit
 fi
 
@@ -517,5 +517,5 @@
 
 dim_full=$dim
-dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
+dim=`echo $dim | sed -e 's/[^0-9]/ /g'`
 set $dim
 dimc=$#
@@ -653,5 +653,5 @@
 #  \rm -f $libf/phy$physique/raddim.h
 #  cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h
-#  echo $libf/phy$physique/raddim.$dimh.h 
+#  echo $libf/phy$physique/raddim.$dimh.h
 #  cat $libf/phy$physique/raddim.h
 # else
@@ -697,5 +697,5 @@
   if (( $dimension == 1 ))
   then
-    # dynamics-related routines in"dyn1d" subdirectory of phy${physique} 
+    # dynamics-related routines in"dyn1d" subdirectory of phy${physique}
     DYN=phy${physique}/dyn1d
   else
@@ -710,5 +710,5 @@
   if (( $dimension == 1 ))
   then
-    # dynamics-related routines in"dyn1d" subdirectory of phy${physique} 
+    # dynamics-related routines in"dyn1d" subdirectory of phy${physique}
     DYN=phy${physique}/dyn1d
   else
@@ -730,4 +730,9 @@
 then
   SUFF_NAME=${SUFF_NAME}_inca
+fi
+SUFF_DEBUG=
+if [[ "$compil_mod" == "debug" ]]
+then
+  SUFF_DEBUG=_debug
 fi
 
@@ -753,5 +758,5 @@
 
 echo "%ARCH          $arch"          >> $config_fcm
-echo "%INCDIR        $INCLUDE_DIR"       >> $config_fcm 
+echo "%INCDIR        $INCLUDE_DIR"       >> $config_fcm
 echo "%LIB           $LIB"           >> $config_fcm
 echo "%ROOT_PATH     $PWD"           >> $config_fcm
@@ -778,4 +783,5 @@
 echo "%EXEC          $code"          >> $config_fcm
 echo "%SUFF_NAME     $SUFF_NAME"     >> $config_fcm
+echo "%SUFF_DEBUG    $SUFF_DEBUG"    >> $config_fcm
 echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> $config_fcm
 echo "%PARA_FFLAGS   $PARA_FFLAGS"   >> $config_fcm
