[Dart-dev] [4270] DART/trunk/mkmf/mkmf.template.gfortran: Some of our URL lines are getting expanded to be longer than the default

nancy at ucar.edu nancy at ucar.edu
Fri Feb 12 12:58:02 MST 2010


Revision: 4270
Author:   nancy
Date:     2010-02-12 12:58:02 -0700 (Fri, 12 Feb 2010)
Log Message:
-----------
Some of our URL lines are getting expanded to be longer than the default
line length limit of 132 chars.  This flag makes it compile again.  The
longer term plan is to start using the Id tag instead of the URL, but
this should be a short-term fix for now.  Also, I have needed to compile
with -lnetcdff as well as -lnetcdf on several platforms, so i'm adding
in the extra flag here to help people get linked.  Recent versions of the
netcdf libs are building the f90 interfaces in a separate library.

Modified Paths:
--------------
    DART/trunk/mkmf/mkmf.template.gfortran

-------------- next part --------------
Modified: DART/trunk/mkmf/mkmf.template.gfortran
===================================================================
--- DART/trunk/mkmf/mkmf.template.gfortran	2010-02-09 21:25:02 UTC (rev 4269)
+++ DART/trunk/mkmf/mkmf.template.gfortran	2010-02-12 19:58:02 UTC (rev 4270)
@@ -65,6 +65,14 @@
 #
 # -fdefault-real-8     force all real variables to be real*8.
 #
+# Comment about netcdf libraries:
+#  We call NetCDF from Fortran 90, so we need the fortran interface
+#  library.  In some versions of netcdf (e.g. 4.x), the fortran
+#  interfaces are built in a separate library (-lnetcdff) and the
+#  rest of the netcdf functions are in -lnetcdf.  If you get a link
+#  error with the flags below, try removing -lnetcdff, or find out
+#  where the fortran 90 interfaces live in the netcdf distribution
+#  on your system and change the LIBS variable below to match.
 # 
 
 MPIFC = mpif90
@@ -73,7 +81,7 @@
 LD = gfortran
 NETCDF = /usr/local
 INCS = -I${NETCDF}/include
-FFLAGS = -O2 $(INCS) 
-LIBS = -L${NETCDF}/lib -lnetcdf
+FFLAGS = -O2 $(INCS) -ffree-line-length-none
+LIBS = -L${NETCDF}/lib -lnetcdff -lnetcdf
 LDFLAGS = $(FFLAGS) $(LIBS)
 


More information about the Dart-dev mailing list