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 |
1990
|
26 MATRIX_INC := Array.h Array2.h Array3.h DiagArray2.h Array-flags.h \ |
2013
|
27 Array-idx.h Array2-idx.h Array3-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 \ |
3519
|
54 oct-getopt.h oct-group.h oct-kpse.h oct-passwd.h oct-rl-edit.h \ |
|
55 oct-rl-hist.h oct-shlib.h oct-syscalls.h oct-time.h pathlen.h \ |
|
56 pathsearch.h prog-args.h statdefs.h str-vec.h sun-utils.h \ |
|
57 sysdir.h systime.h syswait.h \ |
2829
|
58 $(MATRIX_INC) \ |
3582
|
59 $(MX_OP_INC) \ |
|
60 $(VX_OP_INC) |
3
|
61 |
1990
|
62 TEMPLATE_SRC := Array.cc Array2.cc Array3.cc DiagArray2.cc \ |
|
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 \ |
|
66 Array-s.cc Array-str.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 \ |
|
91 idx-vector.cc 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 \ |
3505
|
93 oct-env.cc oct-getopt.c oct-group.cc oct-kpse.c oct-passwd.cc \ |
3519
|
94 oct-rl-edit.c oct-rl-hist.c oct-shlib.cc oct-syscalls.cc \ |
|
95 oct-time.cc pathsearch.cc prog-args.cc rename.c rmdir.c \ |
|
96 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 |
3206
|
131 stmp-pic: pic |
|
132 @if [ -f stmp-pic ]; then \ |
|
133 true; \ |
|
134 else \ |
|
135 echo "touch stmp-pic"; \ |
|
136 touch stmp-pic; \ |
|
137 fi |
|
138 |
3029
|
139 pic: |
|
140 @if [ -d pic ]; then \ |
|
141 true; \ |
2358
|
142 else \ |
3029
|
143 echo "mkdir pic"; \ |
|
144 mkdir pic; \ |
2358
|
145 fi |
1668
|
146 |
3029
|
147 ifeq ($(SHARED_LIBS), true) |
3034
|
148 ifeq ($(STATIC_LIBS), true) |
3238
|
149 libraries: liboctave.$(LIBEXT)($(OBJECTS)) liboctave.$(SHLEXT) |
3034
|
150 else |
|
151 libraries: liboctave.$(SHLEXT) |
|
152 endif |
3029
|
153 else |
3034
|
154 ifeq ($(STATIC_LIBS), true) |
3238
|
155 libraries: liboctave.$(LIBEXT)($(OBJECTS)) |
3034
|
156 else |
|
157 libraries: |
|
158 endif |
3029
|
159 endif |
|
160 .PHONY: libraries |
3
|
161 |
3029
|
162 liboctave.$(SHLEXT): liboctave.$(SHLEXT_VER) |
3036
|
163 rm -f $@ |
|
164 $(LN_S) $< $@ |
3029
|
165 |
3036
|
166 liboctave.$(SHLEXT_VER): $(PICOBJ) |
3039
|
167 $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ |
1682
|
168 |
3206
|
169 $(PICOBJ): stmp-pic |
1773
|
170 |
3
|
171 check: all |
|
172 .PHONY: check |
|
173 |
2129
|
174 install: install-lib install-inc |
2128
|
175 .PHONY: install |
|
176 |
2811
|
177 install-strip: |
|
178 $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install |
|
179 .PHONY: install-strip |
|
180 |
2129
|
181 install-lib: |
3141
|
182 $(top_srcdir)/mkinstalldirs $(octlibdir) |
3034
|
183 if $(STATIC_LIBS); then \ |
3141
|
184 rm -f $(octlibdir)/liboctave.$(LIBEXT); \ |
|
185 $(INSTALL_DATA) liboctave.$(LIBEXT) \ |
|
186 $(octlibdir)/liboctave.$(LIBEXT); \ |
|
187 $(RANLIB) $(octlibdir)/liboctave.$(LIBEXT); \ |
3034
|
188 fi |
1682
|
189 if $(SHARED_LIBS); then \ |
3141
|
190 rm -f $(octlibdir)/liboctave.$(SHLEXT_VER); \ |
2993
|
191 $(INSTALL_PROGRAM) \ |
3141
|
192 liboctave.$(SHLEXT_VER) $(octlibdir)/liboctave.$(SHLEXT_VER); \ |
|
193 cd $(octlibdir); \ |
3029
|
194 rm -f liboctave.$(SHLEXT); \ |
|
195 $(LN_S) liboctave.$(SHLEXT_VER) liboctave.$(SHLEXT); \ |
1682
|
196 fi |
3141
|
197 $(mk-libdir-link) |
2129
|
198 .PHONY: install-lib |
2128
|
199 |
2129
|
200 install-inc: |
3597
|
201 $(top_srcdir)/mkinstalldirs $(octincludedir)/octave |
3029
|
202 for f in $(INCLUDES_FOR_INSTALL); do \ |
3597
|
203 rm -f $(octincludedir)/octave/$$f; \ |
|
204 $(INSTALL_DATA) $(srcdir)/$$f $(octincludedir)/octave/$$f; \ |
3
|
205 done |
2993
|
206 $(mk-includedir-link) |
2129
|
207 .PHONY: install-inc |
3
|
208 |
|
209 uninstall: |
3141
|
210 rm -f $(octlibdir)/liboctave.$(LIBEXT) |
|
211 rm -f $(octlibdir)/liboctave.$(SHLEXT) |
|
212 rm -f $(octlibdir)/liboctave.$(SHLEXT_VER) |
3597
|
213 for f in $(INCLUDES); do rm -f $(octincludedir)/octave/$$f; done |
3
|
214 .PHONY: uninstall |
|
215 |
|
216 tags: $(SOURCES) |
|
217 ctags $(SOURCES) |
|
218 |
|
219 TAGS: $(SOURCES) |
|
220 etags $(SOURCES) |
|
221 |
|
222 clean: |
3141
|
223 rm -f *.$(LIBEXT) *.o *.d pic/*.o |
|
224 -rmdir pic |
3206
|
225 rm -f stmp-pic |
3029
|
226 if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi |
3
|
227 .PHONY: clean |
|
228 |
|
229 mostlyclean: clean |
|
230 .PHONY: mostlyclean |
|
231 |
|
232 distclean: clean |
3141
|
233 rm -f Makefile so_locations |
3
|
234 .PHONY: distclean |
|
235 |
1391
|
236 maintainer-clean: distclean |
3029
|
237 rm -f tags TAGS |
1391
|
238 .PHONY: maintainer-clean |
3
|
239 |
|
240 dist: |
|
241 ln $(DISTFILES) ../`cat ../.fname`/liboctave |
|
242 .PHONY: dist |
|
243 |
2624
|
244 bin-dist: |
|
245 if [ -n "$(BINDISTFILES)" ]; then \ |
3029
|
246 ln $(BINDISTFILES) ../`cat ../.fname`/liboctave; \ |
2624
|
247 fi |
2686
|
248 if [ -n "$(BINDISTLIBS)" ]; then \ |
3029
|
249 echo $(BINDISTLIBS) >> ../`cat ../.fname`/LIBRARIES; \ |
2686
|
250 fi |
2624
|
251 .PHONY: bin-dist |
|
252 |
1393
|
253 ifndef omit_deps |
3141
|
254 -include $(MAKEDEPS) |
1319
|
255 endif |