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