comparison src/Makefile.in @ 2:c0190df9885d

[project @ 1993-08-08 01:16:43 by jwe] Initial revision
author jwe
date Sun, 08 Aug 1993 01:16:43 +0000
parents
children c9d293a496cf
comparison
equal deleted inserted replaced
1:78fd87e624cb 2:c0190df9885d
1 #
2 # Makefile for octave's src directory
3 #
4 # John W. Eaton
5 # jwe@che.utexas.edu
6 # Department of Chemical Engineering
7 # The University of Texas at Austin
8
9 TOPDIR = ..
10
11 srcdir = @srcdir@
12 VPATH = @srcdir@
13
14 include $(TOPDIR)/Makeconf
15
16 srcdir = @srcdir@
17 VPATH = @srcdir@:@srcdir@/../bsd-math
18
19 # Can this be fixed?
20
21 INCFLAGS = -I. -I$(srcdir)/../liboctave -I$(srcdir)/../dld -I$(srcdir)/.. -I$(srcdir) -I$(TOPDIR)/liboctave -I$(TOPDIR)/dld -I$(TOPDIR)
22
23 LIBOBJS = @LIBOBJS@
24
25 # Cancel default rule for .c from .y and make .cc from .y instead.
26
27 %.c : %.y
28
29 %.cc : %.y
30 $(YACC) $(YFLAGS) $<
31 mv y.tab.c $(@F)
32
33 # Likewise for .c from .l.
34
35 %.c : %.l
36
37 %.cc : %.l
38 $(LEX) $(LFLAGS) $< > $(@F)
39
40 # Here is a rule for generating dependencies for .cc files:
41
42 %.d: %.cc
43 rm -f $@
44 if test "$(srcdir)" = "." ; then \
45 $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \
46 sed -e 's/$*\.o/& $@/g' > $@.tmp && \
47 mv $@.tmp $@ ; \
48 else \
49 $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \
50 sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp && \
51 mv $@.tmp $@ ; \
52 fi
53
54 INCLUDES = arith-ops.h builtins.h dynamic-ld.h error.h file-io.h \
55 g-builtins.h gripes.h help.h idx-vector.h input.h lex.h \
56 mappers.h missing-math.h octave.h octave-hist.h pager.h parse.h \
57 pr-output.h procstream.h sighandlers.h statdefs.h symtab.h \
58 sysdep.h t-builtins.h tree-base.h tree-const.h tree.h \
59 unwind-prot.h user-prefs.h utils.h variables.h version.h \
60 xdiv.h xpow.h SLStack.h Stack.h
61
62 SOURCES = arith-ops.cc builtins.cc dynamic-ld.cc error.cc file-io.cc \
63 g-builtins.cc gripes.cc help.cc idx-vector.cc input.cc lex.l \
64 mappers.cc octave.cc octave-hist.cc pager.cc parse.y \
65 pr-output.cc procstream.cc sighandlers.cc symtab.cc \
66 sysdep.cc t-builtins.cc tc-assign.cc tc-colloc.cc \
67 tc-dassl.cc tc-det.cc tc-eig.cc tc-extras.cc tc-fft.cc \
68 tc-fsolve.cc tc-fsqp.cc tc-hess.cc tc-ifft.cc tc-index.cc \
69 tc-inlines.cc tc-inv.cc tc-lpsolve.cc tc-lsode.cc tc-lu.cc \
70 tc-npsol.cc tc-qpsol.cc tc-qr.cc tc-quad.cc tc-rand.cc \
71 tc-schur.cc tc-svd.cc tree.cc tree-const.cc tree-plot.cc \
72 unwind-prot.cc user-prefs.cc utils.cc variables.cc xdiv.cc \
73 xpow.cc
74
75 DEP_SOURCES_1 = $(patsubst %.l, %.cc, $(SOURCES))
76 DEP_SOURCES = $(patsubst %.y, %.cc, $(DEP_SOURCES_1))
77 MAKEDEPS = $(patsubst %.cc, %.d, $(DEP_SOURCES))
78
79 DLD_OBJECTS = tc-colloc.o tc-dassl.o tc-det.o tc-eig.o \
80 tc-fft.o tc-fsolve.o tc-fsqp.o tc-hess.o tc-ifft.o tc-inv.o \
81 tc-lpsolve.o tc-lsode.o tc-lu.o tc-npsol.o tc-qpsol.o tc-qr.o \
82 tc-quad.o tc-rand.o tc-schur.o tc-svd.o
83
84 OBJECTS = arith-ops.o builtins.o error.o file-io.o g-builtins.o \
85 gripes.o help.o idx-vector.o input.o lex.o mappers.o \
86 octave.o octave-hist.o pager.o parse.o pr-output.o \
87 procstream.o sighandlers.o symtab.o sysdep.o t-builtins.o \
88 tc-assign.o tc-extras.o tc-index.o tree.o tree-const.o \
89 tree-plot.o unwind-prot.o user-prefs.o utils.o variables.o \
90 xdiv.o xpow.o \
91 @DYNAMIC_LD_OBJ@
92
93 OCTAVE_LIBS = ../liboctave.a ../libcruft.a ../libreadline.a @LIBDLD@
94
95 DISTFILES = Makefile.in parse.cc lex.cc y.tab.h \
96 $(INCLUDES) $(SOURCES)
97
98 all: octave
99 .PHONY: all
100
101 octave: $(DLD_OBJECTS) $(OBJECTS) $(OCTAVE_LIBS) $(LIBOBJS)
102 $(CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(ALL_LDFLAGS) -o octave \
103 $(OBJECTS) @DLD_OBJECTS@ \
104 $(OCTAVE_LIBS) \
105 $(LIBOBJS) \
106 $(FLIBS) $(LEXLIB) -ltermcap -lm -lg++
107
108 check: all
109 .PHONY: check
110
111 install: all
112 if test -d $(bindir) ; then true ; else $(TOPDIR)/mkpath $(bindir) ; fi
113 rm -f $(bindir)/octave
114 $(INSTALL) octave $(bindir)/octave-$(version)
115 ln $(bindir)/octave-$(version) $(bindir)/octave
116 .PHONY: install
117
118 uninstall:
119 rm -f $(bindir)/octave
120 .PHONY: uninstall
121
122 tags: $(SOURCES)
123 ctags $(SOURCES)
124
125 TAGS: $(SOURCES)
126 etags $(SOURCES)
127
128 clean:
129 rm -f *.a *.o
130 .PHONY: clean
131
132 mostlyclean:
133 rm -f *.o
134 .PHONY: mostlyclean
135
136 distclean: clean
137 rm -f Makefile octave .fname *.d
138 .PHONY: distclean
139
140 realclean: distclean
141 rm -f tags TAGS y.tab.c y.tab.h yy.lex.c lex.cc parse.cc *.d
142 .PHONY: realclean
143
144 local-dist: parse.cc lex.cc
145 ln $(DISTFILES) ../`cat ../.fname`/src
146 rm -f parse.cc lex.cc y.tab.h
147 .PHONY: local-dist
148
149 dist: parse.cc lex.cc
150 ln $(DISTFILES) ../`cat ../.fname`/src
151 rm -f parse.cc lex.cc y.tab.h
152 .PHONY: dist
153
154 # Special rules -- these files need special things to be defined.
155
156 utils.o:
157 $(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) \
158 -DOCTAVE_HOME=\"$(prefix)\" \
159 -DDEFAULT_PAGER=\"$(DEFAULT_PAGER)\" \
160 $(srcdir)/utils.cc
161
162 y.tab.h: parse.cc
163
164 include $(MAKEDEPS)