<p><b>duda</b> 2009-12-23 13:45:27 -0700 (Wed, 23 Dec 2009)</p><p>Update top-level Makefile to use separate make targets<br>
for different platforms.<br>
<br>
Now, compilation is accomplished by typing 'make target',<br>
where target is, e.g., xlf.<br>
<br>
M    Makefile<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/swmodel/Makefile
===================================================================
--- trunk/swmodel/Makefile        2009-12-23 20:35:10 UTC (rev 99)
+++ trunk/swmodel/Makefile        2009-12-23 20:45:27 UTC (rev 100)
@@ -2,45 +2,62 @@
 MODEL_FORMULATION = -DLANL_FORMULATION
 
 #EXPAND_LEVELS = -DEXPAND_LEVELS=32
+#FILE_OFFSET = -DOFFSET64BIT
 
-# IBM with Xlf compilers
-#FC = mpxlf90
-#CC = mpcc
-#SFC = xlf90
-#SCC = xlc
-#FFLAGS = -qrealsize=8 -g -C 
-#CFLAGS = -g
-#LDFLAGS = -g -C
+dummy:
+        @( echo &quot;try one of:&quot;; \
+        echo &quot;   make xlf&quot;; \
+        echo &quot;   make pgi&quot;; \
+        echo &quot;   make ifort&quot;; \
+        echo &quot;   make gfortran&quot;; \
+        )
+
+xlf:
+        ( make all \
+        &quot;FC = mpxlf90&quot; \
+        &quot;CC = mpcc&quot; \
+        &quot;SFC = xlf90&quot; \
+        &quot;SCC = xlc&quot; \
+        &quot;FFLAGS = -qrealsize=8 -g -C &quot; \
+        &quot;CFLAGS = -g&quot; \
+        &quot;LDFLAGS = -g -C&quot; \
+        &quot;CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -D_MPI $(FILE_OFFSET)&quot; )
  
-#FC = mpif90
-#CC = mpicc
-#SFC = pgf90
-#SCC = pgcc
-#FFLAGS = -r8 -O3
-#CFLAGS = -O3
-#LDFLAGS = -O3
+pgi:
+        ( make all \
+        &quot;FC = mpif90&quot; \
+        &quot;CC = mpicc&quot; \
+        &quot;SFC = pgf90&quot; \
+        &quot;SCC = pgcc&quot; \
+        &quot;FFLAGS = -r8 -O3&quot; \
+        &quot;CFLAGS = -O3&quot; \
+        &quot;LDFLAGS = -O3&quot; \
+        &quot;CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -D_MPI -DUNDERSCORE $(FILE_OFFSET)&quot; )
 
-#ifort (for Intel Macs and Quad-Core AMD Opteron Clusters)
-#FC = mpif90
-#CC = gcc
-#SFC = ifort
-#SCC = gcc
-#FFLAGS = -real-size 64 -O3
-#CFLAGS = -O3 -m64
-#LDFLAGS = -O3
+ifort:
+        ( make all \
+        &quot;FC = mpif90&quot; \
+        &quot;CC = gcc&quot; \
+        &quot;SFC = ifort&quot; \
+        &quot;SCC = gcc&quot; \
+        &quot;FFLAGS = -real-size 64 -O3&quot; \
+        &quot;CFLAGS = -O3 -m64&quot; \
+        &quot;LDFLAGS = -O3&quot; \
+        &quot;CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -D_MPI -DUNDERSCORE -m64 $(FILE_OFFSET)&quot; )
 
-FC = mpif90
-CC = mpicc
-SFC = gfortran
-SCC = gcc
-FFLAGS = -O3 -m64 -ffree-line-length-none
-CFLAGS = -O3 -m64
-LDFLAGS = -O3 -m64
+gfortran:
+        ( make all \
+        &quot;FC = mpif90&quot; \
+        &quot;CC = mpicc&quot; \
+        &quot;SFC = gfortran&quot; \
+        &quot;SCC = gcc&quot; \
+        &quot;FFLAGS = -O3 -m64 -ffree-line-length-none&quot; \
+        &quot;CFLAGS = -O3 -m64&quot; \
+        &quot;LDFLAGS = -O3 -m64&quot; \
+        &quot;CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -D_MPI -DUNDERSCORE -m64 $(FILE_OFFSET)&quot; )
 
 
 
-CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -D_MPI -DUNDERSCORE -m64  # -DOFFSET64BIT 
-
 CPPINCLUDES = -I../inc -I$(NETCDF)/include
 FCINCLUDES = -I../inc -I$(NETCDF)/include
 LIBS = -L$(NETCDF)/lib -lnetcdf

</font>
</pre>