Ignore:
Timestamp:
Feb 9, 2012, 3:48:30 PM (13 years ago)
Author:
emillour
Message:

Mars GCM:

  • Updated the makegcm(s) so that default behaviour is to set LMDGCM env variable to be the directory in which the makegcm script is. Updated the makegcm_* to use "SOURCE" to identify main program to compile.
  • Adapted "create_make_gcm" script so that it can compile a main program that is either something.F or something.F90. Also added that object files are removed from archive before compiling a new version.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/create_make_gcm

    r38 r519  
    109109echo '  cd $(LIBO) ; $(RANLIB) lib*.a ; cd $(GCM) ;\'
    110110echo '  cd $(LOCAL_DIR); \'
    111 echo '  $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(PROG).F -o $(PROG).o ; \'
     111echo '  $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(SOURCE) -o $(PROG).o ; \'
    112112if [ "$CRAY" = '0' ] ; then
    113113echo '  $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_FILTRE) $(L_AERONOMARS) $(L_PHY) $(L_BIBIO) $(L_DYN) $(L_AERONOMARS) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o '
     
    219219         done
    220220         echo $str1
     221         # Compile in LOCAL_DIR directory, and before compiling,
     222         # remove the object from the library
     223         echo ' cd $(LOCAL_DIR); \'
     224         echo ' $(AR) d $(LIBO)/lib'$diri'.a '$fili'.o ; \'
    221225         if [ "$F90" -eq '0' ] ; then
    222            echo '       cd $(LOCAL_DIR); \'
     226         ## Fixed Form Fortran 77
    223227           echo '       $(COMPILE) $(LIBF)/'$diri'/'$trufile' ; \'
    224228         else
     229         ## Fortran 90
    225230           echo '       cd $(LOCAL_DIR); \'
    226231           if [ -f $fili.F90 ] ; then
    227               echo '    $(COMPTRU90) $(LIBF)/'$diri'/'$trufile' ; \'
     232           ## Free Form Fortran 90
     233              echo '    $(COMPTRU90) $(LIBF)/'$diri'/'$trufile' ; \'
    228234           else
    229               echo '    $(COMPILE90) $(LIBF)/'$diri'/'$trufile' ; \'
     235           ## Fixed Form Fortran 90
     236              echo '    $(COMPILE90) $(LIBF)/'$diri'/'$trufile' ; \'
    230237           fi
     238           ## If a module, handle created module descriptor file
    231239           MODU=0; egrep -i '^ *module ' $trufile> /dev/null 2>&1 && MODU=1
    232240            if [ "$MODU" -eq '1' -a "$CRAY" != '1' ] ; then
     
    242250           echo '       sxar r $(LIBO)/libsx'$diri'.a '$fili'.o ; \'
    243251         fi
     252         # Put generated object in library
    244253         echo ' $(AR) r $(LIBO)/lib'$diri'.a '$fili'.o ; $(RM) '$fili'.o ; \'
    245254         echo ' cd $(GCM)'
Note: See TracChangeset for help on using the changeset viewer.