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