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