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