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