/[MITgcm]/MITgcm_contrib/PRM/build_scripts/makemake.sh
ViewVC logotype

Diff of /MITgcm_contrib/PRM/build_scripts/makemake.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by cnh, Thu Oct 12 22:50:18 2006 UTC revision 1.3 by jmc, Tue Jan 8 22:29:57 2008 UTC
# Line 10  Line 10 
10  # Debug settings  # Debug settings
11  # set -uvx  # set -uvx
12  #  #
13    if test -f ../../../run/prm_site_config_file ; then
14     grep 'einfo=' ../../../run/prm_site_config_file | sed 's/^# *//'
15    fi
16  if test -f makemake.header ; then  if test -f makemake.header ; then
17   cat makemake.header   cat makemake.header
18  fi  fi
# Line 103  done Line 106  done
106  echo '$(EXTRA_LIB_LIST)'  echo '$(EXTRA_LIB_LIST)'
107  echo ' '  echo ' '
108    
109    # Write liball.a library list
110    echo 'LIBLIST_ALL=\'
111    for l in ${ll} ; do
112    echo ${l}' \'
113    done
114    echo ' '
115    
116  # Write library option  # Write library option
117  # write it twice because gnu linker doesn't search backwards and we don't know the  # write it twice because gnu linker doesn't search backwards and we don't know the
118  # right order (I think this is what ar and ranlib are for!)  # right order (I think this is what ar and ranlib are for!)
119    # Add liball.a to fix issues with intel compiler on columbia (2007-09-16) (ifort 9.1.039).
120  echo 'LIBOPT=\'  echo 'LIBOPT=\'
121  for l in ${lo} ; do  for l in ${lo} ; do
122  echo ${l}' \'  echo ${l}' \'
# Line 113  done Line 124  done
124  for l in ${lo} ; do  for l in ${lo} ; do
125  echo ${l}' \'  echo ${l}' \'
126  done  done
127    echo '-lall '
128  echo ' '  echo ' '
129    
130    
131  # Set rule for executable  # Set rule for executable
132  echo '$(EXE): $(OBJLIST) $(LIBLIST)'  echo '$(EXE): $(OBJLIST) $(LIBLIST) liball.a'
133  echo -e \\t'$(LINK) -L. -o $(EXE) $(OBJLIST) $(LIBOPT) $(EXTRA_LOPT)'  echo -e \\t'$(LINK) -L. -o $(EXE) $(OBJLIST) $(LIBOPT) $(EXTRA_LOPT)'
134    
135    # Set rule for liball.a
136    echo ' '
137    echo 'liball.a: $(LIBLIST_ALL)'
138    echo '  \rm -fr tmp'
139    echo '  \rm -f liball.a'
140    echo '  mkdir tmp'
141    echo '  cp $(LIBLIST_ALL) tmp'
142    echo '  cd tmp; ls -1 *.a | sed "s/^.*/ar x &/" > foo'
143    echo '  cd tmp; source foo'
144    echo '  cd tmp; ar rc liball.a *.o; cp liball.a ..'
145    
146    
147  # Set rule for libraries  # Set rule for libraries
148  ol=''  ol=''
149  ll=''  ll=''

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22