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