*** empty log message ***
[emacs.git] / src / Makefile.in
blob0d3f1f3d7672744518a7d90cfeba3c8bfa97d590
1 # Makefile for GNU Emacs.
2 # Copyright (C) 1985, 87, 88, 93, 94, 95, 99, 2000 Free Software Foundation, Inc.
4 # This file is part of GNU Emacs.
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.
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.
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, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # Here are the things that we expect ../configure to edit.
22 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
23 srcdir=@srcdir@
24 VPATH=@srcdir@
25 CC=@CC@
26 CPP=@CPP@
27 CFLAGS=@CFLAGS@
28 CPPFLAGS=@CPPFLAGS@
29 LDFLAGS=@LDFLAGS@
30 LN_S=@LN_S@
31 # Substitute an assignment for the MAKE variable, because
32 # BSD doesn't have it as a default.
33 @SET_MAKE@
34 LIBS = @LIBS@
35 LIBOBJS = @LIBOBJS@
37 # On Xenix and the IBM RS6000, double-dot gets screwed up.
38 dot = .
39 dotdot = ${dot}${dot}
40 lispsource = ${srcdir}/$(dot)$(dot)/lisp/
41 libsrc = $(dot)$(dot)/lib-src/
42 etc = $(dot)$(dot)/etc/
43 oldXMenudir = $(dot)$(dot)/oldXMenu/
44 lwlibdir = $(dot)$(dot)/lwlib/
46 # Configuration files for .o files to depend on.
47 M_FILE = ${srcdir}/@machfile@
48 S_FILE = ${srcdir}/@opsysfile@
49 config_h = config.h $(M_FILE) $(S_FILE)
51 # ========================== start of cpp stuff =======================
52 /* From here on, comments must be done in C syntax. */
54 C_SWITCH_SYSTEM=
56 /* just to be sure the sh is used */
57 SHELL=/bin/sh
59 #define THIS_IS_MAKEFILE
60 #define NO_SHORTNAMES
61 #define NOT_C_CODE
62 #include "config.h"
64 /* We won't really call alloca;
65 don't let the file name alloca.c get messed up. */
66 #ifdef alloca
67 #undef alloca
68 #endif
70 /* Don't let the file name mktime.c get messed up. */
71 #ifdef mktime
72 #undef mktime
73 #endif
75 /* Use HAVE_X11 as an alias for X11 in this file
76 to avoid problems with X11 as a subdirectory name
77 in -I and other such options which pass through this file. */
79 #ifdef X11
80 #define HAVE_X11
81 #undef X11
82 #endif
84 /* On some machines #define register is done in config;
85 don't let it interfere with this file. */
86 #undef register
88 /* On some systems we may not be able to use the system make command. */
89 #ifdef MAKE_COMMAND
90 MAKE = MAKE_COMMAND
91 #endif
93 #ifdef C_COMPILER
94 CC = C_COMPILER
95 #endif
97 /* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
98 Linux is an exception because it uses a funny variant of GNU libc. */
99 #ifdef __GNU_LIBRARY__
100 #ifndef LINUX
101 #define ORDINARY_LINK
102 #endif
103 #endif
105 /* Some machines don't find the standard C libraries in the usual place. */
106 #ifndef ORDINARY_LINK
107 #ifndef LIB_STANDARD
108 #define LIB_STANDARD -lc
109 #endif
110 #else
111 #ifndef LIB_STANDARD
112 #define LIB_STANDARD
113 #endif
114 #endif
116 /* Unless inhibited or changed, use -lg to link for debugging. */
117 #ifndef LIBS_DEBUG
118 #define LIBS_DEBUG -lg
119 #endif
121 /* Some s/SYSTEM.h files define this to request special libraries. */
122 #ifndef LIBS_SYSTEM
123 #define LIBS_SYSTEM
124 #endif
126 /* Some m/MACHINE.h files define this to request special libraries. */
127 #ifndef LIBS_MACHINE
128 #define LIBS_MACHINE
129 #endif
131 #ifndef LIB_MATH
132 # define LIB_MATH -lm
133 #endif /* LIB_MATH */
135 /* Some s/SYSTEM.h files define this to request special switches in ld. */
136 #ifndef LD_SWITCH_SYSTEM
137 #if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)))
138 #define LD_SWITCH_SYSTEM -X
139 #else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
140 #define LD_SWITCH_SYSTEM
141 #endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
142 #endif /* LD_SWITCH_SYSTEM */
144 /* This holds special options for linking temacs
145 that should be used for linking anything else. */
146 #ifndef LD_SWITCH_SYSTEM_TEMACS
147 #define LD_SWITCH_SYSTEM_TEMACS
148 #endif
150 /* Some m/MACHINE.h files define this to request special switches in ld. */
151 #ifndef LD_SWITCH_MACHINE
152 #define LD_SWITCH_MACHINE
153 #endif
155 /* This holds special options for linking temacs
156 that should be used for linking anything else. */
157 #ifndef LD_SWITCH_MACHINE_TEMACS
158 #define LD_SWITCH_MACHINE_TEMACS
159 #endif
161 /* Some m/MACHINE.h files define this to request special switches in cc. */
162 #ifndef C_SWITCH_MACHINE
163 #define C_SWITCH_MACHINE
164 #endif
166 /* Some s/SYSTEM.h files define this to request special switches in cc. */
167 #ifndef C_SWITCH_SYSTEM
168 #define C_SWITCH_SYSTEM
169 #endif
171 /* These macros are for switches specifically related to X Windows. */
172 #ifndef C_SWITCH_X_MACHINE
173 #define C_SWITCH_X_MACHINE
174 #endif
176 #ifndef C_SWITCH_X_SYSTEM
177 #define C_SWITCH_X_SYSTEM
178 #endif
180 #ifndef C_SWITCH_X_SITE
181 #define C_SWITCH_X_SITE
182 #endif
184 #ifndef LD_SWITCH_X_SITE
185 #define LD_SWITCH_X_SITE
186 #endif
188 #ifndef LD_SWITCH_X_DEFAULT
189 #define LD_SWITCH_X_DEFAULT
190 #endif
192 /* These can be passed in from config.h to define special load and
193 compile switches needed by individual sites */
194 #ifndef LD_SWITCH_SITE
195 #define LD_SWITCH_SITE
196 #endif
198 #ifndef C_SWITCH_SITE
199 #define C_SWITCH_SITE
200 #endif
202 #ifndef ORDINARY_LINK
204 #ifndef CRT0_COMPILE
205 #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
206 #endif
208 #ifndef START_FILES
209 #ifdef NO_REMAP
210 #ifdef COFF_ENCAPSULATE
211 #define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
212 #else /* ! defined (COFF_ENCAPSULATE) */
213 #define START_FILES pre-crt0.o /lib/crt0.o
214 #endif /* ! defined (COFF_ENCAPSULATE) */
215 #else /* ! defined (NO_REMAP) */
216 #define START_FILES ecrt0.o
217 #endif /* ! defined (NO_REMAP) */
218 #endif /* START_FILES */
219 STARTFILES = START_FILES
221 #else /* ORDINARY_LINK */
223 /* config.h might want to force START_FILES anyway */
224 #ifdef START_FILES
225 STARTFILES = START_FILES
226 #endif /* START_FILES */
228 #endif /* not ORDINARY_LINK */
231 /* cc switches needed to make `asm' keyword work.
232 Nothing special needed on most machines. */
233 #ifndef C_SWITCH_ASM
234 #define C_SWITCH_ASM
235 #endif
237 /* Figure out whether the system cpp can handle long names.
238 Do it by testing it right now.
239 If it loses, arrange to use the GNU cpp. */
241 #define LONGNAMEBBBFOOX
242 #ifdef LONGNAMEBBBARFOOX
243 /* Installed cpp fails to distinguish those names! */
244 /* Arrange to compile the GNU cpp later on */
245 #define NEED_CPP
246 /* Cause cc to invoke the cpp that comes with Emacs,
247 which will be in a file named localcpp. */
248 MYCPPFLAG= -Blocal
249 /* LOCALCPP is the local one or nothing.
250 CPP is the local one or the standard one. */
251 LOCALCPP= localcpp
252 #endif /* ! defined (LONGNAMEBBBARFOOX) */
254 #ifdef USE_X_TOOLKIT
255 #define USE_@X_TOOLKIT_TYPE@
256 TOOLKIT_DEFINES = -DUSE_@X_TOOLKIT_TYPE@
257 #else
258 TOOLKIT_DEFINES =
259 #endif
261 /* DO NOT use -R. There is a special hack described in lastfile.c
262 which is used instead. Some initialized data areas are modified
263 at initial startup, then labeled as part of the text area when
264 Emacs is dumped for the first time, and never changed again. */
266 /* -Demacs is needed to make some files produce the correct version
267 for use in Emacs.
269 -DHAVE_CONFIG_H is needed for some other files to take advantage of
270 the information in `config.h'. */
272 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
273 since it may have -I options that should override those two. */
274 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(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}
275 .c.o:
276 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
278 #ifndef LIBX10_MACHINE
279 #define LIBX10_MACHINE
280 #endif
282 #ifndef LIBX11_MACHINE
283 #define LIBX11_MACHINE
284 #endif
286 #ifndef LIBX10_SYSTEM
287 #define LIBX10_SYSTEM
288 #endif
290 #ifndef LIBX11_SYSTEM
291 #define LIBX11_SYSTEM
292 #endif
294 #ifndef LIB_X11_LIB
295 #define LIB_X11_LIB -lX11
296 #endif
298 #ifdef HAVE_X_WINDOWS
299 #ifdef HAVE_MENUS
301 /* Include xmenu.o in the list of X object files. */
302 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o
304 /* The X Menu stuff is present in the X10 distribution, but missing
305 from X11. If we have X10, just use the installed library;
306 otherwise, use our own copy. */
307 #ifdef HAVE_X11
308 #ifdef USE_X_TOOLKIT
309 OLDXMENU=${lwlibdir}liblw.a
310 LIBXMENU= $(OLDXMENU)
311 #else /* not USE_X_TOOLKIT */
312 OLDXMENU= ${oldXMenudir}libXMenu11.a
313 LIBXMENU= $(OLDXMENU)
314 #endif /* not USE_X_TOOLKIT */
315 #else /* not HAVE_X11 */
316 LIBXMENU= -lXMenu
317 #endif /* not HAVE_X11 */
319 #else /* not HAVE_MENUS */
321 /* Otherwise, omit xmenu.o from the list of X object files, and
322 don't worry about the menu library at all. */
323 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o
324 LIBXMENU=
325 #endif /* not HAVE_MENUS */
327 #ifdef USE_X_TOOLKIT
328 #define @X_TOOLKIT_TYPE@
329 #if defined (LUCID) || defined (ATHENA)
330 #if HAVE_XAW3D
331 LIBW= -lXaw3d
332 #else
333 LIBW= -lXaw
334 #endif
335 #endif
336 #ifdef MOTIF
337 #if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
338 #define LIB_MOTIF_EXTRA -lXp
339 #else
340 #define LIB_MOTIF_EXTRA
341 #endif
342 #ifdef LIB_MOTIF
343 LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
344 #else
345 LIBW= -lXm LIB_MOTIF_EXTRA
346 #endif
347 #endif
348 #ifdef OPEN_LOOK
349 LIBW= -lXol
350 #endif
352 #ifdef HAVE_X11XTR6
353 #ifdef NEED_LIBW
354 LIBXTR6 = -lSM -lICE -lw
355 #else
356 LIBXTR6 = -lSM -lICE
357 #endif
358 #endif
360 #ifndef LIBXMU
361 #define LIBXMU -lXmu
362 #endif
364 #ifdef LIBXT_STATIC
365 /* We assume the config files have defined STATIC_OPTION
366 since that might depend on the operating system.
367 (Don't forget you need different definitions with and without __GNUC__.) */
368 LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION
369 #else /* not LIBXT_STATIC */
370 LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
371 #endif /* not LIBXT_STATIC */
373 #else /* not USE_X_TOOLKIT */
374 LIBXT=
375 #endif /* not USE_X_TOOLKIT */
377 #if HAVE_XPM
378 #ifndef LIBXPM
379 #define LIBXPM -lXpm
380 #endif /* not defined LIBXPM */
381 #else /* not HAVE_XPM */
382 #define LIBXPM
383 #endif /* not HAVE_XPM */
385 #if HAVE_JPEG
386 #ifndef LIBJPEG
387 #define LIBJPEG -ljpeg
388 #endif /* not defined LIBJPEG */
389 #else /* not HAVE_JPEG */
390 #define LIBJPEG
391 #endif /* not HAVE_JPEG */
393 #if HAVE_PNG
394 #ifndef LIBPNG
395 #define LIBPNG -lpng -lz -lm
396 #endif /* not defined LIBPNG */
397 #else /* not HAVE_PNG */
398 #define LIBPNG
399 #endif /* not HAVE_PNG */
401 #if HAVE_TIFF
402 #ifndef LIBTIFF
403 #define LIBTIFF -ltiff
404 #endif /* not defined LIBTIFF */
405 #else /* not HAVE_TIFF */
406 #define LIBTIFF
407 #endif /* not HAVE_TIFF */
409 #if HAVE_GIF
410 #ifndef LIBGIF
411 #define LIBGIF -lungif
412 #endif /* not defined LIBGIF */
413 #else /* not HAVE_GIF */
414 #define LIBGIF
415 #endif /* not HAVE_GIF */
417 #ifdef HAVE_X11
418 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
419 options for where to find X libraries, but before those libraries. */
420 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
421 LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM LIBXPM LIBTIFF LIBJPEG LIBPNG LIBGIF
422 #else /* not HAVE_X11 */
423 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
424 #endif /* not HAVE_X11 */
425 #endif /* not HAVE_X_WINDOWS */
427 #ifndef ORDINARY_LINK
428 /* Fix linking if compiled with GCC. */
429 #ifdef __GNUC__
431 #if __GNUC__ > 1
433 #ifdef LINKER
434 #define LINKER_WAS_SPECIFIED
435 #endif
437 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
438 places that are difficult to figure out at make time. Fortunately,
439 these same versions allow you to pass arbitrary flags on to the
440 linker, so there's no reason not to use it as a linker.
442 Well, it's not quite perfect. The `-nostdlib' keeps GCC from
443 searching for libraries in its internal directories, so we have to
444 ask GCC explicitly where to find libgcc.a. */
446 #ifndef LINKER
447 #define LINKER $(CC) -nostdlib
448 #endif
450 #ifndef LIB_GCC
451 /* Ask GCC where to find libgcc.a. */
452 #define LIB_GCC `$(CC) -print-libgcc-file-name`
453 #endif /* not LIB_GCC */
455 GNULIB_VAR = LIB_GCC
457 #ifndef LINKER_WAS_SPECIFIED
458 /* GCC passes any argument prefixed with -Xlinker directly to the
459 linker. See prefix-args.c for an explanation of why we don't do
460 this with the shell's `for' construct.
461 Note that some people don't have '.' in their paths, so we must
462 use ./prefix-args. */
463 #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
464 #else
465 #define YMF_PASS_LDFLAGS(flags) flags
466 #endif
468 #else /* __GNUC__ < 2 */
470 #ifndef LIB_GCC
471 #define LIB_GCC /usr/local/lib/gcc-gnulib
472 #endif /* not LIB_GCC */
473 GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
474 #endif /* __GNUC__ < 2 */
475 #else /* not __GNUC__ */
476 GNULIB_VAR =
478 #endif /* not __GNUC__ */
479 #endif /* not ORDINARY_LINK */
481 /* Specify address for ld to start loading at,
482 if requested by configuration. */
483 #ifdef LD_TEXT_START_ADDR
484 STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
485 #endif
487 #ifdef ORDINARY_LINK
488 LD = $(CC)
489 #else
490 #ifdef COFF_ENCAPSULATE
491 LD=$(CC) -nostdlib
492 #else /* not ORDINARY_LINK */
493 #ifdef LINKER
494 LD=LINKER
495 #else /* not LINKER */
496 LD=ld
497 #endif /* not LINKER */
498 #endif /* not COFF_ENCAPSULATE */
499 #endif /* not ORDINARY_LINK */
501 ALL_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE \
502 LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE $(LDFLAGS)
504 /* A macro which other sections of Makefile can redefine to munge the
505 flags before they're passed to LD. This is helpful if you have
506 redefined LD to something odd, like "gcc".
507 (The YMF prefix is a holdover from the old name "ymakefile".)
509 #ifndef YMF_PASS_LDFLAGS
510 #define YMF_PASS_LDFLAGS(flags) flags
511 #endif
513 /* Allow config.h to specify a replacement file for unexec.c. */
514 #ifndef UNEXEC
515 #define UNEXEC unexec.o
516 #endif
517 #ifndef UNEXEC_SRC
518 #define UNEXEC_SRC unexec.c
519 #endif
521 INTERVAL_SRC = intervals.h composite.h
523 #ifdef HAVE_GETLOADAVG
524 #define GETLOADAVG_OBJ
525 #else
526 #define GETLOADAVG_OBJ getloadavg.o
527 #endif
529 #ifdef MSDOS
530 #ifdef HAVE_X_WINDOWS
531 #define MSDOS_OBJ dosfns.o msdos.o
532 #else
533 #define MSDOS_OBJ dosfns.o msdos.o w16select.o
534 #endif
535 #else
536 #define MSDOS_OBJ
537 #endif
540 /* lastfile must follow all files
541 whose initialized data areas should be dumped as pure by dump-emacs. */
542 obj= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \
543 charset.o coding.o category.o ccl.o\
544 cm.o term.o xfaces.o $(XOBJ) \
545 emacs.o keyboard.o macros.o keymap.o sysdep.o \
546 buffer.o filelock.o insdel.o marker.o \
547 minibuf.o fileio.o dired.o filemode.o \
548 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
549 alloc.o data.o doc.o editfns.o callint.o \
550 eval.o floatfns.o fns.o print.o lread.o \
551 abbrev.o syntax.o UNEXEC mocklisp.o bytecode.o \
552 process.o callproc.o \
553 region-cache.o sound.o atimer.o \
554 doprnt.o strftime.o intervals.o textprop.o composite.o \
555 $(LIBOBJS) MSDOS_OBJ
557 /* Object files used on some machine or other.
558 These go in the DOC file on all machines
559 in case they are needed there. */
560 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \
561 xterm.o xfns.o xmenu.o xselect.o xrdb.o
564 #ifdef TERMINFO
565 /* Used to be -ltermcap here. If your machine needs that,
566 define LIBS_TERMCAP in the m/MACHINE.h file. */
567 #ifndef LIBS_TERMCAP
568 #define LIBS_TERMCAP -lcurses
569 #endif /* LIBS_TERMCAP */
570 termcapobj = terminfo.o
571 #else /* ! defined (TERMINFO) */
572 #ifndef LIBS_TERMCAP
573 #define LIBS_TERMCAP
574 termcapobj = termcap.o tparam.o
575 #else /* LIBS_TERMCAP */
576 # ifdef TERMCAP_OBJ
577 termcapobj = TERMCAP_OBJ
578 # else
579 termcapobj = tparam.o
580 # endif /* not TERMCAP_OBJ */
581 #endif /* LIBS_TERMCAP */
582 #endif /* ! defined (TERMINFO) */
585 #ifndef SYSTEM_MALLOC
587 #ifdef DOUG_LEA_MALLOC
588 #ifdef REL_ALLOC
589 mallocobj = ralloc.o vm-limit.o
590 #else /* ! defined (REL_ALLOC) */
591 mallocobj = vm-limit.o
592 #endif /* ! defined (REL_ALLOC) */
593 #else /* ! defined (DOUG_LEA_MALLOC) */
594 #ifdef REL_ALLOC
595 mallocobj = gmalloc.o ralloc.o vm-limit.o
596 #else /* ! defined (REL_ALLOC) */
597 mallocobj = gmalloc.o vm-limit.o
598 #endif /* ! defined (REL_ALLOC) */
599 #endif /* ! defined (DOUG_LEA_MALLOC) */
601 #endif /* SYSTEM_MALLOC */
604 #ifndef HAVE_ALLOCA
605 allocaobj = alloca.o
606 #else
607 allocaobj =
608 #endif
610 #ifdef USE_X_TOOLKIT
611 widgetobj= widget.o
612 #else /* not USE_X_TOOLKIT */
613 widgetobj=
614 #endif /* not USE_X_TOOLKIT */
617 /* define otherobj as list of object files that make-docfile
618 should not be told about. */
619 otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj)
621 #ifdef HAVE_MOUSE
622 #define MOUSE_SUPPORT ${lispsource}mouse.elc \
623 ${lispsource}select.elc ${lispsource}scroll-bar.elc
624 #else
625 #define MOUSE_SUPPORT
626 #endif
628 #ifdef VMS
629 #define VMS_SUPPORT ${lispsource}vmsproc.elc ${lispsource}vms-patch.elc
630 #else
631 #define VMS_SUPPORT
632 #endif
634 #ifdef MSDOS
635 #define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
636 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc
637 #else
638 #define MSDOS_SUPPORT
639 #endif
641 #ifdef WINDOWSNT
642 #define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}w32-fns.elc \
643 ${lispsource}dos-w32.elc
644 #else
645 #define WINNT_SUPPORT
646 #endif
648 /* List of Lisp files loaded into the dumped Emacs. It's arranged
649 like this because it's easier to generate it semi-mechanically from
650 loadup.el this way.
652 Note that this list should not include lisp files which might not
653 be present, like site-load.el and site-init.el; this makefile
654 expects them all to be either present or buildable.
656 Files which are loaded unconditionally should be in shortlisp as well.
657 Files included conditionally here should be included (unconditionally)
658 in SOME_MACHINE_LISP. */
660 lisp= \
661 ${lispsource}abbrev.elc \
662 ${lispsource}buff-menu.elc \
663 ${lispsource}byte-run.elc \
664 ${lispsource}cus-start.el \
665 ${lispsource}custom.elc \
666 ${lispsource}emacs-lisp/lisp-mode.elc \
667 ${lispsource}emacs-lisp/lisp.elc \
668 ${lispsource}faces.elc \
669 ${lispsource}files.elc \
670 ${lispsource}format.elc \
671 ${lispsource}facemenu.elc \
672 MOUSE_SUPPORT \
673 ${lispsource}float-sup.elc \
674 ${lispsource}frame.elc\
675 ${lispsource}help.elc \
676 ${lispsource}indent.elc \
677 ${lispsource}isearch.elc \
678 ${lispsource}loadup.el \
679 ${lispsource}loaddefs.el \
680 ${lispsource}bindings.el \
681 ${lispsource}map-ynp.elc \
682 ${lispsource}menu-bar.elc \
683 ${lispsource}international/mule.elc \
684 ${lispsource}international/mule-conf.el \
685 ${lispsource}international/mule-cmds.elc \
686 ${lispsource}international/characters.elc \
687 ${lispsource}case-table.elc \
688 ${lispsource}language/chinese.elc \
689 ${lispsource}language/cyrillic.elc \
690 ${lispsource}language/indian.elc \
691 ${lispsource}language/devanagari.elc \
692 ${lispsource}language/english.elc \
693 ${lispsource}language/ethiopic.elc \
694 ${lispsource}language/european.elc \
695 ${lispsource}language/czech.elc \
696 ${lispsource}language/slovak.elc \
697 ${lispsource}language/romanian.elc \
698 ${lispsource}language/greek.elc \
699 ${lispsource}language/hebrew.elc \
700 ${lispsource}language/japanese.elc \
701 ${lispsource}language/korean.elc \
702 ${lispsource}language/lao.elc \
703 ${lispsource}language/thai.elc \
704 ${lispsource}language/tibetan.elc \
705 ${lispsource}language/vietnamese.elc \
706 ${lispsource}language/misc-lang.elc \
707 ${lispsource}paths.el \
708 ${lispsource}register.elc \
709 ${lispsource}replace.elc \
710 ${lispsource}simple.elc \
711 ${lispsource}startup.elc \
712 ${lispsource}subr.elc \
713 ${lispsource}term/tty-colors.elc \
714 ${lispsource}textmodes/fill.elc \
715 ${lispsource}textmodes/page.elc \
716 ${lispsource}textmodes/paragraphs.elc \
717 ${lispsource}textmodes/text-mode.elc \
718 ${lispsource}vc-hooks.elc \
719 ${lispsource}ediff-hook.elc \
720 VMS_SUPPORT \
721 MSDOS_SUPPORT \
722 WINNT_SUPPORT \
723 ${lispsource}widget.elc \
724 ${lispsource}window.elc \
725 ${lispsource}version.el
727 /* These are relative file names for the Lisp files
728 that are loaded unconditionally. This is used in make-docfile.
729 It need not contain the files that are loaded conditionally
730 because SOME_MACHINE_LISP has those. */
731 shortlisp= \
732 ../lisp/abbrev.elc \
733 ../lisp/buff-menu.elc \
734 ../lisp/byte-run.elc \
735 ../lisp/cus-start.el \
736 ../lisp/custom.elc \
737 ../lisp/emacs-lisp/lisp-mode.elc \
738 ../lisp/emacs-lisp/lisp.elc \
739 ../lisp/facemenu.elc \
740 ../lisp/faces.elc \
741 ../lisp/files.elc \
742 ../lisp/float-sup.elc \
743 ../lisp/format.elc \
744 ../lisp/frame.elc \
745 ../lisp/help.elc \
746 ../lisp/indent.elc \
747 ../lisp/isearch.elc \
748 ../lisp/loadup.el \
749 ../lisp/loaddefs.el \
750 ../lisp/bindings.el \
751 ../lisp/map-ynp.elc \
752 ../lisp/international/mule.elc \
753 ../lisp/international/mule-conf.el \
754 ../lisp/international/mule-cmds.elc \
755 ../lisp/international/characters.elc \
756 ../lisp/case-table.elc \
757 ../lisp/language/chinese.elc \
758 ../lisp/language/cyrillic.elc \
759 ../lisp/language/indian.elc \
760 ../lisp/language/devanagari.elc \
761 ../lisp/language/english.elc \
762 ../lisp/language/ethiopic.elc \
763 ../lisp/language/european.elc \
764 ../lisp/language/czech.elc \
765 ../lisp/language/slovak.elc \
766 ../lisp/language/romanian.elc \
767 ../lisp/language/greek.elc \
768 ../lisp/language/hebrew.elc \
769 ../lisp/language/japanese.elc \
770 ../lisp/language/korean.elc \
771 ../lisp/language/lao.elc \
772 ../lisp/language/thai.elc \
773 ../lisp/language/tibetan.elc \
774 ../lisp/language/vietnamese.elc \
775 ../lisp/language/misc-lang.elc \
776 ../lisp/paths.el \
777 ../lisp/register.elc \
778 ../lisp/replace.elc \
779 ../lisp/simple.elc \
780 ../lisp/startup.elc \
781 ../lisp/subr.elc \
782 ../lisp/term/tty-colors.elc \
783 ../lisp/textmodes/fill.elc \
784 ../lisp/textmodes/page.elc \
785 ../lisp/textmodes/paragraphs.elc \
786 ../lisp/textmodes/text-mode.elc \
787 ../lisp/vc-hooks.elc \
788 ../lisp/ediff-hook.elc \
789 ../lisp/widget.elc \
790 ../lisp/window.elc \
791 ../lisp/version.el
793 /* Lisp files that may or may not be used.
794 We must unconditionally put them in the DOC file.
795 We use ../lisp/ to start the file names
796 to reduce the size of the argument list for make-docfile
797 for the sake of systems which can't handle large ones. */
798 SOME_MACHINE_LISP = ${dotdot}/lisp/menu-bar.elc ${dotdot}/lisp/mouse.elc \
799 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
800 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
801 ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
802 ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc
804 /* Construct full set of libraries to be linked.
805 Note that SunOS needs -lm to come before -lc; otherwise, you get
806 duplicated symbols. If the standard libraries were compiled
807 with GCC, we might need gnulib again after them. */
808 LIBES = $(LOADLIBES) $(LIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
809 LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
811 /* Enable recompilation of certain other files depending on system type. */
813 #ifndef OTHER_FILES
814 #define OTHER_FILES
815 #endif
817 #ifndef OBJECTS_MACHINE
818 #define OBJECTS_MACHINE
819 #endif
821 all: emacs OTHER_FILES
823 emacs: temacs ${etc}DOC ${lisp}
824 #ifdef CANNOT_DUMP
825 rm -f emacs
826 ln temacs emacs
827 #else
828 #ifdef HAVE_SHM
829 LC_ALL=C ./temacs -nl -batch -l loadup dump
830 #else /* ! defined (HAVE_SHM) */
831 LC_ALL=C ./temacs -batch -l loadup dump
832 #endif /* ! defined (HAVE_SHM) */
833 #endif /* ! defined (CANNOT_DUMP) */
834 -./emacs -q -batch -f list-load-path-shadows
836 /* We run make-docfile twice because the command line may get too long
837 on some systems. */
838 /* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
839 or may not be included in ${obj}, but they are always included in
840 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
841 for the first time, this prevents any variation between configurations
842 in the contents of the DOC file.
843 Likewise for ${SOME_MACHINE_LISP}. */
844 ${etc}DOC: ${libsrc}make-docfile ${obj} ${lisp}
845 -rm -f ${etc}DOC
846 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
847 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
849 ${libsrc}make-docfile:
850 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
852 /* Some systems define this to cause parallel Make-ing. */
853 #ifndef MAKE_PARALLEL
854 #define MAKE_PARALLEL
855 #endif
857 temacs: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args
858 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${ALL_LDFLAGS}) \
859 -o temacs ${STARTFILES} ${obj} ${otherobj} \
860 OBJECTS_MACHINE ${LIBES}
862 /* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
863 often contain options that have to do with using Emacs's crt0,
864 which are only good with temacs. */
865 prefix-args: prefix-args.c $(config_h)
866 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
868 /* These are needed for C compilation, on the systems that need them */
869 #ifdef NEED_CPP
870 CPP = ./localcpp
871 localcpp:
872 cd ${cppdir}; ${MAKE} ${MFLAGS} EMACS=-DEMACS
873 ln ${cppdir}cpp localcpp /* Name where ALL_CFLAGS will refer to it */
874 /* cc appears to be cretinous and require all of these to exist
875 if -B is specified -- we can't use one local pass and let the
876 others be the standard ones. What a loser.
877 We can't even use ln, since they are probably
878 on different disks. */
879 cp /lib/ccom localccom
880 -cp /lib/optim localoptim
881 -cp /lib/c2 localc2
882 cp /bin/as localas
883 #else /* ! defined (NEED_CPP) */
884 CPP = $(CC) -E
885 #endif /* ! defined (NEED_CPP) */
887 /* Don't lose if this was not defined. */
888 #ifndef OLDXMENU_OPTIONS
889 #define OLDXMENU_OPTIONS
890 #endif
892 /* Don't lose if this was not defined. */
893 #ifndef LWLIB_OPTIONS
894 #define LWLIB_OPTIONS
895 #endif
897 #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS)
899 /* We use stamp-xmenu with these two deps
900 to both ensure that lwlib gets remade based on its dependencies
901 in its own makefile,
902 and remake temacs if lwlib gets changed by this. */
903 stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
904 touch stamp-oldxmenu
905 /* Supply an ordering for parallel make. */
906 ../src/$(OLDXMENU): ${OLDXMENU}
908 #ifdef USE_X_TOOLKIT
909 $(OLDXMENU): really-lwlib
911 /* Encode the values of these two macros in Make variables,
912 so we can use $(...) to substitute their values within "...". */
913 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
914 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
915 C_SWITCH_SITE_1 = C_SWITCH_SITE
916 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
917 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
918 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
919 really-lwlib:
920 cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \
921 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
922 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
923 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
924 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
925 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
926 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
927 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
928 @true /* make -t should not create really-lwlib. */
929 .PHONY: really-lwlib
930 #else /* not USE_X_TOOLKIT */
931 $(OLDXMENU): really-oldXMenu
933 /* Encode the values of these two macros in Make variables,
934 so we can use $(...) to substitute their values within "...". */
935 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
936 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
937 C_SWITCH_SITE_1 = C_SWITCH_SITE
938 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
939 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
940 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
941 really-oldXMenu:
942 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
943 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
944 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
945 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
946 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
947 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
948 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
949 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
950 @true /* make -t should not create really-oldXMenu. */
951 .PHONY: really-oldXMenu
952 #endif /* not USE_X_TOOLKIT */
953 #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
955 /* We don't really need this, but satisfy the dependency. */
956 stamp-oldxmenu:
957 touch stamp-oldxmenu
958 #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
960 ../config.status:: epaths.in
961 @echo "The file epaths.h needs to be set up from epaths.in."
962 @echo "Please run the `configure' script again."
963 exit 1
965 ../config.status:: config.in
966 @echo "The file config.h needs to be set up from config.in."
967 @echo "Please run the `configure' script again."
968 exit 1
970 /* Some machines have alloca built-in.
971 They should define HAVE_ALLOCA, or may just let alloca.s
972 be used but generate no code.
973 Some have it written in assembler in alloca.s.
974 Some use the C version in alloca.c (these define C_ALLOCA in config.h).
977 #ifdef C_ALLOCA
978 /* We could put something in alloca.c to #define free and malloc
979 whenever emacs was #defined, but that's not appropriate for all
980 users of alloca in Emacs. Check out ../lib-src/getopt.c. */
981 alloca.o : alloca.c
982 $(CC) -c $(CPPFLAGS) -Dfree=xfree -Dmalloc=xmalloc \
983 $(ALL_CFLAGS) ${srcdir}/alloca.c
984 #else
985 #ifndef HAVE_ALLOCA
986 alloca.o : alloca.s $(config_h)
987 /* $(CPP) is cc -E, which may get confused by filenames
988 that do not end in .c. So copy file to a safe name. */
989 -rm -f allocatem.c
990 cp ${srcdir}/alloca.s allocatem.c
991 /* Remove any ^L, blank lines, and preprocessor comments,
992 since some assemblers barf on them. Use a different basename for the
993 output file, since some stupid compilers (Green Hill's) use that
994 name for the intermediate assembler file. */
995 $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \
996 sed -e 's/\f//' -e 's/^#.*//' | \
997 sed -n -e '/^..*$$/p' > allocax.s
998 -rm -f alloca.o
999 /* Xenix, in particular, needs to run assembler via cc. */
1000 $(CC) -c allocax.s
1001 mv allocax.o alloca.o
1002 -rm -f allocax.s allocatem.c
1003 #endif /* HAVE_ALLOCA */
1004 #endif /* ! defined (C_ALLOCA) */
1006 /* Nearly all the following files depend on lisp.h,
1007 but it is not included as a dependency because
1008 it is so often changed in ways that do not require any recompilation
1009 and so rarely changed in ways that do require any. */
1011 abbrev.o: abbrev.c buffer.h window.h commands.h charset.h $(config_h)
1012 buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
1013 $(INTERVAL_SRC) blockinput.h charset.h $(config_h)
1014 callint.o: callint.c window.h commands.h buffer.h mocklisp.h \
1015 keyboard.h $(config_h)
1016 callproc.o: callproc.c epaths.h buffer.h commands.h $(config_h) \
1017 process.h systty.h syssignal.h charset.h coding.h ccl.h msdos.h
1018 casefiddle.o: casefiddle.c syntax.h commands.h buffer.h composite.h $(config_h)
1019 casetab.o: casetab.c buffer.h $(config_h)
1020 category.o: category.c category.h buffer.h charset.h $(config_h)
1021 ccl.o: ccl.c ccl.h charset.h coding.h $(config_h)
1022 charset.o: charset.c charset.h buffer.h coding.h disptab.h $(config_h)
1023 coding.o: coding.c coding.h ccl.h buffer.h charset.h $(config_h)
1024 cm.o: cm.c cm.h termhooks.h $(config_h)
1025 cmds.o: cmds.c syntax.h buffer.h charset.h commands.h window.h $(config_h) \
1026 msdos.h
1027 pre-crt0.o: pre-crt0.c
1028 ecrt0.o: ecrt0.c $(config_h)
1029 CRT0_COMPILE ${srcdir}/ecrt0.c
1030 dired.o: dired.c commands.h buffer.h $(config_h) charset.h coding.h regex.h \
1031 systime.h
1032 dispnew.o: dispnew.c commands.h frame.h window.h buffer.h dispextern.h \
1033 termchar.h termopts.h termhooks.h cm.h disptab.h systty.h systime.h \
1034 xterm.h blockinput.h charset.h msdos.h composite.h $(config_h)
1035 doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h charset.h
1036 doprnt.o: doprnt.c charset.h $(config_h)
1037 dosfns.o: buffer.h termchar.h termhooks.h frame.h msdos.h dosfns.h $(config_h)
1038 editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
1039 coding.h $(config_h)
1040 emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1041 termhooks.h buffer.h $(INTERVAL_SRC) $(config_h)
1042 fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
1043 coding.h ccl.h msdos.h $(config_h)
1044 filelock.o: filelock.c buffer.h systime.h epaths.h $(config_h)
1045 filemode.o: filemode.c $(config_h)
1046 frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1047 buffer.h charset.h fontset.h msdos.h dosfns.h $(config_h)
1048 fontset.o: dispextern.h fontset.h fontset.c ccl.h charset.h frame.h $(config_h)
1049 getloadavg.o: getloadavg.c $(config_h)
1050 indent.o: indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \
1051 termopts.h disptab.h region-cache.h charset.h composite.h
1052 insdel.o: insdel.c window.h buffer.h $(INTERVAL_SRC) blockinput.h charset.h\
1053 $(config_h)
1054 keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h charset.h \
1055 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
1056 systty.h systime.h dispextern.h syntax.h $(INTERVAL_SRC) blockinput.h \
1057 xterm.h puresize.h msdos.h $(config_h)
1058 keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
1059 puresize.h charset.h $(config_h)
1060 lastfile.o: lastfile.c $(config_h)
1061 macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h $(config_h)
1062 malloc.o: malloc.c $(config_h)
1063 gmalloc.o: gmalloc.c $(config_h)
1064 ralloc.o: ralloc.c $(config_h)
1065 vm-limit.o: vm-limit.c mem-limits.h $(config_h)
1066 marker.o: marker.c buffer.h charset.h $(config_h)
1067 minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h \
1068 buffer.h commands.h charset.h msdos.h $(config_h)
1069 mktime.o: mktime.c $(config_h)
1070 mocklisp.o: mocklisp.c buffer.h $(config_h)
1071 msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
1072 termopts.h termchar.h charset.h coding.h ccl.h disptab.h window.h $(config_h)
1073 process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
1074 commands.h syssignal.h systime.h systty.h syswait.h frame.h \
1075 blockinput.h charset.h coding.h ccl.h msdos.h composite.h $(config_h)
1076 regex.o: regex.c syntax.h buffer.h $(config_h) regex.h category.h charset.h
1077 region-cache.o: region-cache.c buffer.h region-cache.h
1078 scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h $(config_h)
1079 search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
1080 blockinput.h category.h charset.h composite.h $(config_h)
1081 strftime.o: strftime.c $(config_h)
1082 syntax.o: syntax.c syntax.h buffer.h commands.h category.h charset.h \
1083 composite.h $(config_h)
1084 sysdep.o: sysdep.c $(config_h) dispextern.h termhooks.h termchar.h termopts.h \
1085 frame.h syssignal.h systty.h systime.h syswait.h blockinput.h window.h \
1086 msdos.h dosfns.h
1087 term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \
1088 disptab.h keyboard.h charset.h coding.h ccl.h msdos.h
1089 termcap.o: termcap.c $(config_h)
1090 terminfo.o: terminfo.c $(config_h)
1091 tparam.o: tparam.c $(config_h)
1092 undo.o: undo.c buffer.h commands.h $(config_h)
1093 /* This hack is to discard any space that cpp might put at the beginning
1094 of UNEXEC when substituting it in. */
1095 UNEXEC_ALIAS=UNEXEC
1096 $(UNEXEC_ALIAS): UNEXEC_SRC $(config_h)
1097 w16select.o: w16select.c dispextern.h frame.h blockinput.h \
1098 msdos.h $(config_h)
1099 widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1100 $(srcdir)/../lwlib/lwlib.h $(config_h)
1101 window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
1102 termhooks.h disptab.h keyboard.h dispextern.h msdos.h composite.h \
1103 $(config_h)
1104 xdisp.o: xdisp.c macros.h commands.h indent.h buffer.h dispextern.h coding.h \
1105 termchar.h frame.h window.h disptab.h termhooks.h charset.h $(config_h) \
1106 msdos.h composite.h
1107 xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1108 window.h charset.h msdos.h dosfns.h composite.h $(config_h)
1109 xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h\
1110 $(srcdir)/../lwlib/lwlib.h blockinput.h epaths.h charset.h $(config_h)
1111 xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h keyboard.h \
1112 $(srcdir)/../lwlib/lwlib.h blockinput.h msdos.h $(config_h)
1113 xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h \
1114 dispextern.h frame.h disptab.h blockinput.h systime.h syssignal.h \
1115 keyboard.h gnu.h sink.h sinkmask.h charset.h ccl.h fontset.h composite.h \
1116 $(config_h)
1117 xselect.o: xselect.c dispextern.h frame.h xterm.h blockinput.h charset.h \
1118 coding.h ccl.h buffer.h $(config_h)
1119 xrdb.o: xrdb.c $(config_h) epaths.h
1120 hftctl.o: hftctl.c $(config_h)
1121 sound.o: sound.c dispextern.h $(config_h)
1122 atimer.o: atimer.c atimer.h systime.h $(config_h)
1124 /* The files of Lisp proper */
1126 alloc.o: alloc.c frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
1127 blockinput.h charset.h $(config_h) $(INTERVAL_SRC)
1128 bytecode.o: bytecode.c buffer.h syntax.h charset.h $(config_h)
1129 data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
1130 eval.o: eval.c commands.h keyboard.h blockinput.h $(config_h)
1131 floatfns.o: floatfns.c $(config_h)
1132 fns.o: fns.c commands.h $(config_h) frame.h buffer.h keyboard.h \
1133 frame.h window.h $(INTERVAL_SRC)
1134 print.o: print.c process.h frame.h window.h buffer.h keyboard.h charset.h\
1135 $(config_h) dispextern.h msdos.h composite.h
1136 lread.o: lread.c commands.h keyboard.h buffer.h epaths.h charset.h $(config_h) \
1137 termhooks.h msdos.h
1139 /* Text properties support */
1140 textprop.o: textprop.c buffer.h window.h $(INTERVAL_SRC) $(config_h)
1141 intervals.o: intervals.c buffer.h $(INTERVAL_SRC) keyboard.h puresize.h $(config_h)
1142 composite.o: composite.c buffer.h charset.h $(INTERVAL_SRC) $(config_h)
1144 /* System-specific programs to be made.
1145 OTHER_FILES and OBJECTS_MACHINE
1146 select which of these should be compiled. */
1148 sunfns.o: sunfns.c buffer.h window.h $(config_h)
1150 ${libsrc}emacstool: ${libsrc}emacstool.c
1151 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
1152 mostlyclean:
1153 rm -f temacs prefix-args core *.core \#* *.o libXMenu11.a liblw.a
1154 rm -f ../etc/DOC
1155 clean: mostlyclean
1156 rm -f emacs-* emacs bootstrap-emacs
1157 /**/# This is used in making a distribution.
1158 /**/# Do not use it on development directories!
1159 distclean: clean
1160 rm -f epaths.h config.h Makefile Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
1161 maintainer-clean: distclean
1162 @echo "This command is intended for maintainers to use;"
1163 @echo "it deletes files that may require special tools to rebuild."
1164 rm -f TAGS
1165 versionclean:
1166 -rm -f emacs emacs-* ../etc/DOC*
1167 extraclean: distclean
1168 -rm -f *~ \#* m/?*~ s/?*~
1170 /* The rule for the [sm] files has to be written a little funny to
1171 avoid looking like a C comment to CPP. */
1172 SOURCES = *.[ch] [sm]/?* COPYING Makefile.in \
1173 config.in epaths.in README COPYING ChangeLog vms.pp-trans
1174 unlock:
1175 chmod u+w $(SOURCES)
1177 relock:
1178 chmod -w $(SOURCES)
1179 chmod +w epaths.h
1181 /* Arrange to make a tags table TAGS-LISP for ../lisp,
1182 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1183 ctagsfiles1 = [xyzXYZ]*.[hc]
1184 ctagsfiles2 = [a-wA-W]*.[hc]
1185 TAGS: $(srcdir)/$(ctagsfiles)
1186 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1187 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1188 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1189 frc:
1190 TAGS-LISP: frc
1191 $(MAKE) -f ${lispsource}Makefile TAGS-LISP ETAGS=../lib-src/etags \
1192 lispsource=${lispsource}
1193 tags: TAGS TAGS-LISP
1194 .PHONY: tags
1197 /* Bootstrapping. */
1199 bootstrap: bootstrap-emacs
1201 /* Build a temacs with a sufficiently large PURESIZE to load the
1202 Lisp files from loadup.el in source form. */
1204 bootstrap-temacs:
1205 LC_ALL=C $(MAKE) $(MFLAGS) temacs ALL_CFLAGS="$(ALL_CFLAGS) -DPURESIZE=5000000"
1207 /* Dump an Emacs executable named bootstrap-emacs containing the
1208 files from loadup.el in source form. */
1210 bootstrap-emacs: bootstrap-temacs
1211 #ifdef CANNOT_DUMP
1212 ln temacs bootstrap-emacs
1213 #else
1214 #ifdef HAVE_SHM
1215 ./temacs -nl -batch -l loadup bootstrap
1216 #else /* ! defined (HAVE_SHM) */
1217 ./temacs --batch --load loadup bootstrap
1218 #endif /* ! defined (HAVE_SHM) */
1219 #endif /* ! defined (CANNOT_DUMP) */
1220 mv -f emacs bootstrap-emacs
1221 rm -f temacs