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 \ |
|
28 MArray.h MArray2.h MDiagArray2.h \ |
1990
|
29 Matrix.h base-lu.h mx-base.h mx-defs.h mx-ext.h CColVector.h \ |
|
30 CDiagMatrix.h CMatrix.h CRowVector.h CmplxAEPBAL.h \ |
|
31 CmplxCHOL.h CmplxDET.h CmplxHESS.h CmplxLU.h CmplxQR.h \ |
|
32 CmplxQRP.h CmplxSCHUR.h CmplxSVD.h EIG.h chMatrix.h \ |
535
|
33 dColVector.h dDiagMatrix.h dMatrix.h dRowVector.h dbleAEPBAL.h \ |
|
34 dbleCHOL.h dbleDET.h dbleGEPBAL.h dbleHESS.h dbleLU.h dbleQR.h \ |
|
35 dbleQRP.h dbleSCHUR.h dbleSVD.h |
466
|
36 |
1844
|
37 INCLUDES := Bounds.h CollocWt.h DAE.h DAEFunc.h DASSL.h FEGrid.h FSQP.h \ |
|
38 LinConst.h LP.h LPsolve.h LSODE.h NLConst.h NLEqn.h NLFunc.h \ |
|
39 NLP.h NPSOL.h ODE.h ODEFunc.h Objective.h QP.h QPSOL.h Quad.h \ |
1961
|
40 Range.h base-de.h base-min.h byte-swap.h cmd-hist.h data-conv.h \ |
1968
|
41 dir-ops.h file-ops.h float-fmt.h f77-fcn.h getopt.h \ |
|
42 idx-vector.h lo-error.h lo-ieee.h lo-mappers.h lo-utils.h \ |
|
43 oct-cmplx.h oct-glob.h oct-math.h oct-term.h pathsearch.h \ |
|
44 prog-args.h statdefs.h str-vec.h sun-utils.h sysdir.h \ |
|
45 $(MATRIX_INC) |
3
|
46 |
1990
|
47 TEMPLATE_SRC := Array.cc Array2.cc Array3.cc DiagArray2.cc \ |
|
48 MArray.cc MArray2.cc MDiagArray2.cc base-lu.cc |
308
|
49 |
1687
|
50 TI_SRC := Array-C.cc Array-ch.cc Array-i.cc Array-d.cc Array-s.cc \ |
1758
|
51 Array-str.cc \ |
|
52 MArray-C.cc MArray-ch.cc MArray-i.cc MArray-d.cc MArray-s.cc |
759
|
53 |
1904
|
54 MATRIX_SRC := Array-flags.cc CColVector.cc CDiagMatrix.cc CMatrix.cc \ |
1574
|
55 CRowVector.cc CmplxAEPBAL.cc CmplxCHOL.cc CmplxDET.cc \ |
|
56 CmplxHESS.cc CmplxLU.cc CmplxQR.cc CmplxQRP.cc CmplxSCHUR.cc \ |
1687
|
57 CmplxSVD.cc EIG.cc chMatrix.cc dColVector.cc dDiagMatrix.cc \ |
1574
|
58 dMatrix.cc dRowVector.cc dbleAEPBAL.cc dbleCHOL.cc \ |
|
59 dbleDET.cc dbleGEPBAL.cc dbleHESS.cc dbleLU.cc dbleQR.cc \ |
|
60 dbleQRP.cc dbleSCHUR.cc dbleSVD.cc |
466
|
61 |
1844
|
62 SOURCES := Bounds.cc CollocWt.cc DAE.cc DASSL.cc FEGrid.cc FSQP.cc \ |
|
63 LinConst.cc LPsolve.cc LSODE.cc NLEqn.cc NPSOL.cc QPSOL.cc \ |
|
64 Quad.cc Range.cc acosh.c asinh.c atanh.c cmd-hist.cc \ |
1961
|
65 data-conv.cc dir-ops.cc erf.c erfc.c f77-fcn.c file-ops.cc \ |
|
66 filemode.c float-fmt.cc gamma.c getopt.c getopt1.c \ |
1968
|
67 idx-vector.cc lgamma.c lo-ieee.cc lo-mappers.cc lo-utils.cc \ |
|
68 mkdir.c oct-glob.cc oct-term.cc pathsearch.cc prog-args.cc \ |
|
69 rename.c rmdir.c str-vec.cc sun-utils.cc tempname.c tempnam.c \ |
1533
|
70 $(TEMPLATE_SRC) \ |
|
71 $(TI_SRC) \ |
|
72 $(MATRIX_SRC) |
3
|
73 |
1682
|
74 EXTRAS := mx-inlines.cc |
|
75 |
1773
|
76 DISTFILES := Makefile.in safe-xstat.cin safe-xstat.hin \ |
|
77 $(SOURCES) $(INCLUDES) $(EXTRAS) |
3
|
78 |
1767
|
79 MAKEDEPS_1 := $(patsubst %.cc, %.d, $(SOURCES)) |
|
80 MAKEDEPS := $(patsubst %.c, %.d, $(MAKEDEPS_1)) |
1682
|
81 |
1767
|
82 OBJECTS_1 := $(patsubst %.cc, %.o, $(SOURCES)) |
|
83 OBJECTS := $(patsubst %.c, %.o, $(OBJECTS_1)) |
3
|
84 |
1682
|
85 ifeq ($(SHARED_LIBS), true) |
|
86 ifdef CXXPICFLAG |
|
87 PICOBJ := $(addprefix pic/, $(OBJECTS)) |
|
88 else |
|
89 PICOBJ := $(OBJECTS) |
|
90 endif |
|
91 endif |
3
|
92 |
759
|
93 LIBOCTAVE_DEPEND := $(patsubst %, liboctave.a(%), $(OBJECTS)) |
3
|
94 |
2055
|
95 all: stamp-prereq stamp-picdir liboctave.a stamp-shared |
3
|
96 .PHONY: all |
|
97 |
2055
|
98 stamp-prereq: safe-stat.h safe-lstat.h |
|
99 touch stamp-prereq |
|
100 |
1668
|
101 stamp-picdir: |
1682
|
102 if [ -n "$(CXXPICFLAG)" ]; then \ |
1668
|
103 if [ -d pic ]; then true; else mkdir pic ; fi ; \ |
|
104 else true; fi |
|
105 touch stamp-picdir |
|
106 |
759
|
107 liboctave.a: $(OBJECTS) |
|
108 $(AR) $(ARFLAGS) liboctave.a $(OBJECTS) |
|
109 $(RANLIB) liboctave.a |
3
|
110 |
1830
|
111 stamp-shared: $(PICOBJ) |
1682
|
112 if $(SHARED_LIBS); then \ |
|
113 $(CXX) -shared -o liboctave.$(SHLEXT) $(PICOBJ) \ |
1904
|
114 $(LIBOCTAVE_LFLAGS) $(LIBOCTAVE_LIBS); \ |
1682
|
115 else true; fi |
|
116 touch stamp-shared |
|
117 |
1773
|
118 extract_stat = sed 's/@l@//g; s/@L@//g; /@LSTAT_ONLY@/d' |
|
119 extract_lstat = sed 's/@l@/l/g; s/@L@/L/g; s/ *@LSTAT_ONLY@//' |
|
120 |
|
121 safe-lstat.c: safe-xstat.cin |
|
122 @echo "making $@ from $<" |
|
123 @$(extract_lstat) $< > $@.tmp |
|
124 @$(top_srcdir)/move-if-change $@.tmp $@ |
|
125 |
|
126 safe-lstat.h: safe-xstat.hin |
|
127 @echo "making $@ from $<" |
|
128 @$(extract_lstat) $< > $@.tmp |
|
129 @$(top_srcdir)/move-if-change $@.tmp $@ |
|
130 |
|
131 safe-stat.c: safe-xstat.cin |
|
132 @echo "making $@ from $<" |
|
133 @$(extract_stat) $< > $@.tmp |
|
134 @$(top_srcdir)/move-if-change $@.tmp $@ |
|
135 |
|
136 safe-stat.h: safe-xstat.hin |
|
137 @echo "making $@ from $<" |
|
138 @$(extract_stat) $< > $@.tmp |
|
139 @$(top_srcdir)/move-if-change $@.tmp $@ |
|
140 |
|
141 safe-stat.o: safe-stat.h |
|
142 safe-lstat.o: safe-lstat.h safe-stat.h |
|
143 |
3
|
144 check: all |
|
145 .PHONY: check |
|
146 |
|
147 install: all |
810
|
148 $(top_srcdir)/mkinstalldirs $(libdir) $(includedir) |
3
|
149 rm -f $(libdir)/liboctave.a |
759
|
150 $(INSTALL_DATA) liboctave.a $(libdir)/liboctave.a |
3
|
151 $(RANLIB) $(libdir)/liboctave.a |
1682
|
152 if $(SHARED_LIBS); then \ |
|
153 rm -f $(libdir)/liboctave.$(SHLEXT); \ |
|
154 $(INSTALL_DATA) liboctave.$(SHLEXT) $(libdir)/liboctave.$(SHLEXT); \ |
|
155 fi |
308
|
156 for f in $(INCLUDES) $(TEMPLATE_SRC) ; do \ |
3
|
157 rm -f $(includedir)/$$f ; \ |
|
158 $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/$$f ; \ |
|
159 done |
1980
|
160 linkdir=`echo $(includedir) | sed 's/-$(version)$$//'` ; \ |
|
161 if [ "$$linkdir" = $(includedir) ] ; then \ |
|
162 true ; \ |
|
163 else \ |
1982
|
164 if [ -d $$linkdir ] ; then \ |
|
165 mv $$linkdir $$linkdir.old ; \ |
|
166 else \ |
|
167 rm -f $$linkdir ; \ |
|
168 fi ; \ |
|
169 $(LN_S) $(includedir) $$linkdir ; \ |
|
170 fi |
3
|
171 .PHONY: install |
|
172 |
|
173 uninstall: |
|
174 rm -f $(libdir)/liboctave.a |
|
175 for f in $(INCLUDES) ; do rm -f $(includedir)/$$f ; done |
|
176 .PHONY: uninstall |
|
177 |
|
178 tags: $(SOURCES) |
|
179 ctags $(SOURCES) |
|
180 |
|
181 TAGS: $(SOURCES) |
|
182 etags $(SOURCES) |
|
183 |
|
184 clean: |
1773
|
185 rm -f safe-stat.h safe-lstat.h *.a *.o *.d pic/*.o |
1717
|
186 if $(SHARED_LIBS); then rm -f *.$(SHLEXT); fi |
3
|
187 .PHONY: clean |
|
188 |
|
189 mostlyclean: clean |
|
190 .PHONY: mostlyclean |
|
191 |
|
192 distclean: clean |
2055
|
193 rm -f Makefile so_locations stamp-picdir stamp-shared stamp-prereq |
2053
|
194 -rmdir pic |
3
|
195 .PHONY: distclean |
|
196 |
1391
|
197 maintainer-clean: distclean |
2055
|
198 rm -f tags TAGS stamp-picdir stamp-shared stamp-prereq |
2053
|
199 -rmdir pic |
1391
|
200 .PHONY: maintainer-clean |
3
|
201 |
|
202 local-dist: |
|
203 ln $(DISTFILES) ../`cat ../.fname`/liboctave |
|
204 .PHONY: local-dist |
|
205 |
|
206 dist: |
|
207 ln $(DISTFILES) ../`cat ../.fname`/liboctave |
|
208 .PHONY: dist |
|
209 |
2055
|
210 # If missing, GNU make attempts to create them in the reverse of the |
|
211 # order in which they are listed here. We rely on that fact to ensure |
|
212 # that the safe-stat.h and safe-lstat.h files are created before trying |
|
213 # to create the .d files. Hmm. I wonder if we can count on that... |
|
214 |
1393
|
215 ifndef omit_deps |
2055
|
216 -include $(MAKEDEPS) stamp-prereq |
1319
|
217 endif |