Index: LMDZ5/branches/testing/makelmdz
===================================================================
--- LMDZ5/branches/testing/makelmdz	(revision 2056)
+++ LMDZ5/branches/testing/makelmdz	(revision 2160)
@@ -27,4 +27,5 @@
 sisvat=false
 rrtm=false
+full=""
 
 # guess a default 'arch'
@@ -107,5 +108,5 @@
 [-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
 [-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
-[-io IO]                   : Input/Output library (default: ioipsl)
+[-io ioipsl/mix/xios]                   : Input/Output library (default: ioipsl)
 [-include INCLUDES]        : extra include path to add
 [-cpp CPP_KEY]             : additional preprocessing definitions
@@ -113,4 +114,5 @@
 [-mem]                     : reduced memory dynamics (if in parallel mode)
 [-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
+[-full]                    : Full (re)compilation (from scratch)
 [-link LINKS]              : additional links with other libraries
 [-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
@@ -174,4 +176,7 @@
 	  filtre=$2 ; shift ; shift ;;
 
+      "-full")
+      full="full" ; shift ;;
+
       "-link")
 	  LIB="$LIB $2" ; shift ; shift ;;
@@ -192,5 +197,5 @@
 
 ###############################################################
-# lecture des chemins propres à l'architecture de la machine #
+# lecture des chemins propres \`a l'architecture de la machine #
 ###############################################################
 rm -f .void_file
@@ -384,8 +389,14 @@
    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
-elif [[ $io == xios ]]
+elif [[ $io == mix ]]
 then
    # For now, xios implies also using ioipsl
    CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
+   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
+   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
+elif [[ $io == xios ]]
+then
+   # For now, xios implies also using ioipsl
+   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
@@ -428,5 +439,4 @@
 echo dim $dim
 echo dimc $dimc
-
 
 ########################################################################
@@ -458,10 +468,8 @@
 fi
 
-
 cd $LIBFGCM/grid/dimension
 ./makdim $dim
 cat $LIBFGCM/grid/dimensions.h
 cd $LMDGCM
-
 
 ########################################################################
@@ -486,7 +494,24 @@
 fi
 
-
 cd $LMDGCM
 
+########################################################################
+# library directory name:
+########################################################################
+
+nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'`
+echo "Path to library: "$nomlib
+
+########################################################################
+#  Cleanup for a full recompilation, if requested
+########################################################################
+
+if [[ $full == "full" ]]
+then
+# remove makefile and librairies
+  echo "-full option: recompiling from scratch"
+  \rm -f makefile
+  \rm -rf "${LIBOGCM}/${nomlib}"
+fi
 
 ########################################################################
@@ -532,8 +557,4 @@
   source_code=${code}.F90
 fi
-
-# library directory name:
-nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'`
-echo $nomlib
 
 if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
