(temp_output_buffer_setup): Use delete_all_overlays.
[bpt/emacs.git] / src / Makefile.in
1 # Makefile for GNU Emacs.
2 # Copyright (C) 1985, 87, 88, 93, 94, 95, 99, 2000, 2001, 2003
3 # Free Software Foundation, Inc.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 # Boston, MA 02111-1307, USA.
21
22
23 # Note that this file is edited by msdos/sed1v2.inp for MSDOS. That
24 # script may need modifying in sync with changes made here. Try to
25 # avoid shell-ism because the DOS build has to use the DOS shell.
26
27 # Don't try to replace the cpp processing using autoconf facilities,
28 # says rms.
29
30 # Here are the things that we expect ../configure to edit.
31 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
32 srcdir=@srcdir@
33 VPATH=@srcdir@
34 CC=@CC@
35 CPP=@CPP@
36 CFLAGS=@CFLAGS@
37 CPPFLAGS=@CPPFLAGS@
38 LDFLAGS=@LDFLAGS@
39 LN_S=@LN_S@
40 EXEEXT=@EXEEXT@
41 # Substitute an assignment for the MAKE variable, because
42 # BSD doesn't have it as a default.
43 @SET_MAKE@
44 # Don't use LIBS. configure puts stuff in it that either shouldn't be
45 # linked with Emacs or is duplicated by the cpp stuff below.
46 # LIBS = @LIBS@
47 LIBOBJS = @LIBOBJS@
48
49 # On Xenix and the IBM RS6000, double-dot gets screwed up.
50 dot = .
51 dotdot = ${dot}${dot}
52 lispsource = ${srcdir}/$(dot)$(dot)/lisp/
53 libsrc = $(dot)$(dot)/lib-src/
54 etc = $(dot)$(dot)/etc/
55 oldXMenudir = $(dot)$(dot)/oldXMenu/
56 lwlibdir = $(dot)$(dot)/lwlib/
57 lispdir = $(dot)$(dot)/lisp/
58
59 # Configuration files for .o files to depend on.
60 M_FILE = ${srcdir}/@machfile@
61 S_FILE = ${srcdir}/@opsysfile@
62 config_h = config.h $(M_FILE) $(S_FILE)
63
64 # ========================== start of cpp stuff =======================
65 /* From here on, comments must be done in C syntax. */
66
67 C_SWITCH_SYSTEM=
68
69 /* just to be sure the sh is used */
70 SHELL=/bin/sh
71
72 #define THIS_IS_MAKEFILE
73 #define NO_SHORTNAMES
74 #define NOT_C_CODE
75 #include "config.h"
76
77 #ifndef OPTIMIZE
78 CFLAGS=-g
79 #endif
80
81
82 /* We won't really call alloca;
83 don't let the file name alloca.c get messed up. */
84 #ifdef alloca
85 #undef alloca
86 #endif
87
88 /* Don't let the file name mktime.c get messed up. */
89 #ifdef mktime
90 #undef mktime
91 #endif
92
93 /* Use HAVE_X11 as an alias for X11 in this file
94 to avoid problems with X11 as a subdirectory name
95 in -I and other such options which pass through this file. */
96
97 #ifdef X11
98 #define HAVE_X11
99 #undef X11
100 #endif
101
102 /* On some machines #define register is done in config;
103 don't let it interfere with this file. */
104 #undef register
105
106 /* On some systems we may not be able to use the system make command. */
107 #ifdef MAKE_COMMAND
108 MAKE = MAKE_COMMAND
109 #endif
110
111 #ifdef C_COMPILER
112 CC = C_COMPILER
113 #endif
114
115 /* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
116 GNU/Linux is an exception because it uses a funny variant of GNU libc. */
117 #ifdef __GNU_LIBRARY__
118 #ifndef GNU_LINUX
119 #define ORDINARY_LINK
120 #endif
121 #endif
122
123 /* Some machines don't find the standard C libraries in the usual place. */
124 #ifndef ORDINARY_LINK
125 #ifndef LIB_STANDARD
126 #define LIB_STANDARD -lc
127 #endif
128 #else
129 #ifndef LIB_STANDARD
130 #define LIB_STANDARD
131 #endif
132 #endif
133
134 /* Unless inhibited or changed, use -lg to link for debugging. */
135 #ifndef LIBS_DEBUG
136 #define LIBS_DEBUG -lg
137 #endif
138
139 /* Some s/SYSTEM.h files define this to request special libraries. */
140 #ifndef LIBS_SYSTEM
141 #define LIBS_SYSTEM
142 #endif
143
144 /* Some m/MACHINE.h files define this to request special libraries. */
145 #ifndef LIBS_MACHINE
146 #define LIBS_MACHINE
147 #endif
148
149 #ifndef LIB_MATH
150 # define LIB_MATH -lm
151 #endif /* LIB_MATH */
152
153 /* Some s/SYSTEM.h files define this to request special switches in ld. */
154 #ifndef LD_SWITCH_SYSTEM
155 #if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)))
156 #define LD_SWITCH_SYSTEM -X
157 #else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
158 #define LD_SWITCH_SYSTEM
159 #endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
160 #endif /* LD_SWITCH_SYSTEM */
161
162 /* This holds special options for linking temacs
163 that should be used for linking anything else. */
164 #ifndef LD_SWITCH_SYSTEM_TEMACS
165 #define LD_SWITCH_SYSTEM_TEMACS
166 #endif
167
168 /* Some s/SYSTEM.h files define this to request special switches
169 for compiling temacs. */
170 #ifndef C_SWITCH_SYSTEM_TEMACS
171 #define C_SWITCH_SYSTEM_TEMACS
172 #endif
173
174 /* Some m/MACHINE.h files define this to request special switches in ld. */
175 #ifndef LD_SWITCH_MACHINE
176 #define LD_SWITCH_MACHINE
177 #endif
178
179 /* This holds special options for linking temacs
180 that should be used for linking anything else. */
181 #ifndef LD_SWITCH_MACHINE_TEMACS
182 #define LD_SWITCH_MACHINE_TEMACS
183 #endif
184
185 /* Some m/MACHINE.h files define this to request special switches in cc. */
186 #ifndef C_SWITCH_MACHINE
187 #define C_SWITCH_MACHINE
188 #endif
189
190 /* Some s/SYSTEM.h files define this to request special switches in cc. */
191 #ifndef C_SWITCH_SYSTEM
192 #define C_SWITCH_SYSTEM
193 #endif
194
195 /* These macros are for switches specifically related to X Windows. */
196 #ifndef C_SWITCH_X_MACHINE
197 #define C_SWITCH_X_MACHINE
198 #endif
199
200 #ifndef C_SWITCH_X_SYSTEM
201 #define C_SWITCH_X_SYSTEM
202 #endif
203
204 #ifndef C_SWITCH_X_SITE
205 #define C_SWITCH_X_SITE
206 #endif
207
208 #ifndef LD_SWITCH_X_SITE
209 #define LD_SWITCH_X_SITE
210 #endif
211
212 #ifndef LD_SWITCH_X_DEFAULT
213 #define LD_SWITCH_X_DEFAULT
214 #endif
215
216 /* These can be passed in from config.h to define special load and
217 compile switches needed by individual sites */
218 #ifndef LD_SWITCH_SITE
219 #define LD_SWITCH_SITE
220 #endif
221
222 #ifndef C_SWITCH_SITE
223 #define C_SWITCH_SITE
224 #endif
225
226 #ifndef ORDINARY_LINK
227
228 #ifndef CRT0_COMPILE
229 #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
230 #endif
231
232 #ifndef START_FILES
233 #ifdef NO_REMAP
234 #ifdef COFF_ENCAPSULATE
235 #define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
236 #else /* ! defined (COFF_ENCAPSULATE) */
237 #define START_FILES pre-crt0.o /lib/crt0.o
238 #endif /* ! defined (COFF_ENCAPSULATE) */
239 #else /* ! defined (NO_REMAP) */
240 #define START_FILES ecrt0.o
241 #endif /* ! defined (NO_REMAP) */
242 #endif /* START_FILES */
243 STARTFILES = START_FILES
244
245 #else /* ORDINARY_LINK */
246
247 /* config.h might want to force START_FILES anyway */
248 #ifdef START_FILES
249 STARTFILES = START_FILES
250 #endif /* START_FILES */
251
252 #endif /* not ORDINARY_LINK */
253
254
255 /* cc switches needed to make `asm' keyword work.
256 Nothing special needed on most machines. */
257 #ifndef C_SWITCH_ASM
258 #define C_SWITCH_ASM
259 #endif
260
261 #if HAVE_GTK
262 #define USE_GTK
263 TOOLKIT_DEFINES = -DUSE_GTK
264 #endif
265
266 #ifdef USE_X_TOOLKIT
267 #define USE_@X_TOOLKIT_TYPE@
268 TOOLKIT_DEFINES = -DUSE_@X_TOOLKIT_TYPE@
269 #else
270 #ifndef USE_GTK
271 TOOLKIT_DEFINES =
272 #endif
273 #endif
274
275 /* DO NOT use -R. There is a special hack described in lastfile.c
276 which is used instead. Some initialized data areas are modified
277 at initial startup, then labeled as part of the text area when
278 Emacs is dumped for the first time, and never changed again. */
279
280 /* -Demacs is needed to make some files produce the correct version
281 for use in Emacs.
282
283 -DHAVE_CONFIG_H is needed for some other files to take advantage of
284 the information in `config.h'. */
285
286 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
287 since it may have -I options that should override those two. */
288 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS}
289 .c.o:
290 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
291
292 #ifndef LIBX10_MACHINE
293 #define LIBX10_MACHINE
294 #endif
295
296 #ifndef LIBX11_MACHINE
297 #define LIBX11_MACHINE
298 #endif
299
300 #ifndef LIBX10_SYSTEM
301 #define LIBX10_SYSTEM
302 #endif
303
304 #ifndef LIBX11_SYSTEM
305 #define LIBX11_SYSTEM
306 #endif
307
308 #ifndef LIB_X11_LIB
309 #define LIB_X11_LIB -lX11
310 #endif
311
312 #ifdef HAVE_X_WINDOWS
313 #ifdef HAVE_MENUS
314
315 /* Include xmenu.o in the list of X object files. */
316
317 #ifdef USE_GTK
318 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o gtkutil.o
319 #else
320 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o
321 #endif
322
323 /* The X Menu stuff is present in the X10 distribution, but missing
324 from X11. If we have X10, just use the installed library;
325 otherwise, use our own copy. */
326 #ifdef HAVE_X11
327 #ifdef USE_X_TOOLKIT
328 OLDXMENU=${lwlibdir}liblw.a
329 LIBXMENU= $(OLDXMENU)
330 #else /* not USE_X_TOOLKIT */
331 OLDXMENU= ${oldXMenudir}libXMenu11.a
332 LIBXMENU= $(OLDXMENU)
333 #endif /* not USE_X_TOOLKIT */
334 #else /* not HAVE_X11 */
335 LIBXMENU= -lXMenu
336 #endif /* not HAVE_X11 */
337
338 #else /* not HAVE_MENUS */
339
340 /* Otherwise, omit xmenu.o from the list of X object files, and
341 don't worry about the menu library at all. */
342 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o
343 LIBXMENU=
344 #endif /* not HAVE_MENUS */
345
346 #ifdef USE_X_TOOLKIT
347 #define @X_TOOLKIT_TYPE@
348 #if defined (LUCID) || defined (ATHENA)
349 #if HAVE_XAW3D
350 LIBW= -lXaw3d
351 #else
352 LIBW= -lXaw
353 #endif
354 #endif
355 #ifdef MOTIF
356 #if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
357 #define LIB_MOTIF_EXTRA -lXp
358 #else
359 #define LIB_MOTIF_EXTRA
360 #endif
361 #ifdef LIB_MOTIF
362 LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
363 #else
364 LIBW= -lXm LIB_MOTIF_EXTRA
365 #endif
366 #endif
367 #ifdef OPEN_LOOK
368 LIBW= -lXol
369 #endif
370
371 #ifdef HAVE_X11XTR6
372 #ifdef NEED_LIBW
373 LIBXTR6 = -lSM -lICE -lw
374 #else
375 LIBXTR6 = -lSM -lICE
376 #endif
377 #endif
378
379 #ifndef LIBXMU
380 #define LIBXMU -lXmu
381 #endif
382
383 #ifdef LIBXT_STATIC
384 /* We assume the config files have defined STATIC_OPTION
385 since that might depend on the operating system.
386 (Don't forget you need different definitions with and without __GNUC__.) */
387 LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION
388 #else /* not LIBXT_STATIC */
389 LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
390 #endif /* not LIBXT_STATIC */
391
392 #else /* not USE_X_TOOLKIT */
393
394 #ifdef USE_GTK
395 LIBW=@GTK_LIBS@
396 OLDXMENU=
397 LIBXMENU=
398 #endif /* USE_GTK */
399
400 #ifdef HAVE_X_SM
401 LIBXT=$(LIBW) -lSM -lICE
402 #else
403 LIBXT=$(LIBW)
404 #endif
405 #endif /* not USE_X_TOOLKIT */
406
407 #if HAVE_XPM
408 #ifndef LIBXPM
409 #define LIBXPM -lXpm
410 #endif /* not defined LIBXPM */
411 #else /* not HAVE_XPM */
412 #define LIBXPM
413 #endif /* not HAVE_XPM */
414
415 #if HAVE_JPEG
416 #ifndef LIBJPEG
417 #define LIBJPEG -ljpeg
418 #endif /* not defined LIBJPEG */
419 #else /* not HAVE_JPEG */
420 #define LIBJPEG
421 #endif /* not HAVE_JPEG */
422
423 #if HAVE_PNG
424 #ifndef LIBPNG
425 #define LIBPNG -lpng -lz -lm
426 #endif /* not defined LIBPNG */
427 #else /* not HAVE_PNG */
428 #define LIBPNG
429 #endif /* not HAVE_PNG */
430
431 #if HAVE_TIFF
432 #ifndef LIBTIFF
433 #define LIBTIFF -ltiff
434 #endif /* not defined LIBTIFF */
435 #else /* not HAVE_TIFF */
436 #define LIBTIFF
437 #endif /* not HAVE_TIFF */
438
439 #if HAVE_GIF
440 #ifndef LIBGIF
441 #define LIBGIF -lungif
442 #endif /* not defined LIBGIF */
443 #else /* not HAVE_GIF */
444 #define LIBGIF
445 #endif /* not HAVE_GIF */
446
447 #ifdef HAVE_X11
448 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
449 options for where to find X libraries, but before those libraries. */
450 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
451 LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
452 #else /* not HAVE_X11 */
453 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
454 #endif /* not HAVE_X11 */
455 #endif /* not HAVE_X_WINDOWS */
456
457 LIBSOUND= @LIBSOUND@
458
459 #ifndef ORDINARY_LINK
460 /* Fix linking if compiled with GCC. */
461 #ifdef __GNUC__
462
463 #if __GNUC__ > 1
464
465 #ifdef LINKER
466 #define LINKER_WAS_SPECIFIED
467 #endif
468
469 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
470 places that are difficult to figure out at make time. Fortunately,
471 these same versions allow you to pass arbitrary flags on to the
472 linker, so there's no reason not to use it as a linker.
473
474 Well, it's not quite perfect. The `-nostdlib' keeps GCC from
475 searching for libraries in its internal directories, so we have to
476 ask GCC explicitly where to find libgcc.a. */
477
478 #ifndef LINKER
479 #define LINKER $(CC) -nostdlib
480 #endif
481
482 #ifndef LIB_GCC
483 /* Ask GCC where to find libgcc.a. */
484 #define LIB_GCC `$(CC) -print-libgcc-file-name`
485 #endif /* not LIB_GCC */
486
487 GNULIB_VAR = LIB_GCC
488
489 #ifndef LINKER_WAS_SPECIFIED
490 /* GCC passes any argument prefixed with -Xlinker directly to the
491 linker. See prefix-args.c for an explanation of why we don't do
492 this with the shell's `for' construct.
493 Note that some people don't have '.' in their paths, so we must
494 use ./prefix-args. */
495 #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
496 #else
497 #define YMF_PASS_LDFLAGS(flags) flags
498 #endif
499
500 #else /* __GNUC__ < 2 */
501
502 #ifndef LIB_GCC
503 #define LIB_GCC /usr/local/lib/gcc-gnulib
504 #endif /* not LIB_GCC */
505 GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
506 #endif /* __GNUC__ < 2 */
507 #else /* not __GNUC__ */
508 GNULIB_VAR =
509
510 #endif /* not __GNUC__ */
511 #endif /* not ORDINARY_LINK */
512
513 /* Specify address for ld to start loading at,
514 if requested by configuration. */
515 #ifdef LD_TEXT_START_ADDR
516 STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
517 #endif
518
519 #ifdef ORDINARY_LINK
520 LD = $(CC)
521 #else
522 #ifdef COFF_ENCAPSULATE
523 LD=$(CC) -nostdlib
524 #else /* not ORDINARY_LINK */
525 #ifdef LINKER
526 LD=LINKER
527 #else /* not LINKER */
528 LD=ld
529 #endif /* not LINKER */
530 #endif /* not COFF_ENCAPSULATE */
531 #endif /* not ORDINARY_LINK */
532
533 /* Flags to pass to LD only for temacs. */
534 /* Don't split this line with a backslash. That can cause trouble with
535 some cpps. */
536 TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE
537
538 /* A macro which other sections of Makefile can redefine to munge the
539 flags before they're passed to LD. This is helpful if you have
540 redefined LD to something odd, like "gcc".
541 (The YMF prefix is a holdover from the old name "ymakefile".)
542 */
543 #ifndef YMF_PASS_LDFLAGS
544 #define YMF_PASS_LDFLAGS(flags) flags
545 #endif
546
547 /* Allow config.h to specify a replacement file for unexec.c. */
548 #ifndef UNEXEC
549 #define UNEXEC unexec.o
550 #endif
551 #ifndef UNEXEC_SRC
552 #define UNEXEC_SRC unexec.c
553 #endif
554
555 INTERVAL_SRC = intervals.h composite.h
556
557 GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
558
559 #ifdef MSDOS
560 #ifdef HAVE_X_WINDOWS
561 MSDOS_OBJ = dosfns.o msdos.o
562 #else
563 MSDOS_OBJ = dosfns.o msdos.o w16select.o
564 #endif
565 #endif
566
567 #ifdef HAVE_CARBON
568 mac = $(dot)$(dot)/mac/
569 XMENU_OBJ =
570 MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o
571 emacsapp = $(PWD)/$(mac)Emacs.app/
572 emacsappsrc = ${srcdir}/../mac/Emacs.app/
573 #else
574 XMENU_OBJ = xmenu.o
575 #endif
576
577 /* lastfile must follow all files
578 whose initialized data areas should be dumped as pure by dump-emacs. */
579 obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
580 charset.o coding.o category.o ccl.o \
581 cm.o term.o xfaces.o $(XOBJ) \
582 emacs.o keyboard.o macros.o keymap.o sysdep.o \
583 buffer.o filelock.o insdel.o marker.o \
584 minibuf.o fileio.o dired.o filemode.o \
585 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
586 alloc.o data.o doc.o editfns.o callint.o \
587 eval.o floatfns.o fns.o print.o lread.o \
588 abbrev.o syntax.o UNEXEC bytecode.o \
589 process.o callproc.o \
590 region-cache.o sound.o atimer.o \
591 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
592 $(MSDOS_OBJ) $(MAC_OBJ)
593
594 /* Object files used on some machine or other.
595 These go in the DOC file on all machines
596 in case they are needed there. */
597 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \
598 xterm.o xfns.o xmenu.o xselect.o xrdb.o \
599 mac.o macterm.o macfns.o macmenu.o fontset.o
600
601
602 #ifdef TERMINFO
603 /* Used to be -ltermcap here. If your machine needs that,
604 define LIBS_TERMCAP in the m/MACHINE.h file. */
605 #ifndef LIBS_TERMCAP
606 #define LIBS_TERMCAP -lcurses
607 #endif /* LIBS_TERMCAP */
608 termcapobj = terminfo.o
609 #else /* ! defined (TERMINFO) */
610 #ifndef LIBS_TERMCAP
611 #define LIBS_TERMCAP
612 termcapobj = termcap.o tparam.o
613 #else /* LIBS_TERMCAP */
614 termcapobj = tparam.o
615 #endif /* LIBS_TERMCAP */
616 #endif /* ! defined (TERMINFO) */
617
618
619 #ifndef SYSTEM_MALLOC
620
621 #ifndef DOUG_LEA_MALLOC
622 gmallocobj = gmalloc.o
623 #endif
624
625 #ifdef REL_ALLOC
626 rallocobj = ralloc.o
627 #endif
628
629 mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
630
631 #endif /* SYSTEM_MALLOC */
632
633
634 #ifndef HAVE_ALLOCA
635 allocaobj = alloca.o
636 #else
637 allocaobj =
638 #endif
639
640 #ifdef USE_X_TOOLKIT
641 widgetobj= widget.o
642 #else /* not USE_X_TOOLKIT */
643 widgetobj=
644 #endif /* not USE_X_TOOLKIT */
645
646
647 /* define otherobj as list of object files that make-docfile
648 should not be told about. */
649 otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) $(LIBOBJS)
650
651 #ifdef HAVE_MOUSE
652 #define MOUSE_SUPPORT ${lispsource}mouse.elc \
653 ${lispsource}select.elc ${lispsource}scroll-bar.elc
654 #else
655 #define MOUSE_SUPPORT
656 #endif
657
658 #ifdef VMS
659 #define VMS_SUPPORT ${lispsource}vmsproc.elc ${lispsource}vms-patch.elc
660 #else
661 #define VMS_SUPPORT
662 #endif
663
664 #ifdef MSDOS
665 #define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
666 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
667 ${lispsource}international/ccl.elc ${lispsource}international/codepage.elc
668
669 #else
670 #define MSDOS_SUPPORT
671 #endif
672
673 #ifdef WINDOWSNT
674 #define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
675 ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \
676 ${lispsource}w32-fns.elc
677 #else
678 #define WINNT_SUPPORT
679 #endif
680
681 /* List of Lisp files loaded into the dumped Emacs. It's arranged
682 like this because it's easier to generate it semi-mechanically from
683 loadup.el this way.
684
685 Note that this list should not include lisp files which might not
686 be present, like site-load.el and site-init.el; this makefile
687 expects them all to be either present or buildable.
688
689 Files which are loaded unconditionally should be in shortlisp as well.
690 Files included conditionally here should be included (unconditionally)
691 in SOME_MACHINE_LISP. */
692
693 lisp= \
694 ${lispsource}abbrev.elc \
695 ${lispsource}buff-menu.elc \
696 ${lispsource}button.elc \
697 ${lispsource}emacs-lisp/byte-run.elc \
698 ${lispsource}cus-face.elc \
699 ${lispsource}cus-start.elc \
700 ${lispsource}custom.elc \
701 ${lispsource}emacs-lisp/backquote.elc \
702 ${lispsource}emacs-lisp/lisp-mode.elc \
703 ${lispsource}emacs-lisp/lisp.elc \
704 ${lispsource}env.elc \
705 ${lispsource}faces.elc \
706 ${lispsource}files.elc \
707 ${lispsource}format.elc \
708 ${lispsource}facemenu.elc \
709 MOUSE_SUPPORT \
710 ${lispsource}emacs-lisp/float-sup.elc \
711 ${lispsource}frame.elc \
712 ${lispsource}help.elc \
713 ${lispsource}indent.elc \
714 ${lispsource}isearch.elc \
715 ${lispsource}loadup.el \
716 ${lispsource}loaddefs.el \
717 ${lispsource}bindings.elc \
718 ${lispsource}emacs-lisp/map-ynp.elc \
719 ${lispsource}menu-bar.elc \
720 ${lispsource}international/mule.elc \
721 ${lispsource}international/mule-conf.el \
722 ${lispsource}international/mule-cmds.elc \
723 ${lispsource}international/characters.elc \
724 ${lispsource}international/ucs-tables.elc \
725 ${lispsource}international/utf-8.elc \
726 ${lispsource}international/utf-16.elc \
727 ${lispsource}international/latin-1.el \
728 ${lispsource}international/latin-2.el \
729 ${lispsource}international/latin-3.el \
730 ${lispsource}international/latin-4.el \
731 ${lispsource}international/latin-5.el \
732 ${lispsource}international/latin-8.el \
733 ${lispsource}international/latin-9.el \
734 ${lispsource}case-table.elc \
735 ${lispsource}language/chinese.elc \
736 ${lispsource}language/cyrillic.elc \
737 ${lispsource}language/indian.elc \
738 ${lispsource}language/devanagari.el \
739 ${lispsource}language/malayalam.el \
740 ${lispsource}language/tamil.el \
741 ${lispsource}language/english.el \
742 ${lispsource}language/ethiopic.elc \
743 ${lispsource}language/european.elc \
744 ${lispsource}language/czech.el \
745 ${lispsource}language/slovak.el \
746 ${lispsource}language/romanian.el \
747 ${lispsource}language/greek.el \
748 ${lispsource}language/hebrew.el \
749 ${lispsource}language/japanese.el \
750 ${lispsource}language/korean.el \
751 ${lispsource}language/lao.el \
752 ${lispsource}language/thai.el \
753 ${lispsource}language/tibetan.elc \
754 ${lispsource}language/vietnamese.elc \
755 ${lispsource}language/misc-lang.el \
756 ${lispsource}language/utf-8-lang.el \
757 ${lispsource}language/georgian.el \
758 ${lispsource}paths.el \
759 ${lispsource}register.elc \
760 ${lispsource}replace.elc \
761 ${lispsource}simple.elc \
762 ${lispsource}startup.elc \
763 ${lispsource}subr.elc \
764 ${lispsource}term/tty-colors.elc \
765 ${lispsource}font-core.elc \
766 ${lispsource}textmodes/fill.elc \
767 ${lispsource}textmodes/page.elc \
768 ${lispsource}textmodes/paragraphs.elc \
769 ${lispsource}textmodes/text-mode.elc \
770 ${lispsource}emacs-lisp/timer.elc \
771 ${lispsource}vc-hooks.elc \
772 ${lispsource}ediff-hook.elc \
773 VMS_SUPPORT \
774 MSDOS_SUPPORT \
775 WINNT_SUPPORT \
776 ${lispsource}widget.elc \
777 ${lispsource}window.elc \
778 ${lispsource}version.el
779
780 /* These are relative file names for the Lisp files
781 that are loaded unconditionally. This is used in make-docfile.
782 It need not contain the files that are loaded conditionally
783 because SOME_MACHINE_LISP has those. */
784 shortlisp= \
785 ../lisp/abbrev.elc \
786 ../lisp/buff-menu.elc \
787 ../lisp/button.elc \
788 ../lisp/emacs-lisp/byte-run.elc \
789 ../lisp/cus-face.elc \
790 ../lisp/cus-start.elc \
791 ../lisp/custom.elc \
792 ../lisp/emacs-lisp/backquote.elc \
793 ../lisp/emacs-lisp/lisp-mode.elc \
794 ../lisp/emacs-lisp/lisp.elc \
795 ../lisp/facemenu.elc \
796 ../lisp/faces.elc \
797 ../lisp/files.elc \
798 ../lisp/emacs-lisp/float-sup.elc \
799 ../lisp/format.elc \
800 ../lisp/frame.elc \
801 ../lisp/help.elc \
802 ../lisp/indent.elc \
803 ../lisp/isearch.elc \
804 ../lisp/loadup.el \
805 ../lisp/loaddefs.el \
806 ../lisp/bindings.elc \
807 ../lisp/emacs-lisp/map-ynp.elc \
808 ../lisp/env.elc \
809 ../lisp/international/mule.elc \
810 ../lisp/international/mule-conf.el \
811 ../lisp/international/mule-cmds.elc \
812 ../lisp/international/characters.elc \
813 ../lisp/international/ucs-tables.elc \
814 ../lisp/international/utf-8.elc \
815 ../lisp/international/utf-16.elc \
816 ../lisp/international/latin-1.el \
817 ../lisp/international/latin-2.el \
818 ../lisp/international/latin-3.el \
819 ../lisp/international/latin-4.el \
820 ../lisp/international/latin-5.el \
821 ../lisp/international/latin-8.el \
822 ../lisp/international/latin-9.el \
823 ../lisp/case-table.elc \
824 ../lisp/language/chinese.elc \
825 ../lisp/language/cyrillic.elc \
826 ../lisp/language/indian.elc \
827 ../lisp/language/devanagari.el \
828 ../lisp/language/malayalam.el \
829 ../lisp/language/tamil.el \
830 ../lisp/language/english.el \
831 ../lisp/language/ethiopic.elc \
832 ../lisp/language/european.elc \
833 ../lisp/language/czech.el \
834 ../lisp/language/slovak.el \
835 ../lisp/language/romanian.el \
836 ../lisp/language/greek.el \
837 ../lisp/language/hebrew.el \
838 ../lisp/language/japanese.el \
839 ../lisp/language/korean.el \
840 ../lisp/language/lao.el \
841 ../lisp/language/thai.el \
842 ../lisp/language/tibetan.elc \
843 ../lisp/language/vietnamese.elc \
844 ../lisp/language/misc-lang.el \
845 ../lisp/language/utf-8-lang.el \
846 ../lisp/language/georgian.el \
847 ../lisp/menu-bar.elc \
848 ../lisp/paths.el \
849 ../lisp/register.elc \
850 ../lisp/replace.elc \
851 ../lisp/simple.elc \
852 ../lisp/startup.elc \
853 ../lisp/subr.elc \
854 ../lisp/term/tty-colors.elc \
855 ../lisp/font-core.elc \
856 ../lisp/textmodes/fill.elc \
857 ../lisp/textmodes/page.elc \
858 ../lisp/textmodes/paragraphs.elc \
859 ../lisp/textmodes/text-mode.elc \
860 ../lisp/emacs-lisp/timer.elc \
861 ../lisp/vc-hooks.elc \
862 ../lisp/ediff-hook.elc \
863 ../lisp/widget.elc \
864 ../lisp/window.elc \
865 ../lisp/version.el
866
867 /* Lisp files that may or may not be used.
868 We must unconditionally put them in the DOC file.
869 We use ../lisp/ to start the file names
870 to reduce the size of the argument list for make-docfile
871 for the sake of systems which can\'t handle large ones. */
872 SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
873 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
874 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
875 ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
876 ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc \
877 ${dotdot}/lisp/disp-table.elc ${dotdot}/lisp/dos-vars.elc \
878 ${dotdot}/lisp/international/ccl.elc \
879 ${dotdot}/lisp/international/codepage.elc
880
881 /* Construct full set of libraries to be linked.
882 Note that SunOS needs -lm to come before -lc; otherwise, you get
883 duplicated symbols. If the standard libraries were compiled
884 with GCC, we might need gnulib again after them. */
885 LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \
886 LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
887 LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \
888 $(GNULIB_VAR)
889
890 /* Enable recompilation of certain other files depending on system type. */
891
892 #ifndef OTHER_FILES
893 #define OTHER_FILES
894 #endif
895
896 #ifndef OBJECTS_MACHINE
897 #define OBJECTS_MACHINE
898 #endif
899
900 all: emacs${EXEEXT} OTHER_FILES
901
902 emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
903 #ifdef CANNOT_DUMP
904 rm -f emacs${EXEEXT}
905 ln temacs${EXEEXT} emacs${EXEEXT}
906 #else
907 #ifdef HAVE_SHM
908 LC_ALL=C ./temacs -nl -batch -l loadup dump
909 #else /* ! defined (HAVE_SHM) */
910 LC_ALL=C ./temacs -batch -l loadup dump
911 #endif /* ! defined (HAVE_SHM) */
912 #endif /* ! defined (CANNOT_DUMP) */
913 -./emacs -q -batch -f list-load-path-shadows
914
915 /* We run make-docfile twice because the command line may get too long
916 on some systems. */
917 /* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
918 or may not be included in ${obj}, but they are always included in
919 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
920 for the first time, this prevents any variation between configurations
921 in the contents of the DOC file.
922 Likewise for ${SOME_MACHINE_LISP}. */
923 ${etc}DOC: ${libsrc}make-docfile ${obj} ${shortlisp} ${SOME_MACHINE_LISP}
924 -rm -f ${etc}DOC
925 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
926 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
927
928 ${libsrc}make-docfile${EXEEXT}:
929 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
930
931 /* Some systems define this to cause parallel Make-ing. */
932 #ifndef MAKE_PARALLEL
933 #define MAKE_PARALLEL
934 #endif
935
936 temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT}
937 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
938 -o temacs ${STARTFILES} ${obj} ${otherobj} \
939 OBJECTS_MACHINE ${LIBES}
940
941 /* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
942 often contain options that have to do with using Emacs's crt0,
943 which are only good with temacs. */
944 prefix-args${EXEEXT}: prefix-args.c $(config_h)
945 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
946
947 /* Don't lose if this was not defined. */
948 #ifndef OLDXMENU_OPTIONS
949 #define OLDXMENU_OPTIONS
950 #endif
951
952 /* Don't lose if this was not defined. */
953 #ifndef LWLIB_OPTIONS
954 #define LWLIB_OPTIONS
955 #endif
956
957 #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS)
958
959 /* We use stamp-xmenu with these two deps
960 to both ensure that lwlib gets remade based on its dependencies
961 in its own makefile,
962 and remake temacs if lwlib gets changed by this. */
963 stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
964 touch stamp-oldxmenu
965 /* Supply an ordering for parallel make. */
966 ../src/$(OLDXMENU): ${OLDXMENU}
967
968 #ifdef USE_X_TOOLKIT
969 $(OLDXMENU): really-lwlib
970
971 /* Encode the values of these two macros in Make variables,
972 so we can use $(...) to substitute their values within "...". */
973 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
974 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
975 C_SWITCH_SITE_1 = C_SWITCH_SITE
976 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
977 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
978 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
979 really-lwlib:
980 cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \
981 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
982 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
983 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
984 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
985 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
986 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
987 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
988 @true /* make -t should not create really-lwlib. */
989 .PHONY: really-lwlib
990 #else /* not USE_X_TOOLKIT */
991 $(OLDXMENU): really-oldXMenu
992
993 /* Encode the values of these two macros in Make variables,
994 so we can use $(...) to substitute their values within "...". */
995 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
996 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
997 C_SWITCH_SITE_1 = C_SWITCH_SITE
998 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
999 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
1000 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
1001 really-oldXMenu:
1002 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
1003 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
1004 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
1005 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
1006 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
1007 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
1008 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
1009 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
1010 @true /* make -t should not create really-oldXMenu. */
1011 .PHONY: really-oldXMenu
1012 #endif /* not USE_X_TOOLKIT */
1013 #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
1014
1015 /* We don\'t really need this, but satisfy the dependency. */
1016 stamp-oldxmenu:
1017 touch stamp-oldxmenu
1018 #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
1019
1020 ../config.status:: epaths.in
1021 @echo "The file epaths.h needs to be set up from epaths.in."
1022 @echo "Please run the `configure' script again."
1023 exit 1
1024
1025 ../config.status:: config.in
1026 @echo "The file config.h needs to be set up from config.in."
1027 @echo "Please run the `configure' script again."
1028 exit 1
1029
1030 /* Some machines have alloca built-in.
1031 They should define HAVE_ALLOCA, or may just let alloca.s
1032 be used but generate no code.
1033 Some have it written in assembler in alloca.s.
1034 Some use the C version in alloca.c (these define C_ALLOCA in config.h).
1035 */
1036
1037 #ifdef C_ALLOCA
1038 /* We could put something in alloca.c to #define free and malloc
1039 whenever emacs was #defined, but that's not appropriate for all
1040 users of alloca in Emacs. Check out ../lib-src/getopt.c. */
1041 alloca.o : alloca.c
1042 $(CC) -c $(CPPFLAGS) -DEMACS_FREE=xfree -DDO_BLOCK_INPUT \
1043 $(ALL_CFLAGS) ${srcdir}/alloca.c
1044 #else
1045 #ifndef HAVE_ALLOCA
1046 alloca.o : alloca.s $(config_h)
1047 /* $(CPP) is cc -E, which may get confused by filenames
1048 that do not end in .c. So copy file to a safe name. */
1049 -rm -f allocatem.c
1050 cp ${srcdir}/alloca.s allocatem.c
1051 /* Remove any ^L, blank lines, and preprocessor comments,
1052 since some assemblers barf on them. Use a different basename for the
1053 output file, since some stupid compilers (Green Hill's) use that
1054 name for the intermediate assembler file. */
1055 $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \
1056 sed -e 's/\f//' -e 's/^#.*//' | \
1057 sed -n -e '/^..*$$/p' > allocax.s
1058 -rm -f alloca.o
1059 /* Xenix, in particular, needs to run assembler via cc. */
1060 $(CC) -c allocax.s
1061 mv allocax.o alloca.o
1062 -rm -f allocax.s allocatem.c
1063 #endif /* HAVE_ALLOCA */
1064 #endif /* ! defined (C_ALLOCA) */
1065
1066 /* Nearly all the following files depend on lisp.h,
1067 but it is not included as a dependency because
1068 it is so often changed in ways that do not require any recompilation
1069 and so rarely changed in ways that do require any. */
1070
1071 abbrev.o: abbrev.c buffer.h window.h dispextern.h commands.h charset.h \
1072 $(config_h)
1073 buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
1074 dispextern.h $(INTERVAL_SRC) blockinput.h atimer.h systime.h charset.h \
1075 $(config_h)
1076 callint.o: callint.c window.h commands.h buffer.h \
1077 keyboard.h dispextern.h $(config_h)
1078 callproc.o: callproc.c epaths.h buffer.h commands.h $(config_h) \
1079 process.h systty.h syssignal.h charset.h coding.h ccl.h msdos.h \
1080 composite.h
1081 casefiddle.o: casefiddle.c syntax.h commands.h buffer.h composite.h $(config_h)
1082 casetab.o: casetab.c buffer.h $(config_h)
1083 category.o: category.c category.h buffer.h charset.h $(config_h)
1084 ccl.o: ccl.c ccl.h charset.h coding.h $(config_h)
1085 charset.o: charset.c charset.h buffer.h coding.h composite.h disptab.h \
1086 $(config_h)
1087 coding.o: coding.c coding.h ccl.h buffer.h charset.h $(config_h)
1088 cm.o: cm.c cm.h termhooks.h $(config_h)
1089 cmds.o: cmds.c syntax.h buffer.h charset.h commands.h window.h $(config_h) \
1090 msdos.h dispextern.h
1091 pre-crt0.o: pre-crt0.c
1092 ecrt0.o: ecrt0.c $(config_h)
1093 CRT0_COMPILE ${srcdir}/ecrt0.c
1094 dired.o: dired.c commands.h buffer.h $(config_h) charset.h coding.h regex.h \
1095 systime.h
1096 dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \
1097 window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \
1098 disptab.h \
1099 xterm.h blockinput.h atimer.h charset.h msdos.h composite.h keyboard.h \
1100 $(config_h)
1101 doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h charset.h
1102 doprnt.o: doprnt.c charset.h $(config_h)
1103 dosfns.o: buffer.h termchar.h termhooks.h frame.h msdos.h dosfns.h $(config_h)
1104 editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
1105 coding.h dispextern.h $(config_h)
1106 emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1107 termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h)
1108 fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
1109 coding.h ccl.h msdos.h dispextern.h $(config_h)
1110 filelock.o: filelock.c buffer.h systime.h epaths.h $(config_h)
1111 filemode.o: filemode.c $(config_h)
1112 frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1113 blockinput.h atimer.h systime.h buffer.h charset.h fontset.h \
1114 msdos.h dosfns.h dispextern.h $(config_h)
1115 fontset.o: dispextern.h fontset.h fontset.c ccl.h buffer.h charset.h frame.h \
1116 keyboard.h $(config_h)
1117 getloadavg.o: getloadavg.c $(config_h)
1118 indent.o: indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \
1119 termopts.h disptab.h region-cache.h charset.h composite.h dispextern.h \
1120 keyboard.h
1121 insdel.o: insdel.c window.h buffer.h $(INTERVAL_SRC) blockinput.h charset.h \
1122 dispextern.h atimer.h systime.h $(config_h)
1123 keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h charset.h \
1124 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
1125 systty.h systime.h dispextern.h syntax.h $(INTERVAL_SRC) blockinput.h \
1126 atimer.h xterm.h puresize.h msdos.h $(config_h)
1127 keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
1128 atimer.h systime.h puresize.h charset.h intervals.h $(config_h)
1129 lastfile.o: lastfile.c $(config_h)
1130 macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
1131 dispextern.h $(config_h)
1132 malloc.o: malloc.c $(config_h)
1133 gmalloc.o: gmalloc.c $(config_h)
1134 ralloc.o: ralloc.c $(config_h)
1135 vm-limit.o: vm-limit.c mem-limits.h $(config_h)
1136 marker.o: marker.c buffer.h charset.h $(config_h)
1137 md5.o: md5.c md5.h $(config_h)
1138 minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h keyboard.h \
1139 buffer.h commands.h charset.h msdos.h $(config_h)
1140 mktime.o: mktime.c $(config_h)
1141 msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
1142 termopts.h termchar.h charset.h coding.h ccl.h disptab.h window.h \
1143 keyboard.h $(config_h)
1144 process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
1145 commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
1146 blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
1147 keyboard.h $(config_h)
1148 regex.o: regex.c syntax.h buffer.h $(config_h) regex.h category.h charset.h
1149 region-cache.o: region-cache.c buffer.h region-cache.h
1150 scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \
1151 $(config_h)
1152 search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
1153 blockinput.h atimer.h systime.h category.h charset.h composite.h $(config_h)
1154 strftime.o: strftime.c $(config_h)
1155 syntax.o: syntax.c syntax.h buffer.h commands.h category.h charset.h \
1156 composite.h $(config_h)
1157 sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \
1158 process.h dispextern.h termhooks.h termchar.h termopts.h \
1159 frame.h atimer.h window.h msdos.h dosfns.h keyboard.h $(config_h)
1160 term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \
1161 disptab.h dispextern.h keyboard.h charset.h coding.h ccl.h msdos.h
1162 termcap.o: termcap.c $(config_h)
1163 terminfo.o: terminfo.c $(config_h)
1164 tparam.o: tparam.c $(config_h)
1165 undo.o: undo.c buffer.h commands.h $(config_h)
1166 /* This hack is to discard any space that cpp might put at the beginning
1167 of UNEXEC when substituting it in. */
1168 UNEXEC_ALIAS=UNEXEC
1169 $(UNEXEC_ALIAS): UNEXEC_SRC $(config_h)
1170 w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
1171 msdos.h $(config_h)
1172 widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1173 $(srcdir)/../lwlib/lwlib.h $(config_h)
1174 window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
1175 termhooks.h disptab.h keyboard.h dispextern.h msdos.h composite.h \
1176 $(config_h)
1177 xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h coding.h \
1178 termchar.h frame.h window.h disptab.h termhooks.h charset.h $(config_h) \
1179 msdos.h composite.h fontset.h blockinput.h atimer.h systime.h keymap.h
1180 xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1181 window.h charset.h msdos.h dosfns.h composite.h atimer.h systime.h $(config_h)
1182 xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \
1183 $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \
1184 charset.h gtkutil.h $(config_h)
1185 xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
1186 keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h \
1187 gtkutil.h msdos.h $(config_h)
1188 xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
1189 dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
1190 keyboard.h gnu.h charset.h ccl.h fontset.h composite.h \
1191 coding.h process.h gtkutil.h $(config_h)
1192 xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
1193 buffer.h atimer.h systime.h $(config_h)
1194 xrdb.o: xrdb.c $(config_h) epaths.h
1195 xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h
1196 gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \
1197 blockinput.h window.h atimer.h termhooks.h
1198
1199 hftctl.o: hftctl.c $(config_h)
1200 sound.o: sound.c dispextern.h $(config_h)
1201 atimer.o: atimer.c atimer.h systime.h $(config_h)
1202
1203 /* The files of Lisp proper */
1204
1205 alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
1206 blockinput.h atimer.h systime.h charset.h dispextern.h $(config_h) $(INTERVAL_SRC)
1207 bytecode.o: bytecode.c buffer.h syntax.h charset.h $(config_h)
1208 data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
1209 eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
1210 $(config_h)
1211 floatfns.o: floatfns.c $(config_h)
1212 fns.o: fns.c commands.h $(config_h) frame.h buffer.h charset.h keyboard.h \
1213 frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h
1214 print.o: print.c process.h frame.h window.h buffer.h keyboard.h charset.h \
1215 $(config_h) dispextern.h msdos.h composite.h
1216 lread.o: lread.c commands.h keyboard.h buffer.h epaths.h charset.h $(config_h) \
1217 termhooks.h coding.h msdos.h
1218
1219 /* Text properties support */
1220 textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \
1221 $(config_h)
1222 intervals.o: intervals.c buffer.h $(INTERVAL_SRC) keyboard.h puresize.h $(config_h)
1223 composite.o: composite.c buffer.h charset.h $(INTERVAL_SRC) $(config_h)
1224
1225 /* System-specific programs to be made.
1226 OTHER_FILES and OBJECTS_MACHINE
1227 select which of these should be compiled. */
1228
1229 sunfns.o: sunfns.c buffer.h window.h dispextern.h $(config_h)
1230
1231 #ifdef HAVE_CARBON
1232 abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
1233 fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
1234 scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
1235 xterm.o xselect.o sound.o: macgui.h
1236 mac.o: mac.c process.h sysselect.h systime.h $(config_h)
1237 macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \
1238 dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
1239 atimer.h systime.h epaths.h termhooks.h coding.h ccl.h systime.h $(config_h)
1240 macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \
1241 keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h)
1242 macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \
1243 frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \
1244 termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
1245 process.h coding.h $(config_h)
1246
1247 ${emacsapp}Contents/Resources/English.lproj:
1248 mkdir -p $@
1249
1250 ifneq (${emacsapp},${emacsappsrc})
1251 ${emacsapp}Contents/Info.plist: ${emacsappsrc}Contents/Info.plist
1252 cp $< $@
1253 ${emacsapp}Contents/PkgInfo: ${emacsappsrc}Contents/PkgInfo
1254 cp $< $@
1255 ${emacsapp}Contents/Resources/Emacs.icns: ${emacsappsrc}Contents/Resources/Emacs.icns
1256 mkdir -p ${emacsapp}Contents/Resources
1257 cp $< $@
1258 ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings: ${emacsappsrc}Contents/Resources/English.lproj/InfoPlist.strings
1259 cp $< $@
1260 endif
1261
1262 macosx-bundle: ${emacsapp}Contents/Resources/English.lproj \
1263 ${emacsapp}Contents/Info.plist ${emacsapp}Contents/PkgInfo \
1264 ${emacsapp}Contents/Resources/Emacs.icns \
1265 ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings
1266 macosx-app: macosx-bundle ${emacsapp}Contents/MacOS/Emacs \
1267 ${emacsapp}Contents/Resources/Emacs.rsrc
1268 ${emacsapp}Contents/MacOS/Emacs: emacs${EXEEXT}
1269 mkdir -p ${emacsapp}Contents/MacOS/;
1270 cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} Emacs${EXEEXT}
1271 ${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
1272 /Developer/Tools/Rez -useDF \
1273 -o ${emacsapp}Contents/Resources/Emacs.rsrc \
1274 /System/Library/Frameworks/Carbon.framework/Headers/Carbon.r $<
1275 #endif
1276
1277 ${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c
1278 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT}
1279 bootstrapclean:
1280 rm -f bootstrap-emacs${EXEEXT}
1281 mostlyclean:
1282 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
1283 rm -f ../etc/DOC
1284 rm -f bootstrap-emacs${EXEEXT}
1285 clean: mostlyclean
1286 rm -f emacs-*${EXEEXT} emacs${EXEEXT}
1287 /**/# This is used in making a distribution.
1288 /**/# Do not use it on development directories!
1289 distclean: clean
1290 rm -f epaths.h config.h Makefile Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
1291 mv ./.gdbinit ./.gdbinit.save
1292 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
1293 else mv ./.gdbinit.save ./.gdbinit; fi
1294 maintainer-clean: distclean
1295 @echo "This command is intended for maintainers to use;"
1296 @echo "it deletes files that may require special tools to rebuild."
1297 rm -f TAGS
1298 versionclean:
1299 -rm -f emacs${EXEEXT} emacs-* ../etc/DOC*
1300 extraclean: distclean
1301 -rm -f *~ \#* m/?*~ s/?*~
1302
1303 /* The rule for the [sm] files has to be written a little funny to
1304 avoid looking like a C comment to CPP. */
1305 SOURCES = *.[ch] [sm]/?* COPYING Makefile.in \
1306 config.in epaths.in README COPYING ChangeLog vms.pp-trans
1307 unlock:
1308 chmod u+w $(SOURCES)
1309
1310 relock:
1311 chmod -w $(SOURCES)
1312 chmod +w epaths.h
1313
1314 /* Arrange to make a tags table TAGS-LISP for ../lisp,
1315 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1316
1317 ctagsfiles1 = [xyzXYZ]*.[hc]
1318 ctagsfiles2 = [a-wA-W]*.[hc]
1319
1320 TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1321 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1322 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1323 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1324 frc:
1325 TAGS-LISP: frc
1326 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
1327
1328 $(lwlibdir)TAGS:
1329 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
1330
1331 tags: TAGS TAGS-LISP $(lwlibdir)TAGS
1332 .PHONY: tags
1333
1334
1335 /* Bootstrapping. */
1336
1337 bootstrap: bootstrap-emacs${EXEEXT}
1338
1339 /* Dump an Emacs executable named bootstrap-emacs containing the
1340 files from loadup.el in source form. */
1341
1342 bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
1343 #ifdef CANNOT_DUMP
1344 ln temacs${EXEEXT} bootstrap-emacs${EXEEXT}
1345 #else
1346 #ifdef HAVE_SHM
1347 ./temacs -nl -batch -l loadup bootstrap
1348 #else /* ! defined (HAVE_SHM) */
1349 ./temacs --batch --load loadup bootstrap
1350 #endif /* ! defined (HAVE_SHM) */
1351 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
1352 #endif /* ! defined (CANNOT_DUMP) */
1353