/[MITgcm]/MITgcm/tools/genmake
ViewVC logotype

Diff of /MITgcm/tools/genmake

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

revision 1.11 by adcroft, Fri May 7 18:12:29 1999 UTC revision 1.15 by adcroft, Fri Mar 24 18:52:53 2000 UTC
# Line 30  while ($#allargs) Line 30  while ($#allargs)
30     echo "Enabling MPI options"     echo "Enabling MPI options"
31     set USEMPI     set USEMPI
32     breaksw     breaksw
33     case -jam:
34       set include_jam_libs
35       echo "Including paths to JAM libraries"
36       breaksw
37   case -help:   case -help:
38     echo "usage: $0 [-help] [-makefile[=...]] [-platform=...] [-mpi]"     echo "usage: $0 [-help] [-makefile[=...]] [-platform=...] [-mpi]"
39     exit     exit
# Line 178  switch ($platform$USEMPI) Line 182  switch ($platform$USEMPI)
182      breaksw      breaksw
183    case Linux+mpi:    case Linux+mpi:
184      set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' )      set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' )
185        set INCLUDES   = ( '-I/usr/local/include' )
186    case Linux:    case Linux:
187      set LN         = ( '/bin/ln -fs' )      set LN         = ( '/bin/ln -fs' )
188      set CPP        = ( '/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp  -traditional -P' )      set CPP        = ( '/lib/cpp  -traditional -P' )
189      set DEFINES    = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' )      set DEFINES    = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' )
     set INCLUDES   = ( '-I/usr/local/include' )  
190      set FC         = ( 'g77' )      set FC         = ( 'g77' )
191      set FFLAGS     = ( ' ' )      set FFLAGS     = ( '-Wimplicit -Wunused -Wuninitialized' )
192      set FOPTIM     = ( '-O3 -funroll-loops ' )      set FOPTIM     = ( '-O3 -malign-double -funroll-loops ' )
193      set LINK       = ( 'g77' )      set LINK       = ( 'g77' )
194      breaksw      breaksw
195      case Linux+pgi+mpi:
196        if ($?include_jam_libs) then
197         set INCLUDES   = ( '-I/usr/local//mpich-cnh-install/include' )
198         set LIBS       = ( '-L/usr/local/mpich-cnh-install/lib/LINUX/ch_p4/ -lfmpich -lmpich' )
199        else
200         set INCLUDES   = ( '-I/usr/local/include' )
201         set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' )
202        endif
203    case Linux+pgi:    case Linux+pgi:
204      set LN         = ( '/bin/ln -fs' )      set LN         = ( '/bin/ln -fs' )
205      set CPP        = ( '/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P' )      set CPP        = ( '/lib/cpp -traditional -P' )
206      set DEFINES    = ( ${DEFINES} '-DWORDLENGTH=4' )      set DEFINES    = ( ${DEFINES} '-DWORDLENGTH=4' )
     set INCLUDES   = ( '-I/usr/local/include' )  
207      set FC         = ( 'pgf77' )      set FC         = ( 'pgf77' )
208      set FFLAGS     = ( '-byteswapio' )      set FFLAGS     = ( '-byteswapio' )
209      set FOPTIM     = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' )      set FOPTIM     = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' )
210      set LINK       = ( 'pgf77' )      set LINK       = ( 'pgf77' )
211      set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich -Kieee' )      breaksw
212      case T3E:
213      case sn6312:
214        set CPP        = ( '/opt/ctl/bin/cpp -P')
215        set DEFINES    = ( ${DEFINES} '-DTARGET_T3E -DWORDLENGTH=4' )
216        set FC         = ( 'f90' )
217        set LINK       = ( 'f90' )
218        set FFLAGS     = ( '-O 2,fusion' )
219      breaksw      breaksw
220    default:    default:
221      echo "Error: platform not recognized: uname -p = " $platform$USEMPI      echo "Error: platform not recognized: uname -p = " $platform$USEMPI
# Line 291  INCLUDEDIRS = ${INCLUDEDIRS} Line 309  INCLUDEDIRS = ${INCLUDEDIRS}
309  EXEDIR     = ${EXEDIR}  EXEDIR     = ${EXEDIR}
310  EXECUTABLE = \$(EXEDIR)${EXECUTABLE}  EXECUTABLE = \$(EXEDIR)${EXECUTABLE}
311    
312    EOF
313    
314    
315    # JAM libraries on Hyades
316    if ($?include_jam_libs) then
317    cat >> ${mfile} <<EOF
318    # extra stuff for Hyades ............................................
319    HYADES_DIR = /u/u0/cnh/jam-lib/software
320    WORK_DIR   = \$(HYADES_DIR)
321    DEPOSIT_DIR = linux_bin
322    
323    STARTXOBJDIR = startx_util/\$(DEPOSIT_DIR)
324    STARTXOBJ = \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/startx_timer.o \
325                \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/startx_util.o \
326                \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/client.o \
327                \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/csutil.o
328    
329    JAMOBJDIR  = jam/\$(DEPOSIT_DIR)
330    JAMOBJ     = \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_init.o \
331                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_kernel.o \
332                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_malloc.o \
333                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_vmalloc.o \
334                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_mutex.o
335    
336    JAMCOBJDIR = jam_collective/\$(DEPOSIT_DIR)
337    JAMCOBJ    = \$(WORK_DIR)/jam_collective/\$(DEPOSIT_DIR)/jam_collective.o
338    
339    XLIBS      = \$(STARTXOBJ) \$(JAMOBJ) \$(JAMCOBJ)
340    
341    # ..................................................................
342    
343    EOF
344    endif
345    
346    
347    cat >> ${mfile} <<EOF
348  # Unix ln (link)  # Unix ln (link)
349  LN = ${LN}  LN = ${LN}
350  # C preprocessor  # C preprocessor
# Line 316  FOPTIM = ${FOPTIM} Line 370  FOPTIM = ${FOPTIM}
370  NOOPTFILES = ${NOOPTFILES}  NOOPTFILES = ${NOOPTFILES}
371  NOOPTFLAGS = ${NOOPTFLAGS}  NOOPTFLAGS = ${NOOPTFLAGS}
372  # Flags and libraries needed for linking  # Flags and libraries needed for linking
373  LIBS = ${LIBS}  LIBS = ${LIBS} \$(XLIBS)
374    
375  EOF  EOF
376    
# Line 344  Clean: Line 398  Clean:
398          @make clean          @make clean
399          -find . -type l -exec rm {} \;          -find . -type l -exec rm {} \;
400          -rm Makefile.bak          -rm Makefile.bak
401    CLEAN:
402            @make Clean
403            -find ../verification/ -name "*.meta" -exec rm {} \;
404            -find ../verification/ -name "*.data" -exec rm {} \;
405            -rm \$(EXECUTABLE)
406    
407  # The normal chain of rules is (  .F - .f - .o  )  # The normal chain of rules is (  .F - .f - .o  )
408  .F.f:  .F.f:

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22