Index: LMDZ.3.3/trunk/create_make_gcm
===================================================================
--- LMDZ.3.3/trunk/create_make_gcm	(revision 20)
+++ LMDZ.3.3/trunk/create_make_gcm	(revision 168)
@@ -10,4 +10,12 @@
   CRAY=1
 fi
+XNEC=0
+if [ "$machine" = "rhodes" ] ; then
+  XNEC=1
+fi
+VPP=0
+if [ "$machine" = "nymphea0" ] ; then
+  VPP=1
+fi
 #
 echo "#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@@ -43,12 +51,23 @@
 echo '# Les differentes librairies pour l"edition des liens:'
 echo
-echo 'dyn3d      = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
-echo 'dyn2d      = $(LIBO)/libdyn2d.a'
-echo 'dyn1d      = $(LIBO)/libdyn1d.a'
-echo 'L_DYN      = -ldyn$(DIM)d'
-echo 'L_FILTRE   = -l$(FILTRE)'
-echo 'L_PHY = -lphy$(PHYS) '
-echo 'L_BIBIO    = -lbibio'
-echo 'L_ADJNT    ='
+if [ "$XNEC" = '1' ] ; then
+  echo 'dyn3d      = $(LIBO)/libsxdyn3d.a $(LIBO)/libsx$(FILTRE).a'
+  echo 'dyn2d      = $(LIBO)/libsxdyn2d.a'
+  echo 'dyn1d      = $(LIBO)/libsxdyn1d.a'
+  echo 'L_DYN      = -lsxdyn$(DIM)d'
+  echo 'L_FILTRE   = -lsx$(FILTRE)'
+  echo 'L_PHY = -lsxphy$(PHYS) '
+  echo 'L_BIBIO    = -lsxbibio'
+  echo 'L_ADJNT    ='
+else
+  echo 'dyn3d      = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
+  echo 'dyn2d      = $(LIBO)/libdyn2d.a'
+  echo 'dyn1d      = $(LIBO)/libdyn1d.a'
+  echo 'L_DYN      = -ldyn$(DIM)d'
+  echo 'L_FILTRE   = -l$(FILTRE)'
+  echo 'L_PHY = -lphy$(PHYS) '
+  echo 'L_BIBIO    = -lbibio'
+  echo 'L_ADJNT    ='
+fi
 echo
 echo "#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@@ -58,6 +77,7 @@
    echo 'COMPILE = $(F77) $(OPTIM) $(INCLUDE) -c'
    echo 'COMPILE90 = $(F90) $(OPTIM90) $(INCLUDE) -c'
-   echo 'LINK    = f90'
-   echo "AR      = ar"
+   echo 'COMPTRU90 = $(F90) $(OPTIMTRU90) $(INCLUDE) -c'
+   echo "LINK    = $LINK"
+   echo "AR      = $AR"
 echo
 echo
@@ -73,10 +93,9 @@
 echo 'main : $(DYN) bibio phys $(OPTION_DEP) '
 echo '	cd $(LIBO) ; $(RANLIB) lib*.a ; cd $(GCM) ;\'
-if [ "$CRAY" = '0' ] ; then
 echo '	cd $(LOCAL_DIR); \'
-#echo '	$(COMPILE90) $(LIBF)/$(DIRMAIN)/$(PROG).F -o $(PROG).o ; \'
-echo '	$(COMPILE) $(LIBF)/$(DIRMAIN)/$(PROG).F -o $(PROG).o ; \'
-else
-echo '	$(COMPILE90) $(LIBF)/$(DIRMAIN)/$(PROG).F ; \'
+if [ "$CRAY" = '1' -o "$VPP" = '1' ] ; then
+  echo '	$(COMPILE90) $(LIBF)/$(DIRMAIN)/$(PROG).F -o $(PROG).o ; \'
+else
+  echo '	$(COMPILE) $(LIBF)/$(DIRMAIN)/$(PROG).F -o $(PROG).o ; \'
 fi
 if [ "$CRAY" = '0' ] ; then
@@ -109,5 +128,5 @@
 do
    if [ -d $diri ] ; then
-   if [ "`ls $diri/*.F`" != "" ] ; then 
+   if [ "`ls $diri/*.F`" != "" ] || [ "`ls $diri/*.F90`" != "" ]  ; then 
       cd $diri >/dev/null 2>&1
       echo
@@ -121,4 +140,12 @@
          fi
       done
+      for i in `ls *.F90`
+      do
+         fili=`basename $i .F90`
+         test=` (  head $i | grep '      PROGRAM' ) `
+         if [ "$test" = "" ] ; then
+            listlib=$listlib" "$fili
+         fi 
+      done
 #
       echo
@@ -140,9 +167,14 @@
       for fili in $listlib
       do
-         F90=0 ; egrep -i '^ *use ' $fili.F > /dev/null 2>&1 && F90=1
-                 egrep -i '^ *module ' $fili.F > /dev/null 2>&1 && F90=1
-         str1='$(LIBO)/lib'$diri'.a('$fili'.o) : $(LIBF)/'$diri/$fili.F
+         if [ -f $fili.F90 ] ; then
+           trufile=$fili.F90
+         else
+           trufile=$fili.F
+         fi
+         F90=0 ; egrep -i '^ *use ' $trufile > /dev/null 2>&1 && F90=1
+                 egrep -i '^ *module ' $trufile > /dev/null 2>&1 && F90=1
+         str1='$(LIBO)/lib'$diri'.a('$fili'.o) : $(LIBF)/'$diri/$trufile
          [ "$fili" = "chem.subs" ] && str1=$str1' $(LIBF)/'$diri/chem.mods.F
-         for stri in ` ( sed -n "/\#include/s/\#include//p" $fili.F | sed 's/\"//g' ; egrep -i '^ *use ' $fili.F | awk ' { print $2 } ' ) `
+         for stri in ` ( sed -n "/\#include/s/\#include//p" $trufile | sed 's/\"//g' ; egrep -i '^ *use ' $trufile | awk ' { print $2 } ' ) `
          do
             stri=`echo $stri | tr [A-Z] [a-z]`
@@ -151,5 +183,5 @@
                str1='$(LIBF)/'$diri'/'$stri
             else
-               if [ -f $stri.F ] ; then
+               if [ -f $stri.F ] || [ -f $stri.F90 ] ; then
                   str1='$(LIBO)/lib'$diri'.a('$stri'.o)'
                else
@@ -166,10 +198,14 @@
          echo $str1
 	 if [ "$F90" -eq '0' ] ; then
-            echo '	cd $(LOCAL_DIR); \'
-	    echo '	$(COMPILE) $(LIBF)/'$diri'/'$fili'.F ; \'
+           echo '	cd $(LOCAL_DIR); \'
+	   echo '	$(COMPILE) $(LIBF)/'$diri'/'$trufile' ; \'
 	 else
-            echo '	cd $(LOCAL_DIR); \'
-	    echo '	$(COMPILE90) $(LIBF)/'$diri'/'$fili'.F ; \'
-            MODU=0; egrep -i ' *module ' $fili.F> /dev/null 2>&1 && MODU=1
+           echo '	cd $(LOCAL_DIR); \'
+           if [ -f $fili.F90 ] ; then
+	      echo '	$(COMPTRU90) $(LIBF)/'$diri'/'$trufile' ; \'
+           else
+	      echo '	$(COMPILE90) $(LIBF)/'$diri'/'$trufile' ; \'
+           fi
+           MODU=0; egrep -i ' *module ' $trufile> /dev/null 2>&1 && MODU=1
             if [ "$MODU" -eq '1' -a "$CRAY" != '1' ] ; then
               if [ "$os" -eq 'UNIX_System_V' -o "$os" -eq 'SUPER-UX' ] ; then
@@ -180,4 +216,7 @@
             fi
 	 fi
+         if [ "$XNEC" -eq '1' ] ; then
+           echo '	sxar r $(LIBO)/libsx'$diri'.a '$fili'.o ; \'
+         fi
          echo '	$(AR) r $(LIBO)/lib'$diri'.a '$fili'.o ; $(RM) '$fili'.o ; \'
          echo '	cd $(GCM)'
