Index: LMDZ.3.3/branches/unlabeled-1.4.2/makegcm
===================================================================
--- LMDZ.3.3/branches/unlabeled-1.4.2/makegcm	(revision 102)
+++ LMDZ.3.3/branches/unlabeled-1.4.2/makegcm	(revision 103)
@@ -134,4 +134,5 @@
    set optimbis=" "
    set optim90=" -fast -fixed "
+   set optimtru90=" -fast -free"
    set opt_link="-lf77compat -L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
    set mod_loc_dir=$localdir
@@ -144,8 +145,9 @@
    set optimbis=" "
 else if $VPP then
-   set optim=" -Of -Wv,-Of,-ilfunc"
-   set optimbis=" -Psia -Aa -Wv,-m3 -Wp,-DVPP -Z $LMDGCM/listage"
-   set optim90="$optim""$optimbis"" -X9 -w"
-   set opt_link="-L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
+#   set optim="-Dasuxm  -On, -g -Ad -Potilax -Eciplume -Si"
+#   set optimbis="  -Wv,-m3 -Wp,-DVPP -Z $LMDGCM/listage"
+   set optimbis=" -Z $LMDGCM/listage"
+   set optim90="$optim $optimbis -w"
+   set opt_link="-Wg,-c -L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
    set oplink=" "
    set mod_loc_dir=$IOIPSLDIR
@@ -157,14 +159,13 @@
    set optim="-fast "
    set optim90=" -fast -module $libo"
+   set optimtru90=" -fast -c -Mfree -module /d3/fairhead/sechiba/ioipsl"
    set opt_link=" -Mfree -L/usr/local/pgi/linux86/lib -lpgf90 -lpgftnrtl -lpghpf -lpghpf2 -L$NCDFLIB -lnetcdf -L$IOIPSLDIR -lioipsl -Wl,-Bstatic "
    set mod_loc_dir=$IOIPSLDIR
    set mod_suffix=mod
 else if $NEC then
-   set optim90=' -C hopt -float0 -ew -R4 -L nostdout '
-   set optim90=' -C hopt -float0 -eabw -P static -R5 -pi auto line=500 -Wf,-O,extendreorder,-pvctl,fullmsg,vchg,noverrchk,assume,loopcnt=300000,vwork=stack,-L,summary,transform'
+   set optim90=' -clear -C hopt -float0 -ew -P stack -Wf,"-pvctl fullmsg noassume "'
    set optim="$optim90"
-   set opt_link=" -L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf "
-   set opt_link=" -V -float0 -ew  -P static -Wl,-Z,4800000,-h,lib_cyclic -L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf "
    set optimbis=" "
+   set opt_link=" -C hopt -float0 -ew -P stack -L$IOIPSLDIR -lioipsl  -L/u/rech/psl/rpsl003/IOIPSL -lnetcdf_i8r8_v "
    set mod_loc_dir="."
    set mod_suffix="mod"
@@ -315,5 +316,5 @@
 
      case -link
-        set opt_link="$2" ; shift ; shift ; goto top
+        set opt_link="$opt_link $2" ; shift ; shift ; goto top
 
      case -debug
@@ -324,4 +325,5 @@
            set optim=" -g -C "
            set optim90=" -fixed -g "
+           set optimtru90=" -free -g "
         else if $CRAY then
            set optim="$optim"" -g "
@@ -390,4 +392,7 @@
    set dim=`echo $dim | sed -en 's/[^0-9]/ /g'`
    set dim_=`echo $dim | sed -en 's/[^0-9]/_/g'`
+else if ( $SUN ) then
+   set dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
+   set dim_=`echo $dim | sed -e 's/[^0-9]/_/g'`
 else
    set dim=`echo $dim | sed -n -e 's/[^0-9]/ /gp'`
@@ -514,4 +519,5 @@
 find libf -name '*.[Fh]' -print >! tmp77
 find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print >! tmp90
+find libf -name '*.[Fh]90' -print >> tmp90
 
 if (    `diff tmp77 liste_des_sources_f77 | wc -w` \
@@ -631,6 +637,10 @@
  \cp $IOIPSLDIR/*.mod $libo
 else if $SUN then
- set optim90=" $optim90 -M$IOIPSLDIR -M$libo "
+ set optim90=" $optim90 -M$libo "
+ set optimtru90=" $optimtru90 -M$libo "
  set optim="$optim90"
+ \cp /d3/fairhead/sechiba_sun/parameters/*.mod $libo
+ \cp /d3/fairhead/sechiba_sun/sechiba/*.mod $libo
+ \cp /d3/fairhead/sechiba_sun/stomate/*.mod $libo
  \cp $IOIPSLDIR/*.mod $libo
 else if $NEC then
@@ -638,5 +648,7 @@
 else if $LINUX then
  set optim90=" -fast -module $libo "
+ set optim="$optim90"
  set mod_loc_dir=$libo
+ \cp /d3/fairhead/sechiba/ioipsl/*.mod $libo
  \cp $IOIPSLDIR/*.mod $libo
 endif
@@ -652,8 +664,8 @@
 cd $localdir
 
-
 echo $make -f $LMDGCM/makefile \
 OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \
 OPTIM90="$optim90" \
+OPTIMTRU90="$optimtru90" \
 OPTIM="$optim$optimbis" \
 INCLUDE="$include" \
@@ -677,4 +689,5 @@
 OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \
 OPTIM90="$optim90" \
+OPTIMTRU90="$optimtru90" \
 OPTIM="$optim$optimbis" \
 INCLUDE="$include" \
