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