3
|
1 # |
|
2 # Makefile for octave's liboctave directory |
|
3 # |
|
4 # John W. Eaton |
1452
|
5 # jwe@bevo.che.wisc.edu |
|
6 # University of Wisconsin-Madison |
3
|
7 # Department of Chemical Engineering |
|
8 |
|
9 TOPDIR = .. |
|
10 |
|
11 srcdir = @srcdir@ |
411
|
12 top_srcdir = @top_srcdir@ |
3
|
13 VPATH = @srcdir@ |
|
14 |
|
15 include $(TOPDIR)/Makeconf |
|
16 |
651
|
17 INSTALL = @INSTALL@ |
|
18 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
19 INSTALL_DATA = @INSTALL_DATA@ |
|
20 |
1904
|
21 LIBOCTAVE_LFLAGS = -L../libcruft -L../readline -L../kpathsea \ |
|
22 -L../glob -L. $(RLD_FLAG) |
|
23 |
|
24 LIBOCTAVE_LIBS = -lcruft -lreadline -lkpathsea -lglob |
|
25 |
3665
|
26 MATRIX_INC := Array.h Array2.h Array3.h ArrayN.h DiagArray2.h Array-flags.h \ |
3702
|
27 Array-idx.h Array2-idx.h Array3-idx.h ArrayN-idx.h MArray-defs.h \ |
2919
|
28 MArray.h MArray2.h MDiagArray2.h Matrix.h \ |
|
29 base-lu.h mx-base.h mx-op-defs.h mx-defs.h mx-ext.h \ |
|
30 CColVector.h CDiagMatrix.h CMatrix.h CRowVector.h CmplxAEPBAL.h \ |
1990
|
31 CmplxCHOL.h CmplxDET.h CmplxHESS.h CmplxLU.h CmplxQR.h \ |
2829
|
32 CmplxQRP.h CmplxSCHUR.h CmplxSVD.h EIG.h boolMatrix.h chMatrix.h \ |
535
|
33 dColVector.h dDiagMatrix.h dMatrix.h dRowVector.h dbleAEPBAL.h \ |
3185
|
34 dbleCHOL.h dbleDET.h dbleHESS.h dbleLU.h dbleQR.h \ |
535
|
35 dbleQRP.h dbleSCHUR.h dbleSVD.h |
466
|
36 |
2829
|
37 MX_OP_INC := mx-cdm-cm.h mx-cdm-cs.h mx-cdm-dm.h mx-cdm-m.h \ |
|
38 mx-cdm-s.h mx-cm-cdm.h mx-cm-dm.h mx-cm-m.h mx-cm-s.h \ |
|
39 mx-cs-cdm.h mx-cs-dm.h mx-cs-m.h mx-dm-cdm.h mx-dm-cm.h \ |
|
40 mx-dm-cs.h mx-dm-m.h mx-dm-s.h mx-m-cdm.h mx-m-cm.h \ |
|
41 mx-m-cs.h mx-m-dm.h mx-s-cdm.h mx-s-cm.h mx-s-dm.h |
|
42 |
3582
|
43 VX_OP_INC := vx-ccv-s.h vx-crv-s.h vx-cs-cv.h vx-cs-rv.h vx-cv-cs.h \ |
|
44 vx-rv-cs.h vx-s-ccv.h vx-s-crv.h \ |
|
45 vx-rv-crv.h vx-cv-ccv.h vx-crv-rv.h vx-ccv-cv.h |
|
46 |
3042
|
47 INCLUDES := Bounds.h CollocWt.h DAE.h DAEFunc.h DASSL.h FEGrid.h \ |
1844
|
48 LinConst.h LP.h LPsolve.h LSODE.h NLConst.h NLEqn.h NLFunc.h \ |
3119
|
49 NLP.h ODE.h ODEFunc.h Objective.h QP.h Quad.h Range.h base-de.h \ |
|
50 base-min.h byte-swap.h cmd-edit.h cmd-hist.h data-conv.h \ |
3121
|
51 dir-ops.h file-ops.h file-stat.h getopt.h glob-match.h \ |
|
52 idx-vector.h lo-ieee.h lo-mappers.h lo-specfun.h lo-sysdep.h \ |
2926
|
53 lo-utils.h mach-info.h oct-alloc.h oct-cmplx.h oct-env.h \ |
3827
|
54 oct-fftw.h oct-getopt.h oct-group.h oct-kpse.h oct-passwd.h \ |
|
55 oct-rl-edit.h oct-rl-hist.h oct-shlib.h oct-syscalls.h oct-time.h \ |
|
56 pathlen.h pathsearch.h prog-args.h statdefs.h str-vec.h sun-utils.h \ |
3519
|
57 sysdir.h systime.h syswait.h \ |
2829
|
58 $(MATRIX_INC) \ |
3582
|
59 $(MX_OP_INC) \ |
|
60 $(VX_OP_INC) |
3
|
61 |
3665
|
62 TEMPLATE_SRC := Array.cc Array2.cc Array3.cc ArrayN.cc DiagArray2.cc \ |
1990
|
63 MArray.cc MArray2.cc MDiagArray2.cc base-lu.cc |
308
|
64 |
2493
|
65 TI_SRC := Array-C.cc Array-b.cc Array-ch.cc Array-i.cc Array-d.cc \ |
3665
|
66 Array-s.cc Array-str.cc Array-idx-vec.cc \ |
2844
|
67 MArray-C.cc MArray-ch.cc MArray-i.cc MArray-d.cc MArray-s.cc |
759
|
68 |
1904
|
69 MATRIX_SRC := Array-flags.cc CColVector.cc CDiagMatrix.cc CMatrix.cc \ |
1574
|
70 CRowVector.cc CmplxAEPBAL.cc CmplxCHOL.cc CmplxDET.cc \ |
|
71 CmplxHESS.cc CmplxLU.cc CmplxQR.cc CmplxQRP.cc CmplxSCHUR.cc \ |
2829
|
72 CmplxSVD.cc EIG.cc MArray-misc.cc boolMatrix.cc chMatrix.cc \ |
|
73 dColVector.cc dDiagMatrix.cc dMatrix.cc dRowVector.cc \ |
3185
|
74 dbleAEPBAL.cc dbleCHOL.cc dbleDET.cc dbleHESS.cc dbleLU.cc \ |
|
75 dbleQR.cc dbleQRP.cc dbleSCHUR.cc dbleSVD.cc |
2829
|
76 |
|
77 MX_OP_SRC := mx-cdm-cm.cc mx-cdm-cs.cc mx-cdm-dm.cc mx-cdm-m.cc \ |
|
78 mx-cdm-s.cc mx-cm-cdm.cc mx-cm-dm.cc mx-cm-m.cc mx-cm-s.cc \ |
|
79 mx-cs-cdm.cc mx-cs-dm.cc mx-cs-m.cc mx-dm-cdm.cc mx-dm-cm.cc \ |
|
80 mx-dm-cs.cc mx-dm-m.cc mx-dm-s.cc mx-m-cdm.cc mx-m-cm.cc \ |
|
81 mx-m-cs.cc mx-m-dm.cc mx-s-cdm.cc mx-s-cm.cc mx-s-dm.cc |
466
|
82 |
3582
|
83 VX_OP_SRC := vx-ccv-s.cc vx-crv-s.cc vx-cs-cv.cc vx-cs-rv.cc vx-cv-cs.cc \ |
|
84 vx-rv-cs.cc vx-s-ccv.cc vx-s-crv.cc \ |
|
85 vx-rv-crv.cc vx-cv-ccv.cc vx-crv-rv.cc vx-ccv-cv.cc |
|
86 |
3124
|
87 SOURCES := Bounds.cc CollocWt.cc DAE.cc DASSL.cc FEGrid.cc LinConst.cc \ |
|
88 LPsolve.cc LSODE.cc NLEqn.cc Quad.cc Range.cc cmd-edit.cc \ |
|
89 cmd-hist.cc data-conv.cc dir-ops.cc f2c-main.c file-ops.cc \ |
|
90 file-stat.cc filemode.c getopt.c getopt1.c glob-match.cc \ |
3613
|
91 idx-vector.cc lo-cutils.c lo-ieee.cc lo-mappers.cc lo-specfun.cc \ |
2926
|
92 lo-sysdep.cc lo-utils.cc mach-info.cc mkdir.c oct-alloc.cc \ |
3827
|
93 oct-env.cc oct-fftw.cc oct-getopt.c oct-group.cc oct-kpse.c \ |
|
94 oct-passwd.cc oct-rl-edit.c oct-rl-hist.c oct-shlib.cc \ |
|
95 oct-syscalls.cc oct-time.cc pathsearch.cc prog-args.cc rename.c \ |
|
96 rmdir.c strftime.c strptime.c str-vec.cc tempname.c tempnam.c \ |
1533
|
97 $(TEMPLATE_SRC) \ |
|
98 $(TI_SRC) \ |
2829
|
99 $(MATRIX_SRC) \ |
3582
|
100 $(MX_OP_SRC) \ |
|
101 $(VX_OP_SRC) |
3
|
102 |
1682
|
103 EXTRAS := mx-inlines.cc |
|
104 |
2941
|
105 INCLUDES_FOR_INSTALL := $(INCLUDES) $(TEMPLATE_SRC) $(EXTRAS) |
|
106 |
3141
|
107 DISTFILES := Makefile.in ChangeLog $(SOURCES) $(INCLUDES) $(EXTRAS) |
3
|
108 |
2624
|
109 ifeq ($(SHARED_LIBS), true) |
3206
|
110 BINDISTLIBS = liboctave/liboctave |
3209
|
111 BINDISTFILES = liboctave.$(SHLEXT_VER) |
2624
|
112 endif |
|
113 |
1767
|
114 MAKEDEPS_1 := $(patsubst %.cc, %.d, $(SOURCES)) |
|
115 MAKEDEPS := $(patsubst %.c, %.d, $(MAKEDEPS_1)) |
1682
|
116 |
1767
|
117 OBJECTS_1 := $(patsubst %.cc, %.o, $(SOURCES)) |
|
118 OBJECTS := $(patsubst %.c, %.o, $(OBJECTS_1)) |
3
|
119 |
1682
|
120 ifeq ($(SHARED_LIBS), true) |
|
121 ifdef CXXPICFLAG |
|
122 PICOBJ := $(addprefix pic/, $(OBJECTS)) |
|
123 else |
|
124 PICOBJ := $(OBJECTS) |
|
125 endif |
|
126 endif |
3
|
127 |
3141
|
128 all: libraries |
3
|
129 .PHONY: all |
|
130 |
3613
|
131 objects: $(OBJECTS) |
|
132 |
3206
|
133 stmp-pic: pic |
|
134 @if [ -f stmp-pic ]; then \ |
|
135 true; \ |
|
136 else \ |
|
137 echo "touch stmp-pic"; \ |
|
138 touch stmp-pic; \ |
|
139 fi |
|
140 |
3029
|
141 pic: |
|
142 @if [ -d pic ]; then \ |
|
143 true; \ |
2358
|
144 else \ |
3029
|
145 echo "mkdir pic"; \ |
|
146 mkdir pic; \ |
2358
|
147 fi |
1668
|
148 |
3029
|
149 ifeq ($(SHARED_LIBS), true) |
3034
|
150 ifeq ($(STATIC_LIBS), true) |
3615
|
151 libraries: liboctave.$(LIBEXT) liboctave.$(SHLEXT) |
3034
|
152 else |
|
153 libraries: liboctave.$(SHLEXT) |
|
154 endif |
3029
|
155 else |
3034
|
156 ifeq ($(STATIC_LIBS), true) |
3615
|
157 libraries: liboctave.$(LIBEXT) |
3034
|
158 else |
|
159 libraries: |
|
160 endif |
3029
|
161 endif |
|
162 .PHONY: libraries |
3
|
163 |
3615
|
164 liboctave.$(LIBEXT): $(OBJECTS) |
|
165 rm -f $@ |
3775
|
166 $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ |
3615
|
167 $(RANLIB) $@ |
|
168 |
3029
|
169 liboctave.$(SHLEXT): liboctave.$(SHLEXT_VER) |
3036
|
170 rm -f $@ |
|
171 $(LN_S) $< $@ |
3029
|
172 |
3036
|
173 liboctave.$(SHLEXT_VER): $(PICOBJ) |
3615
|
174 rm -f $@ |
3039
|
175 $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ |
1682
|
176 |
3206
|
177 $(PICOBJ): stmp-pic |
1773
|
178 |
3
|
179 check: all |
|
180 .PHONY: check |
|
181 |
2129
|
182 install: install-lib install-inc |
2128
|
183 .PHONY: install |
|
184 |
2811
|
185 install-strip: |
|
186 $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install |
|
187 .PHONY: install-strip |
|
188 |
2129
|
189 install-lib: |
3141
|
190 $(top_srcdir)/mkinstalldirs $(octlibdir) |
3034
|
191 if $(STATIC_LIBS); then \ |
3141
|
192 rm -f $(octlibdir)/liboctave.$(LIBEXT); \ |
|
193 $(INSTALL_DATA) liboctave.$(LIBEXT) \ |
|
194 $(octlibdir)/liboctave.$(LIBEXT); \ |
|
195 $(RANLIB) $(octlibdir)/liboctave.$(LIBEXT); \ |
3034
|
196 fi |
1682
|
197 if $(SHARED_LIBS); then \ |
3141
|
198 rm -f $(octlibdir)/liboctave.$(SHLEXT_VER); \ |
2993
|
199 $(INSTALL_PROGRAM) \ |
3141
|
200 liboctave.$(SHLEXT_VER) $(octlibdir)/liboctave.$(SHLEXT_VER); \ |
|
201 cd $(octlibdir); \ |
3029
|
202 rm -f liboctave.$(SHLEXT); \ |
|
203 $(LN_S) liboctave.$(SHLEXT_VER) liboctave.$(SHLEXT); \ |
1682
|
204 fi |
2129
|
205 .PHONY: install-lib |
2128
|
206 |
2129
|
207 install-inc: |
3597
|
208 $(top_srcdir)/mkinstalldirs $(octincludedir)/octave |
3029
|
209 for f in $(INCLUDES_FOR_INSTALL); do \ |
3597
|
210 rm -f $(octincludedir)/octave/$$f; \ |
|
211 $(INSTALL_DATA) $(srcdir)/$$f $(octincludedir)/octave/$$f; \ |
3
|
212 done |
2129
|
213 .PHONY: install-inc |
3
|
214 |
|
215 uninstall: |
3141
|
216 rm -f $(octlibdir)/liboctave.$(LIBEXT) |
|
217 rm -f $(octlibdir)/liboctave.$(SHLEXT) |
|
218 rm -f $(octlibdir)/liboctave.$(SHLEXT_VER) |
3597
|
219 for f in $(INCLUDES); do rm -f $(octincludedir)/octave/$$f; done |
3
|
220 .PHONY: uninstall |
|
221 |
|
222 tags: $(SOURCES) |
|
223 ctags $(SOURCES) |
|
224 |
|
225 TAGS: $(SOURCES) |
|
226 etags $(SOURCES) |
|
227 |
|
228 clean: |
3141
|
229 rm -f *.$(LIBEXT) *.o *.d pic/*.o |
|
230 -rmdir pic |
3206
|
231 rm -f stmp-pic |
3029
|
232 if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi |
3
|
233 .PHONY: clean |
|
234 |
|
235 mostlyclean: clean |
|
236 .PHONY: mostlyclean |
|
237 |
|
238 distclean: clean |
3141
|
239 rm -f Makefile so_locations |
3
|
240 .PHONY: distclean |
|
241 |
1391
|
242 maintainer-clean: distclean |
3029
|
243 rm -f tags TAGS |
1391
|
244 .PHONY: maintainer-clean |
3
|
245 |
|
246 dist: |
|
247 ln $(DISTFILES) ../`cat ../.fname`/liboctave |
|
248 .PHONY: dist |
|
249 |
2624
|
250 bin-dist: |
|
251 if [ -n "$(BINDISTFILES)" ]; then \ |
3029
|
252 ln $(BINDISTFILES) ../`cat ../.fname`/liboctave; \ |
2624
|
253 fi |
2686
|
254 if [ -n "$(BINDISTLIBS)" ]; then \ |
3029
|
255 echo $(BINDISTLIBS) >> ../`cat ../.fname`/LIBRARIES; \ |
2686
|
256 fi |
2624
|
257 .PHONY: bin-dist |
|
258 |
1393
|
259 ifndef omit_deps |
3141
|
260 -include $(MAKEDEPS) |
1319
|
261 endif |