]>
Commit | Line | Data |
---|---|---|
aa257456 JB |
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 | |
3 | @@ -27,11 +27,12 @@ | |
765d5b43 | 4 | |
aa257456 JB |
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 | |
765d5b43 | 7 | -all: libsrc/all \ |
aa257456 | 8 | +# but fortran objects are linked into C library, so must it be built first --q |
765d5b43 JB |
9 | +all: fortran/all \ |
10 | + libsrc/all \ | |
11 | ncdump/all \ | |
12 | ncgen/all \ | |
aa257456 JB |
13 | cxx/all \ |
14 | - fortran/all \ | |
15 | f90/all | |
16 | ||
17 | test: fortran/all \ | |
14de9d1a JB |
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 | |
21 | @@ -11,19 +11,19 @@ | |
22 | nctst.cpp ncvalues.cpp ncvalues.h netcdf.cpp netcdfcpp.h \ | |
23 | expected cxxdoc.tex cxxdoc.ps texinfo.tex netcdf.hh | |
765d5b43 JB |
24 | |
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 | |
31 | ||
14de9d1a JB |
32 | HEADER1 = netcdfcpp.h |
33 | HEADER2 = ncvalues.h | |
34 | HEADER3 = netcdf.hh | |
765d5b43 JB |
35 | |
36 | -libs = $(LIBRARY) $(ld_netcdf) $(LIBS) | |
37 | +libs = -L.libs -lnetcdf_c++ $(ld_netcdf) $(LIBS) | |
38 | ||
39 | purify = purify | |
40 | ||
41 | -LIB_OBJS = netcdf.o ncvalues.o | |
42 | +LIB_OBJS = netcdf.lo ncvalues.lo | |
43 | ||
44 | # a test program that uses some of the draft C++ interface | |
45 | prog = nctst | |
14de9d1a | 46 | @@ -33,16 +33,19 @@ |
765d5b43 JB |
47 | *.cps *.dvi *.fns \ |
48 | *.log *~ *.gs *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr | |
49 | ||
50 | -all: $(LIBRARY) $(prog) | |
51 | +all: $(LIBRARYL) $(prog) | |
52 | + | |
53 | +libnetcdf_c++.la: $(LIB_OBJS) | |
f1c8ff90 | 54 | + libtool --mode=link --tag=CXX $(CXX) -o libnetcdf_c++.la $(LIB_OBJS) $(LDFLAGS) -rpath $(LIBDIR) $(lib_netcdf) |
765d5b43 JB |
55 | |
56 | test: $(prog) FORCE | |
57 | ./$(prog) > test.out | |
58 | @cmp expected test.out && \ | |
59 | echo "*** C++ test successful ***" ; | |
60 | ||
14de9d1a JB |
61 | -install: $(LIBDIR)/$(LIBRARY) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)\ |
62 | +install: $(LIBRARYL) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)\ | |
63 | $(INCDIR)/$(HEADER3) | |
64 | - | |
f1c8ff90 | 65 | + libtool --mode=install install $(LIBRARYL) $(LIBDIR) |
765d5b43 | 66 | |
14de9d1a JB |
67 | uninstall: |
68 | -rm -f $(LIBDIR)/$(LIBRARY) | |
69 | @@ -50,7 +53,7 @@ | |
70 | -rm -f $(INCDIR)/$(HEADER2) | |
71 | -rm -f $(INCDIR)/$(HEADER3) | |
72 | ||
765d5b43 JB |
73 | -$(prog) : $(prog_objs) $(LIBRARY) $(lib_netcdf) |
74 | +$(prog) : $(prog_objs) $(LIBRARYL) $(lib_netcdf) | |
14de9d1a | 75 | $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs) |
765d5b43 | 76 | |
14de9d1a JB |
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 | |
765d5b43 JB |
81 | @@ -13,20 +13,20 @@ |
82 | ld_netcdf = $(LIBRARY) | |
83 | HEADER = netcdf.inc | |
84 | LIB_OBJS = \ | |
85 | - fort-attio.o \ | |
86 | - fort-control.o \ | |
87 | - fort-dim.o \ | |
88 | - fort-genatt.o \ | |
89 | - fort-geninq.o \ | |
90 | - fort-genvar.o \ | |
91 | - fort-lib.o \ | |
92 | - fort-misc.o \ | |
93 | - fort-v2compat.o \ | |
94 | - fort-vario.o \ | |
95 | - fort-var1io.o \ | |
96 | - fort-varaio.o \ | |
97 | - fort-varmio.o \ | |
98 | - fort-varsio.o | |
99 | + fort-attio.lo \ | |
100 | + fort-control.lo \ | |
101 | + fort-dim.lo \ | |
102 | + fort-genatt.lo \ | |
103 | + fort-geninq.lo \ | |
104 | + fort-genvar.lo \ | |
105 | + fort-lib.lo \ | |
106 | + fort-misc.lo \ | |
107 | + fort-v2compat.lo \ | |
108 | + fort-vario.lo \ | |
109 | + fort-var1io.lo \ | |
110 | + fort-varaio.lo \ | |
111 | + fort-varmio.lo \ | |
112 | + fort-varsio.lo | |
113 | # | |
114 | ||
115 | MANUAL = netcdf.3f | |
14de9d1a | 116 | @@ -69,7 +69,7 @@ |
765d5b43 JB |
117 | # |
118 | ||
119 | ||
120 | -all: $(LIBRARY) $(MANUAL) | |
121 | +all: $(LIB_OBJS) $(MANUAL) | |
122 | ||
123 | test: ftest FORCE | |
124 | ./ftest | |
14de9d1a JB |
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 | |
765d5b43 JB |
128 | @@ -7,7 +7,7 @@ |
129 | ||
130 | INCLUDES = -I. | |
131 | ||
132 | -LIBRARY = libnetcdf.a | |
133 | +LIBRARYL = libnetcdf.la | |
134 | ld_netcdf = -L. -lnetcdf | |
135 | ||
136 | HEADER = netcdf.h | |
137 | @@ -54,7 +54,23 @@ | |
138 | t_ncxx.c \ | |
139 | t_ncx.c | |
140 | ||
141 | -LIB_OBJS = $(LIB_CSRCS:.c=.o) | |
142 | +LIB_OBJS = $(LIB_CSRCS:.c=.lo) | |
143 | + | |
14de9d1a JB |
144 | +LIB_FOBJS = \ |
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 | |
765d5b43 JB |
159 | |
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 | |
14de9d1a | 162 | @@ -62,15 +78,19 @@ |
765d5b43 JB |
163 | DIST_GARBAGE = ncconfig.h |
164 | ||
165 | ||
166 | -all: $(LIBRARY) $(MANUAL) | |
167 | +all: $(LIBRARYL) $(MANUAL) | |
168 | ||
169 | check: full_test | |
170 | ||
171 | full_test: test_ncx test nctest | |
172 | ||
173 | -install: $(LIBDIR)/$(LIBRARY) \ | |
174 | +install: $(LIBRARYL) \ | |
175 | $(INCDIR)/$(HEADER) \ | |
176 | $(MANDIR)/man3/$(MANUAL) | |
177 | + libtool install $(LIBRARYL) $(LIBDIR) | |
14de9d1a | 178 | + |
765d5b43 | 179 | +libnetcdf.la: $(LIB_OBJS) |
40450268 | 180 | + libtool --mode=link --tag=CC $(CC) -o libnetcdf.la $(LIB_OBJS) $(LIB_FOBJS) $(LDFLAGS) -rpath $(LIBDIR) |
765d5b43 | 181 | |
14de9d1a JB |
182 | uninstall: |
183 | -rm -f $(LIBDIR)/$(LIBRARY) | |
184 | @@ -95,10 +115,10 @@ | |
765d5b43 JB |
185 | cmp test.nc test_nc.sav |
186 | @echo '*** Success ***' | |
187 | ||
188 | -nctest: $(LIBRARY) | |
189 | +nctest: $(LIBRARYL) | |
190 | (cd ../nctest ; make test) | |
191 | ||
192 | -nc_test: $(LIBRARY) | |
193 | +nc_test: $(LIBRARYL) | |
194 | (cd ../nc_test ; make test) | |
195 | ||
196 | ||
14de9d1a JB |
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 | |
200 | @@ -16,11 +16,11 @@ | |
765d5b43 JB |
201 | test0.cdl ncdump.1 Makefile |
202 | MANUAL = ncdump.1 | |
203 | ||
204 | -lib_netcdf = ../libsrc/libnetcdf.a | |
765d5b43 | 205 | +lib_netcdf = ../libsrc/libnetcdf.la |
14de9d1a JB |
206 | |
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) | |
765d5b43 | 210 | +ld_netcdf = -L../libsrc/.libs -lnetcdf |
14de9d1a | 211 | |
765d5b43 JB |
212 | OBJS = ncdump.o vardata.o dumplib.o |
213 | GARBAGE = $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl | |
14de9d1a JB |
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 | |
217 | @@ -15,10 +15,10 @@ | |
765d5b43 JB |
218 | ctest.c ctest ctest0.nc ctest1.cdl \ |
219 | ftest.f ftest ftest0.nc ftest1.cdl | |
220 | ||
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 | |
227 | ||
228 | PACKING_LIST = Makefile depend escapes.c generic.h \ | |
229 | ncgenyy.c ncgentab.c ncgentab.h \ | |
14de9d1a JB |
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 | |
765d5b43 JB |
233 | @@ -4,7 +4,7 @@ |
234 | # It should be processed by every execution of the that utility. | |
235 | ||
236 | .SUFFIXES: | |
14de9d1a JB |
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 | |
765d5b43 JB |
239 | |
240 | ||
241 | ################################################################################ | |
242 | @@ -13,11 +13,17 @@ | |
243 | .c.o: | |
244 | $(COMPILE.c) $< | |
245 | ||
246 | +.c.lo: | |
40450268 | 247 | + libtool --mode=compile --tag=CC $(COMPILE.c) $< |
765d5b43 JB |
248 | + |
249 | .c.i: | |
250 | $(CPP) $(CPPFLAGS) $< >$@ | |
251 | ||
14de9d1a | 252 | .cpp.o: |
765d5b43 JB |
253 | $(COMPILE.cxx) $< |
254 | + | |
14de9d1a | 255 | +.cpp.lo: |
f1c8ff90 | 256 | + libtool --mode=compile --tag=CXX $(COMPILE.cxx) $< |
765d5b43 JB |
257 | |
258 | # Not all FORTRAN compilers support C-preprocessing of *.F files; ergo, a | |
259 | # relatively complicated rule ensues. |