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