1 --- netcdf-3.5.1/src/Makefile.orig 2004-01-27 15:08:14.000000000 +0100
2 +++ netcdf-3.5.1/src/Makefile 2004-02-11 23:29:29.498007248 +0100
5 # I moved fortran to the bottom of the list, sometimes AIX make get's confused
6 # if the C library and the fortran library are built in the same second. - Ed
8 +# but fortran objects are linked into C library, so must it be built first --q
18 diff -Nur netcdf-3.5.0.orig/src/cxx/Makefile netcdf-3.5.0/src/cxx/Makefile
19 --- netcdf-3.5.0.orig/src/cxx/Makefile Wed May 12 21:38:30 1999
20 +++ netcdf-3.5.0/src/cxx/Makefile Wed Apr 4 23:16:55 2001
22 nctst.cpp ncvalues.cpp ncvalues.h netcdf.cpp netcdfcpp.h \
23 expected cxxdoc.tex cxxdoc.ps texinfo.tex netcdf.hh
25 -LIBRARY = libnetcdf_c++.a
26 -lib_netcdf = ../libsrc/libnetcdf.a
27 -ld_netcdf = -L../libsrc -lnetcdf
28 +LIBRARYL = libnetcdf_c++.la
29 +lib_netcdf = ../libsrc/libnetcdf.la
30 +ld_netcdf = -L../libsrc/.libs -lnetcdf
36 -libs = $(LIBRARY) $(ld_netcdf) $(LIBS)
37 +libs = -L.libs -lnetcdf_c++ $(ld_netcdf) $(LIBS)
41 -LIB_OBJS = netcdf.o ncvalues.o
42 +LIB_OBJS = netcdf.lo ncvalues.lo
44 # a test program that uses some of the draft C++ interface
48 *.log *~ *.gs *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr
50 -all: $(LIBRARY) $(prog)
51 +all: $(LIBRARYL) $(prog)
53 +libnetcdf_c++.la: $(LIB_OBJS)
54 + libtool --mode=link --tag=CXX $(CXX) -o libnetcdf_c++.la $(LIB_OBJS) $(LDFLAGS) -rpath $(LIBDIR) $(lib_netcdf)
58 @cmp expected test.out && \
59 echo "*** C++ test successful ***" ;
61 -install: $(LIBDIR)/$(LIBRARY) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)\
62 +install: $(LIBRARYL) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)\
65 + libtool --mode=install install $(LIBRARYL) $(LIBDIR)
68 -rm -f $(LIBDIR)/$(LIBRARY)
70 -rm -f $(INCDIR)/$(HEADER2)
71 -rm -f $(INCDIR)/$(HEADER3)
73 -$(prog) : $(prog_objs) $(LIBRARY) $(lib_netcdf)
74 +$(prog) : $(prog_objs) $(LIBRARYL) $(lib_netcdf)
75 $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs)
77 nctst_src: nctst.cpp netcdf.cpp ncvalues.cpp
78 diff -Nur netcdf-3.5.0.orig/src/fortran/Makefile netcdf-3.5.0/src/fortran/Makefile
79 --- netcdf-3.5.0.orig/src/fortran/Makefile Wed Feb 21 22:20:26 2001
80 +++ netcdf-3.5.0/src/fortran/Makefile Wed Apr 4 23:18:04 2001
82 ld_netcdf = $(LIBRARY)
120 -all: $(LIBRARY) $(MANUAL)
121 +all: $(LIB_OBJS) $(MANUAL)
125 diff -Nur netcdf-3.5.0.orig/src/libsrc/Makefile netcdf-3.5.0/src/libsrc/Makefile
126 --- netcdf-3.5.0.orig/src/libsrc/Makefile Fri Feb 25 16:14:14 2000
127 +++ netcdf-3.5.0/src/libsrc/Makefile Wed Apr 4 23:21:35 2001
132 -LIBRARY = libnetcdf.a
133 +LIBRARYL = libnetcdf.la
134 ld_netcdf = -L. -lnetcdf
141 -LIB_OBJS = $(LIB_CSRCS:.c=.o)
142 +LIB_OBJS = $(LIB_CSRCS:.c=.lo)
145 + ../fortran/fort-attio.lo \
146 + ../fortran/fort-control.lo \
147 + ../fortran/fort-dim.lo \
148 + ../fortran/fort-genatt.lo \
149 + ../fortran/fort-geninq.lo \
150 + ../fortran/fort-genvar.lo \
151 + ../fortran/fort-lib.lo \
152 + ../fortran/fort-misc.lo \
153 + ../fortran/fort-v2compat.lo \
154 + ../fortran/fort-vario.lo \
155 + ../fortran/fort-var1io.lo \
156 + ../fortran/fort-varaio.lo \
157 + ../fortran/fort-varmio.lo \
158 + ../fortran/fort-varsio.lo
160 GARBAGE = t_ncio.o t_ncio t_ncx.o t_ncx t_ncxx.o t_ncxx \
161 t_nc.o t_nc test.nc *.so
163 DIST_GARBAGE = ncconfig.h
166 -all: $(LIBRARY) $(MANUAL)
167 +all: $(LIBRARYL) $(MANUAL)
171 full_test: test_ncx test nctest
173 -install: $(LIBDIR)/$(LIBRARY) \
174 +install: $(LIBRARYL) \
175 $(INCDIR)/$(HEADER) \
176 $(MANDIR)/man3/$(MANUAL)
177 + libtool install $(LIBRARYL) $(LIBDIR)
179 +libnetcdf.la: $(LIB_OBJS)
180 + libtool --mode=link --tag=CC $(CC) -o libnetcdf.la $(LIB_OBJS) $(LIB_FOBJS) $(LDFLAGS) -rpath $(LIBDIR)
183 -rm -f $(LIBDIR)/$(LIBRARY)
185 cmp test.nc test_nc.sav
186 @echo '*** Success ***'
190 (cd ../nctest ; make test)
193 +nc_test: $(LIBRARYL)
194 (cd ../nc_test ; make test)
197 diff -Nur netcdf-3.5.0.orig/src/ncdump/Makefile netcdf-3.5.0/src/ncdump/Makefile
198 --- netcdf-3.5.0.orig/src/ncdump/Makefile Tue Mar 13 18:42:52 2001
199 +++ netcdf-3.5.0/src/ncdump/Makefile Wed Apr 4 23:22:41 2001
201 test0.cdl ncdump.1 Makefile
204 -lib_netcdf = ../libsrc/libnetcdf.a
205 +lib_netcdf = ../libsrc/libnetcdf.la
207 # Don't use "-L../libsrc -lnetcdf" in the following because that doesn't
208 # work on a CRAY T90 (sigh).
209 -ld_netcdf = $(lib_netcdf)
210 +ld_netcdf = -L../libsrc/.libs -lnetcdf
212 OBJS = ncdump.o vardata.o dumplib.o
213 GARBAGE = $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
214 diff -Nur netcdf-3.5.0.orig/src/ncgen/Makefile netcdf-3.5.0/src/ncgen/Makefile
215 --- netcdf-3.5.0.orig/src/ncgen/Makefile Tue Mar 13 18:42:53 2001
216 +++ netcdf-3.5.0/src/ncgen/Makefile Wed Apr 4 23:23:09 2001
218 ctest.c ctest ctest0.nc ctest1.cdl \
219 ftest.f ftest ftest0.nc ftest1.cdl
221 -lib_netcdf = ../libsrc/libnetcdf.a
222 +lib_netcdf = ../libsrc/libnetcdf.la
223 # Don't use "-L../libsrc -lnetcdf" in the following because that doesn't
224 # work on a CRAY T90 (sigh).
225 -ld_netcdf = $(lib_netcdf)
226 +ld_netcdf = -L../libsrc/.libs -lnetcdf
228 PACKING_LIST = Makefile depend escapes.c generic.h \
229 ncgenyy.c ncgentab.c ncgentab.h \
230 diff -Nur netcdf-3.5.0.orig/src/rules.make netcdf-3.5.0/src/rules.make
231 --- netcdf-3.5.0.orig/src/rules.make Mon Mar 12 23:31:55 2001
232 +++ netcdf-3.5.0/src/rules.make Wed Apr 4 23:24:06 2001
234 # It should be processed by every execution of the that utility.
237 -.SUFFIXES: .a .o .i .f .c .cpp .F .y .l .m4
238 +.SUFFIXES: .a .o .lo .i .f .c .cpp .F .y .l .m4
241 ################################################################################
247 + libtool --mode=compile --tag=CC $(COMPILE.c) $<
250 $(CPP) $(CPPFLAGS) $< >$@
256 + libtool --mode=compile --tag=CXX $(COMPILE.cxx) $<
258 # Not all FORTRAN compilers support C-preprocessing of *.F files; ergo, a
259 # relatively complicated rule ensues.