860
|
1 # @configure_input@ |
5
|
2 # |
|
3 # Common configuration rules for all of octave's Makefiles. |
|
4 # |
|
5 # John W. Eaton |
|
6 # jwe@che.utexas.edu |
|
7 # Department of Chemical Engineering |
|
8 # The University of Texas at Austin |
|
9 |
|
10 SHELL = /bin/sh |
|
11 |
|
12 #### Start of system configuration section. #### |
|
13 |
|
14 LEX = @LEX@ |
|
15 LFLAGS = @LFLAGS@ |
|
16 LEXLIB = @LEXLIB@ |
|
17 |
|
18 YACC = @YACC@ |
|
19 YFLAGS = -dv |
|
20 |
|
21 RANLIB = @RANLIB@ |
|
22 |
|
23 RUNTEST = @RUNTEST@ |
|
24 |
|
25 DEFAULT_PAGER = @DEFAULT_PAGER@ |
|
26 |
702
|
27 WITH_DLD = @use_dld@ |
|
28 |
|
29 OCTAVE_LITE = @lite_kernel@ |
|
30 |
5
|
31 # Fortran to C translator and associated flags. |
|
32 |
|
33 F2C = @F2C@ |
|
34 F2CFLAGS = @F2CFLAGS@ |
|
35 |
|
36 # Fortran compiler flags. |
|
37 |
798
|
38 F77 = @F77@ |
5
|
39 FFLAGS = @FFLAGS@ |
|
40 |
|
41 # cc and associated flags. |
|
42 |
236
|
43 # Clean up INCFLAGS a bit if we are not compiling in a separate |
|
44 # directory. |
|
45 ifeq ($(srcdir),.) |
507
|
46 TMP_IF_1 = -I. -I../src |
236
|
47 else |
507
|
48 TMP_IF_1 = -I. -I$(srcdir) -I../src |
236
|
49 endif |
404
|
50 ifeq ($(TOPDIR),$(top_srcdir)) |
507
|
51 TMP_IF_2 = -I$(TOPDIR) -I$(TOPDIR)/liboctave -I$(TOPDIR)/src |
236
|
52 else |
507
|
53 TMP_IF_2 = -I$(TOPDIR) -I$(TOPDIR)/liboctave -I$(TOPDIR)/src \ |
|
54 -I$(top_srcdir) -I$(top_srcdir)/liboctave -I$(top_srcdir)/src |
236
|
55 endif |
|
56 INCFLAGS = $(TMP_IF_1) $(TMP_IF_2) |
|
57 |
5
|
58 LIBFLAGS = -L$(TOPDIR) |
236
|
59 |
5
|
60 DEFS = @DEFS@ |
236
|
61 UGLY_DEFS = @UGLY_DEFS@ |
5
|
62 |
|
63 CC = @CC@ |
|
64 CFLAGS = @CFLAGS@ |
325
|
65 GCC_IEEE_FP_FLAG = @GCC_IEEE_FP_FLAG@ |
|
66 ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS) |
|
67 UGLY_ALL_CFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS) |
798
|
68 BUG_CFLAGS = $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS) |
|
69 |
5
|
70 |
198
|
71 CXX = @CXX@ |
518
|
72 CXXCPP = @CXXCPP@ |
198
|
73 CXXFLAGS = @CXXFLAGS@ |
759
|
74 NO_IMPLICIT_TEMPLATES = @NO_IMPLICIT_TEMPLATES@ |
|
75 ALL_CXXFLAGS = $(INCFLAGS) $(DEFS) $(NO_IMPLICIT_TEMPLATES) \ |
325
|
76 $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) |
759
|
77 UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(NO_IMPLICIT_TEMPLATES) \ |
325
|
78 $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) |
798
|
79 BUG_CXXFLAGS = $(DEFS) $(NO_IMPLICIT_TEMPLATES) $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) |
5
|
80 |
858
|
81 CPPFLAGS = @CPPFLAGS@ |
|
82 |
5
|
83 LDFLAGS = @LDFLAGS@ |
708
|
84 LD_STATIC_FLAG = @LD_STATIC_FLAG@ |
|
85 ALL_LDFLAGS = $(LIBFLAGS) $(GCC_IEEE_FP_FLAG) $(LD_STATIC_FLAG) $(LDFLAGS) |
5
|
86 |
|
87 FLIBS = @FLIBS@ |
708
|
88 FLIB_LIST = @FLIB_LIST@ |
|
89 FLIB_PATH = @FLIB_PATH@ |
|
90 |
|
91 CXXLIBS = @CXXLIBS@ |
|
92 CXXLIB_LIST = @CXXLIB_LIST@ |
|
93 CXXLIB_PATH = @CXXLIB_PATH@ |
|
94 |
5
|
95 |
|
96 # A shell command to extract the version number from version.h. |
451
|
97 getversion = sed -e '/version_string/!d' -e 's/.*"\(.*\)".*/\1/' -e q |
5
|
98 |
|
99 # The version number. TOPDIR is something like `.' or `..' or `../..' |
|
100 # and gets us back up to the top level of the source tree. |
727
|
101 version := $(shell $(getversion) $(srcdir)/$(TOPDIR)/src/version.h) |
5
|
102 |
666
|
103 # ==================== Where To Install Things ==================== |
5
|
104 |
666
|
105 # The default location for installation. Everything is placed in |
|
106 # subdirectories of this directory. The default values for many of |
|
107 # the variables below are expressed in terms of this one, so you may |
|
108 # not need to change them. This defaults to /usr/local. |
|
109 prefix = @prefix@ |
5
|
110 |
666
|
111 # Like `prefix', but used for architecture-specific files. |
|
112 exec_prefix = @exec_prefix@ |
|
113 |
|
114 # Where to install Octave and other binaries that people will want to |
|
115 # run directly. |
|
116 bindir = @bindir@ |
5
|
117 |
666
|
118 # Where to install architecture-independent data files. ${fcnfiledir} |
|
119 # and ${localfcnfiledir} are subdirectories of this. |
|
120 datadir = @datadir@ |
5
|
121 |
666
|
122 # Where to install and expect libraries like libcruft.a, liboctave.a, |
|
123 # and libreadline.a, executable files to be run by Octave rather than |
|
124 # directly by users, and other architecture-dependent data. |
|
125 # ${archlibdir} is a subdirectory of this. |
|
126 libdir = @libdir@ |
5
|
127 |
666
|
128 # Where to install Octave's include files. The default is |
|
129 # ${prefix}/include/octave |
|
130 includedir = @includedir@ |
|
131 |
|
132 # Where to install Octave's man pages, and what extension they should |
|
133 # have. The default is ${prefix}/man/man1 |
|
134 mandir = @mandir@ |
5
|
135 manext = 1 |
|
136 |
666
|
137 # Where to install and expect the info files describing Octave.. |
|
138 infodir = @infodir@ |
|
139 |
|
140 # ==================== Octave-specific directories ==================== |
|
141 |
|
142 # These variables hold the values Octave will actually use. They are |
|
143 # based on the values of the standard Make variables above. |
|
144 |
|
145 # Where to install the function file distributed with |
|
146 # Octave. This includes the Octave version, so that the |
|
147 # function files for different versions of Octave will install |
|
148 # themselves in separate directories. |
|
149 fcnfiledir = @fcnfiledir@ |
|
150 |
|
151 # Directories Octave should search for function files specific |
|
152 # to this site (i.e. customizations), before consulting |
|
153 # ${fcnfiledir}. This should be a colon-separated list of |
|
154 # directories. |
827
|
155 localfcnfiledir = @localfcnfiledir@ |
666
|
156 localfcnfilepath = @localfcnfilepath@ |
5
|
157 |
666
|
158 # Where to put executables to be run by Octave rather than |
|
159 # the user. This path usually includes the Octave version |
|
160 # and configuration name, so that multiple configurations |
|
161 # for multiple versions of Octave may be installed at once. |
|
162 archlibdir = @archlibdir@ |
|
163 |
|
164 # Where to put object files that will by dynamically loaded. |
|
165 # This path usually includes the Octave version and configuration |
|
166 # name, so that multiple configurations for multiple versions of |
|
167 # Octave may be installed at once. |
|
168 octfiledir = @octfiledir@ |
5
|
169 |
666
|
170 # Directories Octave should search for object files that will be |
|
171 # dynamically loaded and that are specific to this site |
|
172 # (i.e. customizations), before consulting ${octfiledir}. This should |
|
173 # be a colon-separated list of directories. |
827
|
174 localoctfiledir = @localoctfiledir@ |
666
|
175 localoctfilepath = @localoctfilepath@ |
|
176 |
|
177 # Where Octave will search to find its function files. Before |
|
178 # changing this, check to see if your purpose wouldn't |
|
179 # better be served by changing localfcnfilepath. This |
|
180 # should be a colon-separated list of directories. |
|
181 fcnfilepath = @fcnfilepath@ |
5
|
182 |
685
|
183 # Where Octave will search to find image files.es. |
827
|
184 imagedir = @imagedir@ |
685
|
185 imagepath = @imagepath@ |
|
186 |
5
|
187 # The type of computer we are running on. |
|
188 target_host_type = @target_host_type@ |
|
189 |
|
190 # The following pattern rules and the substitution functions require |
|
191 # GNU make. If you don't have it, get it! |
|
192 |
994
|
193 # Rules for making C source from Fortran source (if necessary). |
|
194 # |
|
195 # If we are using f2c there will be a command for the `%.c : %.f' |
|
196 # pattern and no command for the `%.o : %.f' pattern, so that make |
|
197 # will not invoke the fortran compiler by mistake. |
|
198 # |
|
199 # If we are not using f2c, it should be ok to have an empty rule for |
|
200 # the pattern `%.c : %.f', but we don't want to replace make's default |
|
201 # rule for making object from Fortran source files, so there should be |
|
202 # no pattern or command for that. |
5
|
203 |
994
|
204 %.c : %.f |
996
|
205 @DOT_C_FROM_DOT_F_CMD@ |
994
|
206 |
996
|
207 @DOT_O_FROM_DOT_F_PAT@ |
5
|
208 |
|
209 # How to make .o files from .c files: |
|
210 |
|
211 .c.o: |
|
212 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< |
|
213 |
|
214 .cc.o: |
|
215 $(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $< |
308
|
216 |
|
217 # Here is a rule for generating dependencies for .cc files: |
|
218 |
|
219 %.d: %.cc |
518
|
220 @echo making $@ from $< |
|
221 @rm -f $@ |
|
222 @-if test "$(srcdir)" = "." ; then \ |
308
|
223 $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \ |
518
|
224 sed -e 's/$*\.o/& $@/g' > $@.tmp ; \ |
308
|
225 else \ |
|
226 $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \ |
518
|
227 sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp ; \ |
308
|
228 fi |
518
|
229 @mv $@.tmp $@ |
308
|
230 |
|
231 # And one for .c files.too: |
|
232 |
|
233 %.d: %.c |
518
|
234 @echo making $@ from $< |
|
235 @rm -f $@ |
|
236 @-if test "$(srcdir)" = "." ; then \ |
308
|
237 $(CC) -MM $(CPPFLAGS) $(ALL_CFLAGS) $< | \ |
518
|
238 sed -e 's/$*\.o/& $@/g' > $@.tmp ; \ |
308
|
239 else \ |
|
240 $(CC) -MM $(CPPFLAGS) $(ALL_CFLAGS) $< | \ |
518
|
241 sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp ; \ |
308
|
242 fi |
518
|
243 @mv $@.tmp $@ |