Mercurial > emacs
annotate src/Makefile.in @ 5253:1846f03ac8f3
[VMS] (wait_for_kbd_input): Call prepare_menu_bars.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 23 Dec 1993 02:02:36 +0000 |
parents | abc23ae65483 |
children | efcc2af40221 |
rev | line source |
---|---|
4796 | 1 /* Makefile for GNU Emacs. |
2 Copyright (C) 1985, 1987, 1988, 1993 Free Software Foundation, Inc. | |
3 | |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation; either version 2, or (at your option) | |
9 any later version. | |
10 | |
11 GNU Emacs is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | |
20 /* BSD doesn't have it as a default. */ | |
21 MAKE = make | |
22 | |
23 /* Here are the things that we expect ../configure to edit. */ | |
24 srcdir=@srcdir@ | |
25 VPATH=@srcdir@ | |
26 CC=@CC@ | |
27 CPP=@CPP@ | |
28 CFLAGS=@CFLAGS@ | |
29 C_SWITCH_SYSTEM= | |
30 LN_S=@LN_S@ | |
5234
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
31 # These escaped doublequotes become part of the macro definition in emacs.c. |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
32 # Thus, the definition is a C string constant. |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
33 configuration=\"@configuration@\" |
4796 | 34 |
35 /* On Xenix and the IBM RS6000, double-dot gets screwed up. */ | |
36 dot = . | |
37 lispdir = ${srcdir}/$(dot)$(dot)/lisp/ | |
38 libsrc = $(dot)$(dot)/lib-src/ | |
39 etc = $(dot)$(dot)/etc/ | |
40 shortnamesdir = $(dot)$(dot)/shortnames/ | |
41 cppdir = $(dot)$(dot)/cpp/ | |
42 oldXMenudir = $(dot)$(dot)/oldXMenu/ | |
43 config_h = config.h | |
44 | |
45 /* just to be sure the sh is used */ | |
46 SHELL=/bin/sh | |
47 | |
48 #define NO_SHORTNAMES | |
49 #define THIS_IS_YMAKEFILE | |
50 #define NOT_C_CODE | |
51 #include "config.h" | |
52 | |
53 /* Use HAVE_X11 as an alias for X11 in this file | |
54 to avoid problems with X11 as a subdirectory name | |
55 in -I and other such options which pass through this file. */ | |
56 | |
57 #ifdef X11 | |
58 #define HAVE_X11 | |
59 #undef X11 | |
60 #endif | |
61 | |
62 /* On some machines #define register is done in config; | |
63 don't let it interfere with this file. */ | |
64 #undef register | |
65 | |
66 /* On some systems we may not be able to use the system make command. */ | |
67 #ifdef MAKE_COMMAND | |
68 MAKE = MAKE_COMMAND | |
69 #else | |
70 MAKE=make | |
71 #endif | |
72 | |
73 #ifdef C_COMPILER | |
74 CC = C_COMPILER | |
75 #endif | |
76 | |
77 /* Some machines don't find the standard C libraries in the usual place. */ | |
78 #ifndef ORDINARY_LINK | |
79 #ifndef LIB_STANDARD | |
80 #define LIB_STANDARD -lc | |
81 #endif | |
82 #else | |
83 #ifndef LIB_STANDARD | |
84 #define LIB_STANDARD | |
85 #endif | |
86 #endif | |
87 | |
88 /* Unless inhibited or changed, use -lg to link for debugging. */ | |
89 #ifndef LIBS_DEBUG | |
90 #define LIBS_DEBUG -lg | |
91 #endif | |
92 | |
93 /* Some s/*.h files define this to request special libraries. */ | |
94 #ifndef LIBS_SYSTEM | |
95 #define LIBS_SYSTEM | |
96 #endif | |
97 | |
98 /* Some m/*.h files define this to request special libraries. */ | |
99 #ifndef LIBS_MACHINE | |
100 #define LIBS_MACHINE | |
101 #endif | |
102 | |
103 #ifndef LIB_MATH | |
104 # ifdef LISP_FLOAT_TYPE | |
105 # define LIB_MATH -lm | |
106 # else /* ! defined (LISP_FLOAT_TYPE) */ | |
107 # define LIB_MATH | |
108 # endif /* ! defined (LISP_FLOAT_TYPE) */ | |
109 #endif /* LIB_MATH */ | |
110 | |
111 /* Some s/*.h files define this to request special switches in ld. */ | |
112 #ifndef LD_SWITCH_SYSTEM | |
113 #if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF))) | |
114 #define LD_SWITCH_SYSTEM -X | |
115 #else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF)) */ | |
116 #define LD_SWITCH_SYSTEM | |
117 #endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF)) */ | |
118 #endif /* LD_SWITCH_SYSTEM */ | |
119 | |
120 /* Some m/*.h files define this to request special switches in ld. */ | |
121 #ifndef LD_SWITCH_MACHINE | |
122 #define LD_SWITCH_MACHINE | |
123 #endif | |
124 | |
125 /* Some m/*.h files define this to request special switches in cc. */ | |
126 #ifndef C_SWITCH_MACHINE | |
127 #define C_SWITCH_MACHINE | |
128 #endif | |
129 | |
130 /* Some s/*.h files define this to request special switches in cc. */ | |
131 #ifndef C_SWITCH_SYSTEM | |
132 #define C_SWITCH_SYSTEM | |
133 #endif | |
134 | |
135 /* These macros are for switches specifically related to X Windows. */ | |
136 #ifndef C_SWITCH_X_MACHINE | |
137 #define C_SWITCH_X_MACHINE | |
138 #endif | |
139 | |
140 #ifndef C_SWITCH_X_SYSTEM | |
141 #define C_SWITCH_X_SYSTEM | |
142 #endif | |
143 | |
144 #ifndef C_SWITCH_X_SITE | |
145 #define C_SWITCH_X_SITE | |
146 #endif | |
147 | |
148 #ifndef LD_SWITCH_X_SITE | |
149 #define LD_SWITCH_X_SITE | |
150 #endif | |
151 | |
152 /* These can be passed in from config.h to define special load and | |
153 compile switches needed by individual sites */ | |
154 #ifndef LD_SWITCH_SITE | |
155 #define LD_SWITCH_SITE | |
156 #endif | |
157 | |
158 #ifndef C_SWITCH_SITE | |
159 #define C_SWITCH_SITE | |
160 #endif | |
161 | |
162 #ifndef ORDINARY_LINK | |
163 | |
164 #ifndef CRT0_COMPILE | |
165 #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM | |
166 #endif | |
167 | |
168 #ifndef START_FILES | |
169 #ifdef NO_REMAP | |
170 #ifdef COFF_ENCAPSULATE | |
171 #define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o | |
172 #else /* ! defined (COFF_ENCAPSULATE) */ | |
173 #define START_FILES pre-crt0.o /lib/crt0.o | |
174 #endif /* ! defined (COFF_ENCAPSULATE) */ | |
175 #else /* ! defined (NO_REMAP) */ | |
176 #define START_FILES crt0.o | |
177 #endif /* ! defined (NO_REMAP) */ | |
178 #endif /* START_FILES */ | |
179 STARTFILES = START_FILES | |
180 | |
181 #else /* ORDINARY_LINK */ | |
182 | |
183 /* config.h might want to force START_FILES anyway */ | |
184 #ifdef START_FILES | |
185 STARTFILES = START_FILES | |
186 #endif /* START_FILES */ | |
187 | |
188 #endif /* not ORDINARY_LINK */ | |
189 | |
190 | |
191 /* cc switches needed to make `asm' keyword work. | |
192 Nothing special needed on most machines. */ | |
193 #ifndef C_SWITCH_ASM | |
194 #define C_SWITCH_ASM | |
195 #endif | |
196 | |
197 /* Figure out whether the system cpp can handle long names. | |
198 Do it by testing it right now. | |
199 If it loses, arrange to use the GNU cpp. */ | |
200 | |
201 #define LONGNAMEBBBFOOX | |
202 #ifdef LONGNAMEBBBARFOOX | |
203 /* Installed cpp fails to distinguish those names! */ | |
204 /* Arrange to compile the GNU cpp later on */ | |
205 #define NEED_CPP | |
206 /* Cause cc to invoke the cpp that comes with Emacs, | |
207 which will be in a file named localcpp. */ | |
208 MYCPPFLAG= -Blocal | |
209 /* LOCALCPP is the local one or nothing. | |
210 CPP is the local one or the standardone. */ | |
211 LOCALCPP= localcpp | |
212 #endif /* ! defined (LONGNAMEBBBARFOOX) */ | |
213 | |
214 #ifdef SHORTNAMES | |
215 SHORT= shortnames | |
216 #endif | |
217 | |
218 /* DO NOT use -R. There is a special hack described in lastfile.c | |
219 which is used instead. Some initialized data areas are modified | |
220 at initial startup, then labeled as part of the text area when | |
221 Emacs is dumped for the first time, and never changed again. */ | |
222 | |
223 /* If you want to debug, you can add C_DEBUG_SWITCH to this list. | |
224 If you want to optimize, you can add C_OPTIMIZE_SWITCH to the list. */ | |
225 | |
226 /* -Demacs is needed to make some files produce the correct version | |
227 for use in Emacs. | |
228 | |
229 -DHAVE_CONFIG_H is needed for some other files to take advantage of | |
230 the information in `config.h'. */ | |
5030
1c9c9a87f8b6
Delete spurious CFLAGS=-g.
Richard M. Stallman <rms@gnu.org>
parents:
4963
diff
changeset
|
231 |
4796 | 232 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM |
233 since it may have -I options that should override those two. */ | |
4803
ce4372eaa443
(ALL_CFLAGS): Make sure `.' is searched before `${srcdir}'.
Brian Fox <bfox@gnu.org>
parents:
4796
diff
changeset
|
234 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM ${CFLAGS} |
4796 | 235 .c.o: |
236 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< | |
237 | |
238 #ifndef LIBX10_MACHINE | |
239 #define LIBX10_MACHINE | |
240 #endif | |
241 | |
242 #ifndef LIBX11_MACHINE | |
243 #define LIBX11_MACHINE | |
244 #endif | |
245 | |
246 #ifndef LIBX10_SYSTEM | |
247 #define LIBX10_SYSTEM | |
248 #endif | |
249 | |
250 #ifndef LIBX11_SYSTEM | |
251 #define LIBX11_SYSTEM | |
252 #endif | |
253 | |
254 #ifndef LIB_X11_LIB | |
255 #define LIB_X11_LIB -lX11 | |
256 #endif | |
257 | |
258 #ifdef HAVE_X_WINDOWS | |
259 #ifdef HAVE_X_MENU | |
260 | |
261 /* Include xmenu.o in the list of X object files. */ | |
262 XOBJ= xterm.o xfns.o xfaces.o xmenu.o xselect.o xrdb.o | |
263 | |
264 /* The X Menu stuff is present in the X10 distribution, but missing | |
265 from X11. If we have X10, just use the installed library; | |
266 otherwise, use our own copy. */ | |
267 #ifdef HAVE_X11 | |
268 OLDXMENU= libXMenu11.a | |
269 LIBXMENU= $(OLDXMENU) | |
270 #else /* ! defined (HAVE_X11) */ | |
271 LIBXMENU= -lXMenu | |
272 #endif /* ! defined (HAVE_X11) */ | |
273 | |
274 #else /* ! defined (HAVE_X_MENU) */ | |
275 | |
276 /* Otherwise, omit xmenu.o from the list of X object files, and | |
277 don't worry about the menu library at all. */ | |
278 XOBJ= xterm.o xfns.o xfaces.o xselect.o xrdb.o | |
279 LIBXMENU= | |
280 #endif /* ! defined (HAVE_X_MENU) */ | |
281 | |
282 #ifdef HAVE_X11 | |
283 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | |
284 #else /* ! defined (HAVE_X11) */ | |
285 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM | |
286 #endif /* ! defined (HAVE_X11) */ | |
287 #endif /* ! defined (HAVE_X_WINDOWS) */ | |
288 | |
289 #ifndef ORDINARY_LINK | |
290 /* Fix linking if compiled with GCC. */ | |
291 #ifdef __GNUC__ | |
292 | |
293 #if __GNUC__ > 1 | |
294 | |
5234
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
295 #ifdef LINKER |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
296 #define LINKER_WAS_SPECIFIED |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
297 #endif |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
298 |
4796 | 299 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure |
300 places that are difficult to figure out at make time. Fortunately, | |
301 these same versions allow you to pass arbitrary flags on to the | |
302 linker, so there's no reason not to use it as a linker. | |
303 | |
304 Well, it's not quite perfect. The `-nostdlib' keeps GCC from | |
305 searching for libraries in its internal directories, so we have to | |
306 ask GCC explicitly where to find libgcc.a. */ | |
307 | |
308 #ifndef LINKER | |
309 #define LINKER $(CC) -nostdlib | |
310 #endif | |
311 | |
312 #ifndef LIB_GCC | |
313 /* Ask GCC where to find libgcc.a. */ | |
314 #define LIB_GCC `$(CC) -print-libgcc-file-name` | |
315 #endif /* LIB_GCC */ | |
316 | |
317 GNULIB_VAR = LIB_GCC | |
318 | |
5234
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
319 #ifndef LINKER_WAS_SPECIFIED |
4796 | 320 /* GCC passes any argument prefixed with -Xlinker directly to the |
321 linker. See prefix-args.c for an explanation of why we don't do | |
322 this with the shell's `for' construct. | |
323 Note that some people don't have '.' in their paths, so we must | |
324 use ./prefix-args. */ | |
325 #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` | |
5234
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
326 #else |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
327 #define YMF_PASS_LDFLAGS(flags) flags |
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
328 #endif |
4796 | 329 |
330 #else /* __GNUC__ < 2 */ | |
331 | |
332 #ifndef LIB_GCC | |
333 #define LIB_GCC /usr/local/lib/gcc-gnulib | |
334 #endif /* LIB_GCC */ | |
335 GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi` | |
336 #endif /* __GNUC__ < 2 */ | |
337 #else /* ! defined (__GNUC__) */ | |
338 GNULIB_VAR = | |
339 | |
340 #endif /* ! defined (__GNUC__) */ | |
341 #endif /* not ORDINARY_LINK */ | |
342 | |
343 /* Specify address for ld to start loading at, | |
344 if requested by configuration. */ | |
345 #ifdef LD_TEXT_START_ADDR | |
346 STARTFLAGS = -T LD_TEXT_START_ADDR -e __start | |
347 #endif | |
348 | |
349 #ifdef ORDINARY_LINK | |
350 LD = $(CC) | |
351 #else | |
352 #ifdef COFF_ENCAPSULATE | |
353 LD=$(CC) -nostdlib | |
354 #else /* not ORDINARY_LINK */ | |
355 #ifdef LINKER | |
356 LD=LINKER | |
357 #else /* ! defined (LINKER) */ | |
358 LD=ld | |
359 #endif /* ! defined (LINKER) */ | |
360 #endif /* ! defined (COFF_ENCAPSULATE) */ | |
361 #endif /* not ORDINARY_LINK */ | |
362 | |
363 LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_MACHINE LD_SWITCH_SITE | |
364 | |
365 /* A macro which other sections of ymakefile can redefine to munge the | |
366 flags before they're passed to LD. This is helpful if you have | |
367 redefined LD to something odd, like "gcc". */ | |
368 #ifndef YMF_PASS_LDFLAGS | |
369 #define YMF_PASS_LDFLAGS(flags) flags | |
370 #endif | |
371 | |
372 /* Allow config.h to specify a replacement file for unexec.c. */ | |
373 #ifndef UNEXEC | |
374 #define UNEXEC unexec.o | |
375 #endif | |
376 #ifndef UNEXEC_SRC | |
377 #define UNEXEC_SRC unexec.c | |
378 #endif | |
379 | |
380 #ifdef USE_TEXT_PROPERTIES | |
381 #define INTERVAL_SRC intervals.h | |
382 #define INTERVAL_OBJ intervals.o textprop.o | |
383 #else | |
384 #define INTERVAL_SRC | |
385 #define INTERVAL_OBJ | |
386 #endif | |
387 | |
388 #ifdef HAVE_GETLOADAVG | |
389 #define GETLOADAVG_OBJ | |
390 #else | |
391 #define GETLOADAVG_OBJ getloadavg.o | |
392 #endif | |
393 | |
394 /* lastfile must follow all files | |
395 whose initialized data areas should be dumped as pure by dump-emacs. */ | |
396 obj= dispnew.o frame.o scroll.o xdisp.o window.o \ | |
397 term.o cm.o $(XOBJ) \ | |
398 emacs.o keyboard.o macros.o keymap.o sysdep.o \ | |
399 buffer.o filelock.o insdel.o marker.o INTERVAL_OBJ \ | |
400 minibuf.o fileio.o dired.o filemode.o \ | |
401 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \ | |
402 alloc.o data.o doc.o editfns.o callint.o \ | |
403 eval.o floatfns.o fns.o print.o lread.o \ | |
404 abbrev.o syntax.o UNEXEC mocklisp.o bytecode.o \ | |
405 process.o callproc.o \ | |
406 doprnt.o GETLOADAVG_OBJ | |
407 | |
408 #ifdef TERMINFO | |
409 /* Used to be -ltermcap here. If your machine needs that, | |
410 define LIBS_TERMCAP in the m/*.h file. */ | |
411 #ifndef LIBS_TERMCAP | |
412 #define LIBS_TERMCAP -lcurses | |
413 #endif /* LIBS_TERMCAP */ | |
414 termcapobj = terminfo.o | |
415 #else /* ! defined (TERMINFO) */ | |
416 #ifndef LIBS_TERMCAP | |
417 #define LIBS_TERMCAP | |
418 termcapobj = termcap.o tparam.o | |
419 #else /* LIBS_TERMCAP */ | |
420 termcapobj = tparam.o | |
421 #endif /* LIBS_TERMCAP */ | |
422 #endif /* ! defined (TERMINFO) */ | |
423 | |
424 | |
425 #ifndef SYSTEM_MALLOC | |
426 | |
427 #ifdef GNU_MALLOC /* New GNU malloc */ | |
428 #ifdef REL_ALLOC | |
429 mallocobj = gmalloc.o ralloc.o vm-limit.o | |
430 #else /* ! defined (REL_ALLOC) */ | |
431 mallocobj = gmalloc.o vm-limit.o | |
432 #endif /* ! defined (REL_ALLOC) */ | |
433 #else /* Old GNU malloc */ | |
434 mallocobj = malloc.o | |
435 #endif /* Old GNU malloc */ | |
436 | |
437 #endif /* SYSTEM_MALLOC */ | |
438 | |
439 | |
440 #ifndef HAVE_ALLOCA | |
441 allocaobj = alloca.o | |
442 #else | |
443 allocaobj = | |
444 #endif | |
445 | |
446 | |
447 /* define otherobj as list of object files that make-docfile | |
448 should not be told about. */ | |
449 otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) | |
450 | |
451 #ifdef LISP_FLOAT_TYPE | |
452 #define FLOAT_SUPPORT ${lispdir}float-sup.elc | |
453 #else | |
454 #define FLOAT_SUPPORT | |
455 #endif | |
456 | |
457 #ifdef MULTI_FRAME | |
458 #define FRAME_SUPPORT ${lispdir}frame.elc ${lispdir}mouse.elc ${lispdir}select.elc ${lispdir}scroll-bar.elc | |
459 #else | |
460 #define FRAME_SUPPORT | |
461 #endif | |
462 | |
463 #ifdef VMS | |
464 #define VMS_SUPPORT ${lispdir}vmsproc.elc ${lispdir}vms-patch | |
465 #else | |
466 #define VMS_SUPPORT | |
467 #endif | |
468 | |
469 /* List of Lisp files loaded into the dumped Emacs. It's arranged | |
470 like this because it's easier to generate it semi-mechanically from | |
471 loadup.el this way. | |
472 | |
473 Note that this list should not include lisp files which might not | |
474 be present, like site-load.el and site-init.el; this makefile | |
475 expects them all to be either present or buildable. | |
476 | |
477 It should not include version.el. That file is often changed by | |
478 the build process itself, but most of the files which want to | |
479 depend on lisp.h don't care about those changes. */ | |
480 lisp= \ | |
481 ${lispdir}abbrev.elc \ | |
482 ${lispdir}buff-menu.elc \ | |
483 ${lispdir}byte-run.elc \ | |
484 ${lispdir}c-mode.elc \ | |
485 ${lispdir}files.elc \ | |
486 ${lispdir}fill.elc \ | |
487 FLOAT_SUPPORT \ | |
488 FRAME_SUPPORT \ | |
489 ${lispdir}help.elc \ | |
490 ${lispdir}indent.elc \ | |
491 ${lispdir}isearch.elc \ | |
492 ${lispdir}lisp-mode.elc \ | |
493 ${lispdir}lisp.elc \ | |
494 ${lispdir}loaddefs.el \ | |
495 ${lispdir}map-ynp.elc \ | |
496 ${lispdir}page.elc \ | |
497 ${lispdir}paragraphs.elc \ | |
498 ${lispdir}paths.el \ | |
499 ${lispdir}register.elc \ | |
500 ${lispdir}replace.elc \ | |
501 ${lispdir}simple.elc \ | |
502 ${lispdir}startup.elc \ | |
503 ${lispdir}subr.elc \ | |
504 ${lispdir}text-mode.elc \ | |
505 ${lispdir}vc-hooks.elc \ | |
506 VMS_SUPPORT \ | |
507 ${lispdir}window.elc | |
508 | |
509 /* Construct full set of libraries to be linked. | |
510 Note that SunOS needs -lm to come before -lc; otherwise, you get | |
4814
9c7b28c16e94
(LIBES): Add $(GNULIB_VAR) again at end.
Roland McGrath <roland@gnu.org>
parents:
4803
diff
changeset
|
511 duplicated symbols. If the standard libraries were compiled |
9c7b28c16e94
(LIBES): Add $(GNULIB_VAR) again at end.
Roland McGrath <roland@gnu.org>
parents:
4803
diff
changeset
|
512 with GCC, we might need gnulib again after them. */ |
4796 | 513 LIBES = $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ |
4814
9c7b28c16e94
(LIBES): Add $(GNULIB_VAR) again at end.
Roland McGrath <roland@gnu.org>
parents:
4803
diff
changeset
|
514 LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) |
4796 | 515 |
516 /* Enable recompilation of certain other files depending on system type. */ | |
517 | |
518 #ifndef OTHER_FILES | |
519 #define OTHER_FILES | |
520 #endif | |
521 | |
522 /* Enable inclusion of object files in temacs depending on system type. */ | |
523 #ifndef OBJECTS_SYSTEM | |
524 #define OBJECTS_SYSTEM | |
525 #endif | |
526 | |
527 #ifndef OBJECTS_MACHINE | |
528 #define OBJECTS_MACHINE | |
529 #endif | |
530 | |
531 all: emacs OTHER_FILES | |
532 | |
533 emacs: temacs ${etc}DOC ${lisp} | |
534 #ifdef CANNOT_DUMP | |
535 ln temacs emacs | |
536 #else | |
537 #ifdef HAVE_SHM | |
538 -if [ -w ${srcdir}/../lisp ]; then \ | |
539 w=`pwd`; cd ${srcdir}; $${w}/temacs -nl -batch -l ../lisp/inc-vers; \ | |
540 else true; fi | |
541 ./temacs -nl -batch -l loadup dump | |
542 #else /* ! defined (HAVE_SHM) */ | |
543 -if [ -w ${srcdir}/../lisp ]; then \ | |
544 w=`pwd`; cd ${srcdir}; $${w}/temacs -batch -l ../lisp/inc-vers; \ | |
545 else true; fi | |
546 ./temacs -batch -l loadup dump | |
547 #endif /* ! defined (HAVE_SHM) */ | |
548 #endif /* ! defined (CANNOT_DUMP) */ | |
549 | |
550 ${etc}DOC: ${libsrc}make-docfile ${obj} ${lisp} OBJECTS_SYSTEM OBJECTS_MACHINE | |
551 rm -f ${etc}DOC | |
552 ${libsrc}make-docfile -d ${srcdir} ${obj} OBJECTS_SYSTEM OBJECTS_MACHINE ${lisp} \ | |
553 ${lispdir}version.el > ${etc}DOC | |
554 | |
555 ${libsrc}make-docfile: | |
556 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile ../arch-lib | |
557 | |
558 /* Some systems define this to cause parallel Make-ing. */ | |
559 #ifndef MAKE_PARALLEL | |
560 #define MAKE_PARALLEL | |
561 #endif | |
562 | |
563 temacs: MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) $(OLDXMENU) ${obj} ${otherobj} OBJECTS_SYSTEM OBJECTS_MACHINE prefix-args | |
564 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${LDFLAGS}) \ | |
565 -o temacs ${STARTFILES} ${obj} ${otherobj} \ | |
566 OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES} | |
567 | |
568 prefix-args: prefix-args.c $(config_h) | |
569 $(CC) $(ALL_CFLAGS) ${srcdir}/prefix-args.c -o prefix-args | |
570 | |
571 /* These are needed for C compilation, on the systems that need them */ | |
572 #ifdef NEED_CPP | |
573 CPP = ./localcpp | |
574 localcpp: | |
575 cd ${cppdir}; ${MAKE} ${MFLAGS} EMACS=-DEMACS | |
576 ln ${cppdir}cpp localcpp /* Name where ALL_CFLAGS will refer to it */ | |
577 /* cc appears to be cretinous and require all of these to exist | |
578 if -B is specified -- we can't use one local pass and let the | |
579 others be the standard ones. What a loser. | |
580 We can't even use ln, since they are probably | |
581 on different disks. */ | |
582 cp /lib/ccom localccom | |
583 -cp /lib/optim localoptim | |
584 -cp /lib/c2 localc2 | |
585 cp /bin/as localas | |
586 #else /* ! defined (NEED_CPP) */ | |
587 CPP = $(CC) -E | |
588 #endif /* ! defined (NEED_CPP) */ | |
589 | |
590 #ifdef SHORTNAMES | |
591 shortnames: | |
592 cd ${shortnamesdir}; ${MAKE} ${MFLAGS} | |
593 #endif | |
594 | |
595 /* Don't lose if this was not defined. */ | |
596 #ifndef OLDXMENU_OPTIONS | |
597 #define OLDXMENU_OPTIONS | |
598 #endif | |
599 | |
600 #ifdef HAVE_X_WINDOWS | |
601 #ifdef HAVE_X_MENU | |
602 #ifdef HAVE_X11 | |
603 $(OLDXMENU): really-oldXMenu | |
604 -rm -f $(OLDXMENU) /* We might have a link to an old version. */ | |
605 ${LN_S} ${oldXMenudir}libXMenu11.a $(OLDXMENU) | |
606 | |
607 /* Encode the values of these two macros in Make variables, | |
608 so we can use $(...) to substitute their values within "...". */ | |
609 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE | |
610 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM | |
611 C_SWITCH_SITE_1 = C_SWITCH_SITE | |
612 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE | |
613 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE | |
614 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM | |
615 really-oldXMenu: | |
616 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \ | |
617 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ | |
618 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \ | |
619 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \ | |
620 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \ | |
621 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \ | |
622 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \ | |
623 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)" | |
624 @true /* make -t should not create really-oldXMenu. */ | |
625 #endif /* ! defined (HAVE_X11) */ | |
626 #endif /* ! defined (HAVE_X_MENU) */ | |
627 #endif /* ! defined (HAVE_X_WINDOWS) */ | |
628 | |
629 paths.h: paths.h.in | |
630 @echo "The file paths.h needs to be set up from paths.h.in." | |
631 @echo "Consult the file \`INSTALL' for instructions for building Emacs." | |
632 exit 1 | |
633 | |
634 config.h: config.h.in | |
635 @echo "The file config.h needs to be set up from config.h.in." | |
636 @echo "Consult the file \`INSTALL' for instructions for building Emacs." | |
637 exit 1 | |
638 | |
639 /* Some machines have alloca built-in. | |
640 They should define HAVE_ALLOCA, or may just let alloca.s | |
641 be used but generate no code. | |
642 Some have it written in assembler in alloca.s. | |
643 Some use the C version in alloca.c (these define C_ALLOCA in config.h). | |
644 */ | |
645 | |
646 #ifdef C_ALLOCA | |
647 /* We could put something in alloca.c to #define free and malloc | |
648 whenever emacs was #defined, but that's not appropriate for all | |
649 users of alloca in Emacs. Check out ../lib-src/getopt.c. */ | |
650 alloca.o : alloca.c | |
651 $(CC) -c $(CPPFLAGS) -Dfree=xfree -Dmalloc=xmalloc \ | |
652 $(ALL_CFLAGS) ${srcdir}/alloca.c | |
653 #else | |
654 #ifndef HAVE_ALLOCA | |
655 alloca.o : alloca.s config.h | |
656 /* $(CPP) is cc -E, which may get confused by filenames | |
657 that do not end in .c. So copy file to a safe name. */ | |
658 cp ${srcdir}/alloca.s allocatem.c | |
659 /* Remove any ^L, blank lines, and preprocessor comments, | |
660 since some assemblers barf on them. Use a different basename for the | |
661 output file, since some stupid compilers (Green Hill's) use that | |
662 name for the intermediate assembler file. */ | |
663 $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \ | |
664 sed -e 's///' -e 's/^#.*//' | \ | |
665 sed -n -e '/^..*$$/p' > allocax.s | |
666 -rm -f alloca.o | |
667 /* Xenix, in particular, needs to run assembler via cc. */ | |
668 $(CC) -c allocax.s | |
669 mv allocax.o alloca.o | |
670 rm allocax.s allocatem.c | |
671 #endif /* HAVE_ALLOCA */ | |
672 #endif /* ! defined (C_ALLOCA) */ | |
673 | |
674 /* Nearly all the following files depend on lisp.h, | |
675 but it is not included as a dependency because | |
676 it is so often changed in ways that do not require any recompilation | |
677 and so rarely changed in ways that do require any. */ | |
678 | |
679 abbrev.o : abbrev.c buffer.h commands.h $(config_h) | |
680 buffer.o : buffer.c syntax.h buffer.h commands.h window.h \ | |
681 INTERVAL_SRC blockinput.h $(config_h) | |
682 callint.o : callint.c window.h commands.h buffer.h mocklisp.h \ | |
683 keyboard.h $(config_h) | |
684 callproc.o : callproc.c paths.h buffer.h commands.h $(config_h) process.h | |
685 casefiddle.o : casefiddle.c syntax.h commands.h buffer.h $(config_h) | |
686 casetab.o : casetab.c buffer.h $(config_h) | |
687 cm.o : cm.c cm.h termhooks.h $(config_h) | |
688 cmds.o : cmds.c syntax.h buffer.h commands.h $(config_h) | |
689 pre-crt0.o : pre-crt0.c | |
690 crt0.o : crt0.c $(config_h) | |
691 CRT0_COMPILE ${srcdir}/crt0.c | |
692 dired.o : dired.c commands.h buffer.h $(config_h) regex.h | |
693 dispnew.o : dispnew.c commands.h frame.h window.h buffer.h dispextern.h \ | |
694 termchar.h termopts.h termhooks.h cm.h disptab.h systty.h systime.h $(config_h) | |
695 doc.o : doc.c $(config_h) paths.h buffer.h keyboard.h | |
696 doprnt.o : doprnt.c | |
697 editfns.o : editfns.c window.h buffer.h systime.h INTERVAL_SRC $(config_h) | |
698 emacs.o : emacs.c commands.h systty.h syssignal.h process.h INTERVAL_SRC $(config_h) | |
5234
abc23ae65483
(configuration): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
5099
diff
changeset
|
699 $(CC) -c -DCONFIGURATION="$(configuration)" $(CPPFLAGS) $(ALL_CFLAGS) $< |
4796 | 700 fileio.o : fileio.c window.h buffer.h systime.h INTERVAL_SRC $(config_h) |
701 filelock.o : filelock.c buffer.h paths.h $(config_h) | |
702 filemode.o : filemode.c $(config_h) | |
703 getloadavg.o : getloadavg.c $(config_h) | |
704 indent.o : indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \ | |
705 termopts.h disptab.h | |
706 insdel.o : insdel.c window.h buffer.h INTERVAL_SRC blockinput.h $(config_h) | |
707 keyboard.o : keyboard.c termchar.h termhooks.h termopts.h buffer.h \ | |
708 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \ | |
709 systty.h systime.h dispextern.h intervals.h blockinput.h $(config_h) | |
710 keymap.o : keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ | |
711 $(config_h) | |
712 lastfile.o : lastfile.c $(config_h) | |
713 macros.o : macros.c window.h buffer.h commands.h macros.h $(config_h) | |
714 malloc.o : malloc.c $(config_h) | |
715 gmalloc.o : gmalloc.c $(config_h) | |
716 ralloc.o : ralloc.c $(config_h) | |
717 vm-limit.o : vm-limit.c mem-limits.h $(config_h) | |
718 marker.o : marker.c buffer.h $(config_h) | |
719 minibuf.o : minibuf.c syntax.h dispextern.h frame.h window.h \ | |
720 buffer.h commands.h $(config_h) | |
721 mocklisp.o : mocklisp.c buffer.h $(config_h) | |
722 process.o : process.c process.h buffer.h window.h termhooks.h termopts.h \ | |
723 commands.h syssignal.h systime.h systty.h syswait.h frame.h $(config_h) | |
724 regex.o : regex.c syntax.h buffer.h $(config_h) regex.h | |
725 frame.o : frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ | |
726 buffer.h $(config_h) | |
727 scroll.o : scroll.c termchar.h $(config_h) dispextern.h frame.h | |
728 search.o : search.c regex.h commands.h buffer.h syntax.h blockinput.h $(config_h) | |
729 syntax.o : syntax.c syntax.h buffer.h commands.h $(config_h) | |
730 sysdep.o : sysdep.c $(config_h) dispextern.h termhooks.h termchar.h termopts.h \ | |
731 frame.h syssignal.h systty.h systime.h syswait.h blockinput.h window.h | |
732 term.o : term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \ | |
733 disptab.h | |
734 termcap.o : termcap.c $(config_h) | |
735 terminfo.o : terminfo.c $(config_h) | |
736 tparam.o : tparam.c $(config_h) | |
737 undo.o : undo.c buffer.h commands.h $(config_h) | |
738 UNEXEC : UNEXEC_SRC $(config_h) | |
739 window.o : window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ | |
740 termhooks.h disptab.h keyboard.h $(config_h) | |
741 xdisp.o : xdisp.c macros.h commands.h indent.h buffer.h dispextern.h \ | |
742 termchar.h frame.h window.h disptab.h termhooks.h $(config_h) | |
743 xfaces.o : xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \ | |
744 window.h $(config_h) | |
745 xfns.o : xfns.c buffer.h frame.h window.h keyboard.h xterm.h \ | |
746 blockinput.h $(config_h) | |
747 xmenu.o : xmenu.c xterm.h window.h frame.h keyboard.h blockinput.h $(config_h) | |
748 xterm.o : xterm.c xterm.h termhooks.h termopts.h termchar.h window.h \ | |
749 dispextern.h frame.h disptab.h blockinput.h systime.h \ | |
750 gnu.h sink.h sinkmask.h $(config_h) | |
751 xselect.o : xselect.c dispextern.h frame.h xterm.h blockinput.h $(config_h) | |
752 xrdb.o : xrdb.c $(config_h) | |
5099 | 753 hftctl.o : hftctl.c $(config_h) |
4796 | 754 |
755 /* The files of Lisp proper */ | |
756 | |
757 alloc.o : alloc.c frame.h window.h buffer.h puresize.h syssignal.h | |
758 alloc.o : blockinput.h $(config_h) INTERVAL_SRC | |
759 bytecode.o : bytecode.c buffer.h $(config_h) | |
760 data.o : data.c buffer.h puresize.h syssignal.h $(config_h) | |
761 eval.o : eval.c commands.h keyboard.h blockinput.h $(config_h) | |
762 floatfns.o : floatfns.c $(config_h) | |
763 fns.o : fns.c commands.h $(config_h) frame.h buffer.h keyboard.h INTERVAL_SRC | |
764 print.o : print.c process.h frame.h window.h buffer.h $(config_h) | |
765 lread.o : lread.c commands.h keyboard.h buffer.h paths.h $(config_h) \ | |
766 termhooks.h | |
767 | |
768 /* Text properties support */ | |
769 textprop.o : textprop.c buffer.h intervals.h $(config_h) | |
4963
6648ce61e9fd
(intervals.o): Depend on puresize.h.
Richard M. Stallman <rms@gnu.org>
parents:
4814
diff
changeset
|
770 intervals.o : intervals.c buffer.h intervals.h puresize.h $(config_h) |
4796 | 771 |
772 /* System-specific programs to be made. | |
773 OTHER_FILES, OBJECTS_SYSTEM and OBJECTS_MACHINE | |
774 select which of these should be compiled. */ | |
775 | |
776 sunfns.o : sunfns.c buffer.h $(config_h) | |
777 | |
778 ${libsrc}emacstool: ${libsrc}emacstool.c | |
779 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool | |
780 mostlyclean: | |
781 rm -f temacs prefix-args xmakefile* core \#* *.o libXMenu11.a | |
782 rm -f ../etc/DOC | |
783 clean: mostlyclean | |
784 rm -f emacs-* emacs | |
785 /**/# This is used in making a distribution. | |
786 /**/# Do not use it on development directories! | |
787 distclean: clean | |
5045
ef406a9b2f44
(distclean): Do delete Makefile and Makefile.in.
Richard M. Stallman <rms@gnu.org>
parents:
5035
diff
changeset
|
788 rm -f paths.h config.h Makefile Makefile.in ../etc/DOC-* |
4796 | 789 realclean: distclean |
790 rm -f TAGS | |
791 versionclean: | |
792 -rm -f emacs emacs-* ../etc/DOC* | |
793 extraclean: distclean | |
5035
2906af83fe85
(extraclean): Prevent wildcard from starting comment.
Richard M. Stallman <rms@gnu.org>
parents:
5030
diff
changeset
|
794 -rm -f *~ \#* m/?*~ s/?*~ |
4796 | 795 |
796 /* The rule for the [sm] files has to be written a little funny to | |
797 avoid looking like a C comment to CPP. */ | |
798 SOURCES = *.[ch] [sm]/?* COPYING ymakefile \ | |
799 config.h.in README COPYING ChangeLog vms.pp-trans | |
800 unlock: | |
801 chmod u+w $(SOURCES) | |
802 | |
803 relock: | |
804 chmod -w $(SOURCES) | |
805 chmod +w paths.h | |
806 tagsfiles = [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el | |
807 TAGS: $(tagsfiles) | |
808 etags $(tagsfiles) | |
809 tags: TAGS | |
810 .PHONY: tags |