<p><b>duda</b> 2013-01-04 16:23:40 -0700 (Fri, 04 Jan 2013)</p><p>Modify logic to place the Fortran interface library for netCDF (-lnetcff) <br>
before the C library (-lnetcdf).<br>
<br>
<br>
M    Makefile<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/Makefile
===================================================================
--- trunk/mpas/Makefile        2013-01-04 22:38:06 UTC (rev 2375)
+++ trunk/mpas/Makefile        2013-01-04 23:23:40 UTC (rev 2376)
@@ -195,8 +195,15 @@
 
 CPPINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
 FCINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
-LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf -lnetcdf
+LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf
 
+NCLIB = -lnetcdf
+NCLIBF = -lnetcdff
+ifneq ($(wildcard $(NETCDF)/lib/libnetcdff.*), ) # CHECK FOR NETCDF4
+        LIBS += $(NCLIBF)
+endif # CHECK FOR NETCDF4
+LIBS += $(NCLIB)
+
 RM = rm -f
 CPP = cpp -C -P -traditional
 RANLIB = ranlib
@@ -277,9 +284,6 @@
         TAU_MESSAGE=&quot;TAU Hooks are off.&quot;
 endif
 
-ifneq ($(wildcard $(NETCDF)/lib/libnetcdff.*), ) # CHECK FOR NETCDF4
-        LIBS += -lnetcdff
-endif # CHECK FOR NETCDF4
 
 ####################################################
 # Section for adding external libraries and includes

</font>
</pre>