source: trunk/etc/YaoI @ 145

Last change on this file since 145 was 145, checked in by jbrlod, 15 years ago

Update YaoI.

File size: 20.6 KB
Line 
1#!/bin/sh
2
3#######This is a Luigi Nardi improved version of the YaoH script file.
4
5#°°°°°°°°°°°°°°°°°°°°°°Function for move all files generated and quit.
6findir()
7{
8  mkdir -p $YWRKDIR;
9  mv  -f  Yaoext* Y*.cpp Y*~ Y*.o $YWRKDIR
10
11  # si la generation n'est pas demanded, on ne move pas Y1, Y2
12  # et donc, on ne les movent que si la generation est demanded.
13#  if test $OGENER = "1"
14#  then
15    mv -f Y1* Y2* $YWRKDIR
16#  fi
17  exit
18}
19#°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
20
21
22#BEGIN of the procédure
23VERS=9
24YNAME=`basename $0`
25VERELDAT="01.11.2008 (release 01.11.2008)"
26
27#=======================================================================
28# Determination de l'architecture materielle pour savoir quelle
29# version de librairies compilees utiliser.
30#=======================================================================
31# Si $YAOARCHI est defini (cela ce fait normalement dans fichier
32# d'environnement .cshrc) ceci definit $MACHINE. Sinon, il faut
33# determiner le type de $MACHINE selon l'architecture materielle :
34#
35#  - Par la commande `uname -s` et,
36#  - si Linux (Mandriva ici au LOCEAN), par le contenu du fichier
37#    /etc/mandriva-release.  Il faut donc adapter cette procedure selon
38#    l'environnement de systeme d'exploitation ...
39MACHINE="UNKNOWN"
40if [ -n "$YAOARCHI" ]; then
41  echo " --> MACHINE TYPE ihnerited from YAOARCHI enviromental variable"
42  MACHINE="$YAOARCHI"
43else
44  echo -n " --> MACHINE TYPE determined now ... "
45  case `uname -s` in
46    Linux)
47    case `cat /etc/mandriva-release` in
48      ( "Mandriva Linux release 2006.0 (Official) for i586" | \
49      "Mandriva Linux release 2006.0 (Community) for i586" ) MACHINE=lnx86 ;;
50      "Mandriva Linux release 2006.0 (Official) for x86_64" ) MACHINE=x86_64 ;;
51      ( "Mandriva Linux release 2007.0 (Official) for i586" | \
52      "Mandriva Linux release 2007.1 (Official) for i586" ) MACHINE=lnx86_Mandriva2007 ;;
53      ( "Mandriva Linux release 2007.0 (Official) for x86_64" | \
54      "Mandriva Linux release 2007.1 (Official) for x86_64" ) MACHINE=x86_64_Mandriva2007 ;;
55      ( "Mandriva Linux release 2008.0 (Official) for i586" | \
56      "Mandriva Linux release 2008.1 (Official) for i586" ) MACHINE=lnx86_Mandriva2008 ;;
57      ( "Mandriva Linux release 2008.0 (Official) for x86_64" | \
58      "Mandriva Linux release 2008.1 (Official) for x86_64" ) MACHINE=x86_64_Mandriva2008 ;;
59      ( "Mandriva Linux release 2009.0 (Official) for i586" | \
60      "Mandriva Linux release 2009.1 (Official) for i586" ) MACHINE=lnx86_Mandriva2009 ;;
61      ( "Mandriva Linux release 2010.0 (Official) for x86_64" | \
62      "Mandriva Linux release 2010.1 (Official) for x86_64" ) MACHINE=x86_64_Mandriva2010 ;;
63      *) cat <<EOF
64
65      ************************************************************
66      *** UNKNOWN LINUX DISTRIBUTION TYPE :
67      ***   <`cat /etc/mandriva-release`>
68      *** See your YAO administrator and give him this message for
69      *** necessary changes in $0 script program.
70      ************************************************************
71
72EOF
73      exit;;
74    esac ;;
75    SunOS)  MACHINE=solaris ;;
76    Darwin) MACHINE=darwin ;;
77    *) cat <<EOF
78
79    ************************************************************
80    *** UNKNOWN LOCAL ARCHITECTURE TYPE (`uname -s`)"
81    *** See your YAO administrator.
82    ************************************************************
83
84EOF
85    exit;;
86  esac
87  echo " <${MACHINE}>."
88fi
89echo
90#============= Traitement des options passées en paramètre =============
91#valeur d'option par defaut
92OHELP="0"
93OGENER="1"
94OPTCPIL=""
95#DBGCPIL=""
96indexec="0"
97indydir="0"
98OCAPSUL="0"
99OECHO="0"
100OLIBFOR="-lgfortran"
101if test $MACHINE = "darwin"
102then
103  OLIBFOR="-L/sw/lib/gcc4.4/lib -lgfortran"
104fi
105
106#verif au moins un parametre
107#nb: le nom du projet est toujours le dernier parametre
108if test -z $1
109then
110  #echo " > missing parameter, syntaxe: $YNAME {-h, [-g][{-O0, -O1, -O2, -O3}] prj}"
111  cat <<EOF
112
113  > Missing parameter, syntaxe:
114  > $YNAME { -h, [+"optionType"] [-x execName] [-d directory] [-s] [-e] [-lg2c] prjName }
115  >
116  > Options:
117  > -h            show a YAO help.
118  > +optionType   option to be added directly at compilation time (it is translated in -optionType), i.e. +g add the option for DBG.
119  > -d            directory to define a different ROOT destination directory. The default ROOT is the current directory.
120  >               The generated files are always created in "ROOT/Yworkdir/".
121  > -x            execName to define a different executable name. The default is the name of the application.
122  > -s            encapsulation (performed with the creation of a namespace).
123  > -e            echo of the compilation and the link.
124  > -lg2c         the specification of the fortran library.
125  > -p            enable the parallelization (openMP must be installed on the machine).
126  > prjName       is the project name.
127EOF
128  exit
129fi
130
131#boucle sur les parametres
132for i
133do
134  #-----> Help required ? on demande juste de l'aide
135  if test $i = "-h"
136  then
137    OHELP="1"
138  fi
139  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
141  # -g option for the GNU debuger (GDB). This option is copied directly in the compilation command g++.
142  # It is not needed because if we want the GDB we write the "+g" option and this is copied at compilation time.
143  #if test $i = "-g"
144  #            then
145  #               DBGCPIL="-g"
146  #            fi
147  #            echo "DBGCPIL = " $DBGCPIL
148  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149
150  #  Options de compilation ???????????????
151  if test ${i:0:1} = "+"
152  then
153    OPTCPIL=$OPTCPIL$i
154  fi
155  #echo "OPTCPIL = " $OPTCPIL (cf ci apres, transformation des options de compil
156  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157  #-----> Avant l'Executable avait le meme nom que prj (=dernier parametre),
158  #maintenant ce sera par default, et il peut etre changed avec l'option -x
159  if test $indexec = "1"
160  then
161    EXECNAME=$i
162    indexec="0"
163  fi
164  if test $i = "-x"
165  then
166    indexec="1"
167  fi
168  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169  #-----> Changement du Repertoire YAO
170  if test $indydir = "1"
171  then
172    YAODIR=$i
173    indydir="0"
174  fi
175  if test $i = "-d"
176  then
177    indydir="1"
178  fi
179  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180  #-----> Encapsulation (spacename) ou pas
181  if test $i = "-s"
182  then
183    OCAPSUL="1"
184  fi
185  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186  #-----> Echo de la Compil et du Link
187  if test $i = "-e"
188  then
189    OECHO="1"
190  fi
191  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192  #-----> Librairie Fortran
193  if test $i = "-lg2c"
194  then
195    OLIBFOR="-lg2c"
196  fi
197  #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198  #-----> Parallelism openMP
199  if test $i = "-p"
200  then
201    PARALLEL="-fopenmp"
202  fi
203   #=====> Fin Boucle de traitement des Parametres
204done
205
206prj=`basename $i .d`
207#=======================================================================
208#bibliothèque YAODIR (pour objets YAO)
209#desormais pour changer le repertoire yao, on peut utiliser l'option -d
210if test ${#YAODIR} -eq 0
211then
212  echo "YAO directory variable not declared ..."
213  echo "current dir used"
214  YAODIR="."
215fi
216#
217if test ! -d ${YAODIR}
218then
219  echo "$YAODIR : invalid or unavailable YAO directory"
220  exit
221fi
222#-----------------------------------------------------------------------
223#BINDIR=${YAODIR}/yao${VERS}/product/bin/${MACHINE}
224
225#BINDIR=${YAODIR}/yao${VERS}/yao/bin/${MACHINE}
226#INCDIR=${YAODIR}/yao${VERS}/yao/include
227BINDIR=${YAODIR}/yao/bin/${MACHINE}
228INCDIR=${YAODIR}/yao/include
229
230
231
232#BINDIR=${YAODIR}/yao${VERS}/bin/${MACHINE}
233#INCDIR=${YAODIR}/yao${VERS}/include
234#
235#=======================================================================
236# On revient sur le traitement des paramètres
237#----> on demande juste de l'aide
238if test $OHELP = "1"
239then
240  #${BINDIR}/Yao${VERS} -h
241  ${BINDIR}/Yao${VERS}Generator -h
242  #Yao9Generator -h
243  exit
244fi
245
246#----> dernier parametre = prj (doit exister eventuellement avec .d)
247#echo "last parm: $i"
248#prj=$i
249#if !(test -e $prj)
250#then
251if !(test -e $prj.d)
252then
253  echo " description file $prj(.d) not found"
254  exit
255fi
256#fi
257
258#----> nom de l'exe : exename ; s'il n'est pas affected alors c'est prj
259if test -z $EXECNAME
260then
261  EXECNAME=$prj
262fi
263
264#----> on transforme les options de compilation
265OPTCPIL=`echo $OPTCPIL | sed 's/+/ -/g'`
266
267#----> more verif on parameters
268#--> si sans generation, les fichiers Y1 et Y2 doivent etre dans le repertoire courant
269if test $OGENER = "0"
270then
271  if !(test -e Y1$prj.h) || !(test -e Y2$prj.h)
272  then
273    echo "file Y1$prj.h or Y2$prj.h missing"
274    exit
275  fi
276fi
277
278#=======================================================================
279#-----------------------------------------------------------------------
280#bibliotheque YADFDIR pour la derivation automatique
281#YADFDIR=${YAODIR}/etc/bin/${MACHINE}
282#YADFDIR=${YAODIR}/yao${VERS}/etc/bin/${MACHINE}
283YADFDIR=${YAODIR}/etc/bin/${MACHINE}
284
285#-----------------------------------------------------------------------
286#une bibliotheque de travail pour ne pas etre embarassed par les codes generes
287YWRKDIR="./Yworkdir"
288
289#-----------------------------------------------------------------------
290# Compiler Global Variables:
291#-----------------------------------------------------------------------
292CC=
293CFLAGS=
294CXX="g++"
295#CXXFLAGS=" ${OPTCPIL} ${DBGCPIL} -Wall -DLINUXPC -Wno-deprecated -Wno-write-strings -I${INCDIR}"
296CXXFLAGS=" ${OPTCPIL} ${DBGCPIL} -Wall -DLINUXPC -Wno-deprecated -Wno-write-strings -I${INCDIR}"
297if test $MACHINE = "darwin"
298then
299  CXXFLAGS=${CXXFLAGS}" -I/sw/include"
300fi
301NETCDFINCDIR=/usr/include
302if [ -f  ${NETCDFINCDIR}/netcdf.h ]; then
303  CXXFLAGS=${CXXFLAGS}" -I${NETCDFINCDIR}"
304else
305  NETCDFINC=`echo ${NETCDFINCDIR}/netcdf* | awk '{ print $1 }'`
306  if [ -d ${NETCDFINC} ]; then
307    NETCDFINCFIC="${NETCDFINC}/netcdf.h"
308    if [ -f ${NETCDFINCFIC} ]; then
309      CXXFLAGS=${CXXFLAGS}" -I${NETCDFINC}"
310    fi
311  fi
312fi
313
314#-----------------------------------------------------------------------
315# LDFLAGS:
316# Test d'existence de la bibliotheque NetCDF
317NETCDFLIBDIR=/usr/lib
318NETCDFLIB=`echo ${NETCDFLIBDIR}/libnetcdf* | awk '{ print $1 }'`
319if test -e ${NETCDFLIB}
320then
321  LDFLAGS=" -lm ${OLIBFOR} -L${NETCDFLIBDIR} -lnetcdf"
322else
323  NETCDFLIBDIR=/usr/lib/local
324  NETCDFLIB=`echo ${NETCDFLIBDIR}/libnetcdf* | awk '{ print $1 }'`
325  if test -e ${NETCDFLIB}
326then
327  LDFLAGS=" -lm ${OLIBFOR} -L${NETCDFLIBDIR} -lnetcdf"
328else
329  NETCDFLIBDIR=/sw/lib
330  NETCDFLIB=`echo ${NETCDFLIBDIR}/libnetcdf* | awk '{ print $1 }'`
331  if test -e ${NETCDFLIB}
332then
333  LDFLAGS=" -lm ${OLIBFOR} -L${NETCDFLIBDIR} -lnetcdf"
334else
335  NETCDFLIBDIR=/usr/lib64
336  NETCDFLIB=`echo ${NETCDFLIBDIR}/libnetcdf* | awk '{ print $1 }'`
337  if test -e ${NETCDFLIB}
338then
339  LDFLAGS=" -lm ${OLIBFOR} -L${NETCDFLIBDIR} -lnetcdf"
340else
341  LDFLAGS=" -lm ${OLIBFOR}"
342fi
343           fi
344         fi
345       fi
346
347       #=======================================================================
348       #bibliothèque MQNDIR (pour libreries M1QN3 et M2QN1)
349        MQNDIR="${YAODIR}/yao/share/inria/"
350 
351      if test $OLIBFOR = "-lg2c"
352       then
353         BINMQN="${MQNDIR}/bin/mdk"
354       else
355         BINMQN="${MQNDIR}/bin/${MACHINE}"
356       fi
357       LDMQN=" -L${BINMQN} -lmqn"
358
359       #-----------------------------------------------------------------------
360       FC="g77"
361       #FFLAGS=" -Dkey_4dvar ${OPTCPIL} ${DBGCPIL} -Wall"
362       FFLAGS=" -Dkey_4dvar ${OPTCPIL} -Wall"
363       #
364       #CPPFLAGS=
365       #-----------------------------------------------------------------------
366
367       cat <<EOF
368       ====================================================================
369                    $YNAME V.$VERS : PROJECT CREATION PROCEDURE                   
370                    $VERELDAT                         
371       ====================================================================
372        `printf "LOCAL MACHINE BINARY TYPE FOUND ..... %-28s" "<$MACHINE>"`
373       ====================================================================
374
375EOF
376
377       #-----------------------------------------------------------------------
378       echo " > Run of $YNAME for project :" $prj
379       #noms des sources
380       Ympp=Ymain_$prj.cpp
381       Y1h=Y1$prj.h
382       Y2h=Y2$prj.h
383       Y3l=Y3$prj.l
384       Y3h=Y3$prj.h
385       Ycpp=Y$prj.cpp
386
387       #=======================================================================
388       #Test: we regenerate or not? This test is automatic looking the dates of the files.
389       #Default is OGENER = "1": regenerate.
390       if test $YWRKDIR/${Y1h} -nt ${prj}.d
391       then
392         if test $YWRKDIR/${Y2h} -nt ${prj}.d
393         then OGENER="0"
394           echo " > HEADERS generation not required: "
395           echo " >   the description file has not changed from the last generation of $Y1h and $Y2h."
396           echo " >   Pay attention all the warning showed in the generation process are not been displayed this way because of the non regeneration."
397           echo " >   If you want to force the regeneration remove the Yworkdir/ directory."
398           cp $YWRKDIR/$Y1h .
399           cp $YWRKDIR/$Y2h .
400           if test -e $YWRKDIR/Yaoext_$prj
401           then
402             cp $YWRKDIR/Yaoext_$prj .
403           fi
404         fi
405        fi
406       # Remark: maybe we should consider also Yaoext_projName for the regeneration option.
407
408       #ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
409       if test $OGENER = "1";
410       then
411         echo " > enter proc generation "
412
413         # sauvegarde (mv~) des Y1prjname.h Y2prjname.h et Yprjname.cpp ...
414         # (i.e de tout ce qui est genere, sauf Y3) s'ils existent
415         if test -e $YWRKDIR/$Y1h;
416         then
417           mv -f $YWRKDIR/$Y1h $YWRKDIR/$Y1h~
418           echo " > $Y1h moved as \~"
419         fi
420         if test -e $YWRKDIR/$Y2h;
421         then
422           mv -f $YWRKDIR/$Y2h $YWRKDIR/$Y2h~
423           echo " > $Y2h moved as \~"
424         fi
425         ##Y3h: pour les derivees automatiques la gestion est differente
426         if test -e $YWRKDIR/$Y3l;
427         then
428           mv -f $YWRKDIR/$Y3l $YWRKDIR/$Y3l~
429           echo " > $Y3l moved as \~"
430         fi
431         #
432         #Ympp=Y$prj.cpp
433         if test -e $YWRKDIR/$Ycpp;
434         then
435           mv -f $YWRKDIR/$Ycpp $YWRKDIR/$Ycpp~
436           echo " > $Ycpp moved as \~"
437         fi
438         if test -e $YWRKDIR/$Ympp;
439         then
440           mv -f $YWRKDIR/$Ympp $YWRKDIR/$Ympp~
441           echo " > $Ympp moved as \~"
442         fi
443         # idem pour les .o et l'executable
444         if test -e $YWRKDIR/Y$prj.o;
445         then
446           mv -f $YWRKDIR/Y$prj.o $YWRKDIR/Y$prj.o~
447           echo " > Y$prj.o moved as \~"
448         fi
449         if test -e $YWRKDIR/Ymain_$prj.o;
450         then
451           mv -f $YWRKDIR/Ymain_$prj.o $YWRKDIR/Ymain_$prj.o~
452           echo " > Ymain_$prj.o moved as \~"
453         fi
454         if test -e $prj;
455         then
456               mv -f $prj $YWRKDIR/$prj~
457               echo " > $prj moved as \~"
458         fi
459         if test -e $EXECNAME;
460         then
461           mv -f $EXECNAME $YWRKDIR/$EXECNAME~
462           echo " > $EXECNAME moved as \~"
463         fi
464         if test -e $YWRKDIR/Yaoext_$prj
465         then
466           mv -f $YWRKDIR/Yaoext_$prj $YWRKDIR/Yaoext_$prj~
467           echo " > Yaoext_$prj moved as \~"
468         fi
469
470         #---------------------------------------------------------------------
471         # Lancement de la GENERATION : appel de Yao9Generator
472         # creation des header (Y1prjname.h et Y2prjname.h, et autres ...) du projet
473         # if Yao8 $Yd        desormais, c'est Yao qui, si besoin, formatera un .d
474         
475         # if ${BINDIR}/Yao${VERS} $prj  # old version
476         # if ./Yao9Generator $prj
477         # if ./Yao${VERS}Generator $prj
478
479           BEGIN_TIME=`date +%s`
480           if ${BINDIR}/Yao${VERS}Generator $prj 
481           then
482             END_TIME=`date +%s`
483             echo " > Execution time of the Yao code generator..."$(($END_TIME-$BEGIN_TIME)) second\(s\)
484             echo " > headers are now created"
485           else echo " > PROJECT HEADERS CREATION FAILED"
486             findir
487           fi
488         
489         #---------------------------------------------------------------------
490         # creation des derivees automatique (Y3prjname.h) pour les modules de la liste (Y3prjname.l)
491         if test -e $Y3l
492         then
493           if ${YADFDIR}/ylmodf $Y3l $Y3h 1
494           then echo " > automatic differenciation done"
495           else echo " > AUTOMATIC DIFFERENCIATION FAILED"
496             findir
497           fi
498         fi
499
500         #ggggggggggggggggggggggggggggg
501         echo " > end proc generation "
502       fi
503       # fin de la génération
504       #ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
505
506       #=======================================================================
507       #ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
508       echo " > enter proc construct "
509
510       #------- inclusion d'eventuels objets (.o) externes dont la liste aura ete
511       # produite par la directive option O_EXTOBJ
512       #if test -e "YaoEXT"
513       if test -e Yaoext_$prj
514       then
515         echo " Extern object : "
516         #source Yaoext_$prj
517         .       Yaoext_$prj
518         echo "                ${LDYEXTOBJ}"
519       fi
520
521       #-----------------------------------------------------------------------
522       # création (i.e construction) du source complet du projet
523       # integration du 1er header (include define at autres ...)
524       cat ${INCDIR}/Dynide.h           > $Ycpp
525       #-----------
526       # on ajoute eventuellement un 1er additionnel utilisateur
527       # avant l'encapsulation (namespace) de l'application
528       Uadd=$prj"03.h"
529       if test -e $Uadd;
530       then
531         cat $Uadd               >> $Ycpp
532       fi
533       #-----------
534       if test $OCAPSUL = "1"
535       then
536         # on encapsule l'appli dans un namespace
537         echo "/////////////////////////////////////////////////////////////////" >> $Ycpp
538         echo "namespace YAP__$prj {   //debut du domaine " >> $Ycpp
539         echo "/////////////////////////////////////////////////////////////////" >> $Ycpp
540       fi
541       #-----------
542       # on complete la suite du header de
543       cat ${INCDIR}/Dynamo.h           >> $Ycpp
544       #-----------
545       # integration du projet (les 2 header créés par Yao8 (+adf) et de son nom et version
546       echo "#include \"$Y1h\" "               >> $Ycpp
547       if test -e $Y3h;
548       then
549         echo "#include \"$Y3h\" "               >> $Ycpp
550       fi
551       echo "#include \"$Y2h\" "               >> $Ycpp
552       echo "#define PRJNAME  \"$prj\" "       >> $Ycpp
553       #echo "#define VERREF   \"$YNAME V.$VERS $VERELDAT $OPTCPIL $DBGCPIL \" "        >> $Ycpp
554       echo "#define VERREF   \"$YNAME V.$VERS $VERELDAT $OPTCPIL \" "        >> $Ycpp
555       #
556       # integration du main
557       cat ${INCDIR}/Dynamo.cpp                >> $Ycpp
558       #
559       if test $OCAPSUL = "1"
560       then
561         # fin de l'encapsulage de l'appli
562         echo "/////////////////////////////////////////////////////////////////" >> $Ycpp
563         echo "}                     //fin du domaine " >> $Ycpp
564         echo "/////////////////////////////////////////////////////////////////" >> $Ycpp
565         #
566         # maintenant, il faut cree et ajouter la fonction de lancement
567         echo "int Ygo_$prj (int argc, char *argv[])"  >> $Ycpp
568         echo "{   YAP__$prj::Yentry0 (argc, argv); return(0);}"       >> $Ycpp
569         #
570       fi
571       # on ajoute eventuellement un 2eme additionnel utilisateur (apres l'encapsulation)
572       Uadd=$prj"07.h"
573       if test -e $Uadd;
574       then
575         cat $Uadd               >> $Ycpp
576       fi
577       #-----------------------------------------------------------------
578       # On cree de toute piece le 'vrai' main de l"application, dans un .cpp cette fois !!!
579       if test $OCAPSUL = "1"
580       then
581         echo "extern int Ygo_$prj (int argc, char *argv[]);" > $Ympp
582         echo "int main(int argc, char *argv[])"       >> $Ympp
583         echo "{   Ygo_$prj (argc, argv); return(0); }" >> $Ympp
584       else
585         echo "extern int Yentry0 (int argc, char *argv[]);" > $Ympp
586         echo "int main(int argc, char *argv[])"       >> $Ympp
587         echo "{   Yentry0 (argc, argv); return(0); }" >> $Ympp
588       fi
589
590       #-----------------------------------------------------------------------
591       echo " > end proc construction "
592       #ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
593
594       #=======================================================================
595       #-----------------------------------------------------------------------
596       #                     compilation et édition des liens
597       echo " > start compilation "
598       # //--------------------------------------------------------------------
599       # création de l'executable
600       #
601       #compilation du projet.c
602       if test $OECHO = '1'
603       then
604         echo "${CXX} ${CXXFLAGS} ${PARALLEL} -c $Ympp $Ycpp"
605       fi
606       ${CXX} ${CXXFLAGS} ${PARALLEL} -c $Ympp $Ycpp
607       echo " > end of compilation, start linking "
608
609       # 2) link
610       if test $OECHO = '1'
611       then
612         echo " ${CXX} ${CXXFLAGS} ${PARALLEL} -o $EXECNAME Ymain_$prj.o Y$prj.o ${LDMQN} ${LDYEXTOBJ} ${LDFLAGS}"
613       fi
614       if ${CXX} ${CXXFLAGS} ${PARALLEL} -o $EXECNAME Ymain_$prj.o Y$prj.o ${LDMQN} ${LDYEXTOBJ} ${LDFLAGS}
615     then
616       echo
617       echo "       =======================  PROJECT IS NOW READY  ====================="
618     else
619       echo
620       echo " > unpredictable mistakes : PROJECT BUILDING FAILED"
621       echo
622       findir
623     fi
624     
625     cat<<EOF
626                           $YNAME V.$VERS : END OF PROCEDURE                     
627                           $VERELDAT                 
628       ====================================================================
629                           TOTAL COMPILATION TIME : $SECONDS second(s)           
630       ====================================================================
631
632EOF
633     findir
634     #===============================================================================
Note: See TracBrowser for help on using the repository browser.