* frames.texi (Pop-Up Menus): Document where menu title comes from (Bug#7684).
[emacs.git] / src / Makefile.in
blobe92f2bb3b858361b5278d185f1843276d157716d
1 # Makefile for GNU Emacs.
2 # Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
3 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 # Free Software Foundation, Inc.
6 # This file is part of GNU Emacs.
8 # GNU Emacs is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # GNU Emacs is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 # Note that this file is edited by msdos/sed1v2.inp for MSDOS. That
23 # script may need modifying in sync with changes made here. Try to
24 # avoid shell-ism because the DOS build has to use the DOS shell.
26 # Don't try to replace the cpp processing using autoconf facilities,
27 # says rms.
28 # Replacing a particular part of the conditionals to work via autoconf
29 # is OK.
30 # Some of the conditionals might be dead now. Finding them and
31 # deleting them would be fine.
34 # Here are the things that we expect ../configure to edit.
35 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
36 srcdir=@srcdir@
37 VPATH=@srcdir@
38 CC=@CC@
39 CPP=@CPP@
40 CFLAGS=@CFLAGS@
41 CPPFLAGS=@CPPFLAGS@
42 LDFLAGS=@LDFLAGS@
43 LN_S=@LN_S@
44 EXEEXT=@EXEEXT@
45 version=@version@
46 # Substitute an assignment for the MAKE variable, because
47 # BSD doesn't have it as a default.
48 @SET_MAKE@
49 # Don't use LIBS. configure puts stuff in it that either shouldn't be
50 # linked with Emacs or is duplicated by the cpp stuff below.
51 # LIBS = @LIBS@
52 LIBOBJS = @LIBOBJS@
54 lispsource = ${srcdir}/../lisp/
55 libsrc = ../lib-src/
56 etc = ../etc/
57 oldXMenudir = ../oldXMenu/
58 lwlibdir = ../lwlib/
59 lispdir = ../lisp/
61 # Configuration files for .o files to depend on.
62 M_FILE = ${srcdir}/@machfile@
63 S_FILE = ${srcdir}/@opsysfile@
64 config_h = config.h $(M_FILE) $(S_FILE)
66 bootstrap_exe = ../src/bootstrap-emacs${EXEEXT}
68 OTHER_FILES = @OTHER_FILES@
70 # Only used by amdx86-64 and ibms390x GNU/Linux.
71 CRT_DIR=@CRT_DIR@
73 # ========================== start of cpp stuff =======================
74 /* From here on, comments must be done in C syntax. */
76 C_SWITCH_SYSTEM=
78 /* just to be sure the sh is used */
79 SHELL=/bin/sh
81 #define THIS_IS_MAKEFILE
82 #define NOT_C_CODE
83 #include "config.h"
85 #ifdef AUTO_DEPEND
86 DEPFLAGS = -MMD -MF deps/$*.d
87 #endif
89 /* Do not let the file name mktime.c get messed up. */
90 #ifdef mktime
91 #undef mktime
92 #endif
94 /* Use HAVE_X11 as an alias for X11 in this file
95 to avoid problems with X11 as a subdirectory name
96 in -I and other such options which pass through this file. */
98 #ifdef X11
99 #define HAVE_X11
100 #undef X11
101 #endif
103 /* On some machines #define register is done in config;
104 do not let it interfere with this file. */
105 #undef register
107 /* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
108 GNU/Linux is an exception because it uses a funny variant of GNU libc. */
109 #ifdef __GNU_LIBRARY__
110 #ifndef GNU_LINUX
111 #define ORDINARY_LINK
112 #endif
113 #endif
115 /* Some machines do not find the standard C libraries in the usual place. */
116 #ifndef ORDINARY_LINK
117 #ifndef LIB_STANDARD
118 #define LIB_STANDARD -lc
119 #endif
120 #else
121 #ifndef LIB_STANDARD
122 #define LIB_STANDARD
123 #endif
124 #endif
126 /* Under GNUstep, putting libc on the link line causes problems. */
127 #ifdef NS_IMPL_GNUSTEP
128 #undef LIB_STANDARD
129 #define LIB_STANDARD
130 #endif
132 /* Unless inhibited or changed, use -lg to link for debugging. */
133 #ifndef LIBS_DEBUG
134 #define LIBS_DEBUG -lg
135 #endif
137 /* Some s/SYSTEM.h files define this to request special libraries. */
138 #ifndef LIBS_SYSTEM
139 #define LIBS_SYSTEM
140 #endif
142 /* Some m/MACHINE.h files define this to request special libraries. */
143 #ifndef LIBS_MACHINE
144 #define LIBS_MACHINE
145 #endif
147 #ifndef LIB_MATH
148 # define LIB_MATH -lm
149 #endif /* LIB_MATH */
151 /* Some s/SYSTEM.h files define this to request special switches in ld. */
152 #ifndef LD_SWITCH_SYSTEM
153 #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
154 #define LD_SWITCH_SYSTEM -X
155 #else /* (defined (BSD_SYSTEM) && !defined (COFF)) */
156 #define LD_SWITCH_SYSTEM
157 #endif /* (defined (BSD_SYSTEM) && !defined (COFF)) */
158 #endif /* LD_SWITCH_SYSTEM */
160 /* This holds special options for linking temacs
161 that should be used for linking anything else. */
162 #ifndef LD_SWITCH_SYSTEM_TEMACS
163 #define LD_SWITCH_SYSTEM_TEMACS
164 #endif
166 /* Some s/SYSTEM.h files define this to request special switches
167 for compiling temacs. */
168 #ifndef C_SWITCH_SYSTEM_TEMACS
169 #define C_SWITCH_SYSTEM_TEMACS
170 #endif
172 /* Some m/MACHINE.h files define this to request special switches in ld. */
173 #ifndef LD_SWITCH_MACHINE
174 #define LD_SWITCH_MACHINE
175 #endif
177 /* This holds special options for linking temacs
178 that should be used for linking anything else. */
179 #ifndef LD_SWITCH_MACHINE_TEMACS
180 #define LD_SWITCH_MACHINE_TEMACS
181 #endif
183 /* Some m/MACHINE.h files define this to request special switches in cc. */
184 #ifndef C_SWITCH_MACHINE
185 #define C_SWITCH_MACHINE
186 #endif
188 /* Some s/SYSTEM.h files define this to request special switches in cc. */
189 #ifndef C_SWITCH_SYSTEM
190 #define C_SWITCH_SYSTEM
191 #endif
193 /* These macros are for switches specifically related to X Windows. */
194 #ifndef C_SWITCH_X_MACHINE
195 #define C_SWITCH_X_MACHINE
196 #endif
198 #ifndef C_SWITCH_X_SYSTEM
199 #define C_SWITCH_X_SYSTEM
200 #endif
202 #ifndef C_SWITCH_X_SITE
203 #define C_SWITCH_X_SITE
204 #endif
206 #ifndef LD_SWITCH_X_SITE
207 #define LD_SWITCH_X_SITE
208 #endif
210 #ifndef LD_SWITCH_X_DEFAULT
211 #define LD_SWITCH_X_DEFAULT
212 #endif
214 #ifndef ORDINARY_LINK
216 #ifndef CRT0_COMPILE
217 #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
218 #endif
220 #ifndef START_FILES
221 #ifdef NO_REMAP
222 #define START_FILES pre-crt0.o /lib/crt0.o
223 #else /* ! defined (NO_REMAP) */
224 #define START_FILES ecrt0.o
225 #endif /* ! defined (NO_REMAP) */
226 #endif /* START_FILES */
227 STARTFILES = START_FILES
229 #else /* ORDINARY_LINK */
231 /* config.h might want to force START_FILES anyway */
232 #ifdef START_FILES
233 STARTFILES = START_FILES
234 #endif /* START_FILES */
236 #endif /* not ORDINARY_LINK */
239 #ifdef NS_IMPL_GNUSTEP
240 /* Pull in stuff from GNUstep-make. */
241 FOUNDATION_LIB=gnu
242 GUI_LIB=gnu
243 include @GNUSTEP_MAKEFILES@/Additional/base.make
244 include @GNUSTEP_MAKEFILES@/Additional/gui.make
245 shared=no
246 #endif
248 #ifdef HAVE_DBUS
249 DBUS_CFLAGS = @DBUS_CFLAGS@
250 DBUS_LIBS = @DBUS_LIBS@
251 DBUS_OBJ = dbusbind.o
252 #endif
254 #ifdef HAVE_GCONF
255 GCONF_CFLAGS = @GCONF_CFLAGS@
256 GCONF_LIBS = @GCONF_LIBS@
257 #endif
259 /* DO NOT use -R. There is a special hack described in lastfile.c
260 which is used instead. Some initialized data areas are modified
261 at initial startup, then labeled as part of the text area when
262 Emacs is dumped for the first time, and never changed again. */
264 /* -Demacs is needed to make some files produce the correct version
265 for use in Emacs.
267 -DHAVE_CONFIG_H is needed for some other files to take advantage of
268 the information in ``config.h''. */
270 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
271 since it may have -I options that should override those two. */
272 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
273 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
275 .SUFFIXES: .m
276 .c.o:
277 #ifdef AUTO_DEPEND
278 @-test -d deps || mkdir deps
279 #endif
280 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
281 .m.o:
282 #ifdef AUTO_DEPEND
283 @-test -d deps || mkdir deps
284 #endif
285 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
287 #ifndef LIBX11_SYSTEM
288 #define LIBX11_SYSTEM
289 #endif
291 #ifndef LIB_X11_LIB
292 #define LIB_X11_LIB -lX11
293 #endif
295 #ifdef HAVE_X_WINDOWS
296 XMENU_OBJ = xmenu.o
297 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o \
298 xsettings.o xgselect.o
300 #ifdef HAVE_MENUS
302 #ifdef USE_GTK
303 GTK_OBJ= gtkutil.o
304 #endif
306 /* The X Menu stuff is present in the X10 distribution, but missing
307 from X11. If we have X10, just use the installed library;
308 otherwise, use our own copy. */
309 #ifdef HAVE_X11
310 #ifdef USE_X_TOOLKIT
311 OLDXMENU=${lwlibdir}liblw.a
312 LIBXMENU= $(OLDXMENU)
313 #else /* not USE_X_TOOLKIT */
314 OLDXMENU= ${oldXMenudir}libXMenu11.a
315 LIBXMENU= $(OLDXMENU)
316 #endif /* not USE_X_TOOLKIT */
317 #else /* not HAVE_X11 */
318 LIBXMENU= -lXMenu
319 #endif /* not HAVE_X11 */
321 #else /* not HAVE_MENUS */
323 /* Otherwise, do not worry about the menu library at all. */
324 LIBXMENU=
325 #endif /* not HAVE_MENUS */
327 #ifdef USE_X_TOOLKIT
328 # define @X_TOOLKIT_TYPE@
329 # if HAVE_XAW3D
330 LUCID_LIBW= -lXaw3d
331 # else
332 LUCID_LIBW= -lXaw
333 # endif
334 # if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
335 # define LIB_MOTIF_EXTRA -lXp
336 # else
337 # define LIB_MOTIF_EXTRA
338 # endif
339 # ifdef LIB_MOTIF
340 MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
341 # else
342 MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA
343 # endif
344 LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
346 #ifdef HAVE_X11XTR6
347 #ifdef NEED_LIBW
348 LIBXTR6 = -lSM -lICE -lw
349 #else
350 LIBXTR6 = -lSM -lICE
351 #endif
352 #endif
354 #ifndef LIBXMU
355 #define LIBXMU -lXmu
356 #endif
358 LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
360 #else /* not USE_X_TOOLKIT */
362 #ifdef USE_GTK
363 LIBW=@GTK_LIBS@
364 OLDXMENU=
365 LIBXMENU=
366 #endif /* USE_GTK */
368 #ifdef HAVE_X_SM
369 LIBXT=$(LIBW) -lSM -lICE
370 #else
371 LIBXT=$(LIBW)
372 #endif
373 #endif /* not USE_X_TOOLKIT */
375 #if HAVE_XFT
376 XFT_LIBS=@XFT_LIBS@
377 #endif /* HAVE_XFT */
379 #if HAVE_XPM
380 #ifndef LIBXPM
381 #define LIBXPM -lXpm
382 #endif /* not defined LIBXPM */
383 #else /* not HAVE_XPM */
384 #define LIBXPM
385 #endif /* not HAVE_XPM */
387 #if HAVE_JPEG
388 #ifndef LIBJPEG
389 #define LIBJPEG -ljpeg
390 #endif /* not defined LIBJPEG */
391 #else /* not HAVE_JPEG */
392 #define LIBJPEG
393 #endif /* not HAVE_JPEG */
395 #if HAVE_PNG
396 #ifndef LIBPNG
397 #define LIBPNG -lpng -lz -lm
398 #endif /* not defined LIBPNG */
399 #else /* not HAVE_PNG */
400 #define LIBPNG
401 #endif /* not HAVE_PNG */
403 #if HAVE_TIFF
404 #ifndef LIBTIFF
405 #define LIBTIFF -ltiff
406 #endif /* not defined LIBTIFF */
407 #else /* not HAVE_TIFF */
408 #define LIBTIFF
409 #endif /* not HAVE_TIFF */
411 #if HAVE_GIF
412 #ifndef LIBGIF
413 #define LIBGIF -lgif
414 #endif /* not defined LIBGIF */
415 #else /* not HAVE_GIF */
416 #define LIBGIF
417 #endif /* not HAVE_GIF */
419 #ifdef HAVE_X11
420 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
421 options for where to find X libraries, but before those libraries. */
422 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
423 LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS)
424 #else /* not HAVE_X11 */
425 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
426 #endif /* not HAVE_X11 */
427 #endif /* not HAVE_X_WINDOWS */
429 #if HAVE_GPM
430 #ifndef LIBGPM
431 #define LIBGPM -lgpm
432 #endif /* not defined LIBGPM */
433 #else /* not HAVE_GPM */
434 #define LIBGPM
435 #endif /* not HAVE_GPM */
437 #if HAVE_LIBRESOLV
438 #ifndef LIBRESOLV
439 #define LIBRESOLV -lresolv
440 #endif /* not defined LIBRESOLV */
441 #else /* not HAVE_LIBRESOLV */
442 #define LIBRESOLV
443 #endif /* not HAVE_LIBRESOLV */
445 LIBSOUND= @LIBSOUND@
446 CFLAGS_SOUND= @CFLAGS_SOUND@
448 RSVG_LIBS= @RSVG_LIBS@
449 RSVG_CFLAGS= @RSVG_CFLAGS@
451 #ifndef ORDINARY_LINK
452 /* Fix linking if compiled with GCC. */
453 #ifdef __GNUC__
455 #ifdef LINKER
456 #define LINKER_WAS_SPECIFIED
457 #endif
459 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
460 places that are difficult to figure out at make time. Fortunately,
461 these same versions allow you to pass arbitrary flags on to the
462 linker, so there is no reason not to use it as a linker.
464 Well, it is not quite perfect. The "-nostdlib" keeps GCC from
465 searching for libraries in its internal directories, so we have to
466 ask GCC explicitly where to find libgcc.a. */
468 #ifndef LINKER
469 #define LINKER $(CC) -nostdlib
470 #endif
472 #ifndef LIB_GCC
473 /* Ask GCC where to find libgcc.a. */
474 #define LIB_GCC `$(CC) -print-libgcc-file-name`
475 #endif /* not LIB_GCC */
477 GNULIB_VAR = LIB_GCC
479 #ifndef LINKER_WAS_SPECIFIED
480 /* GCC passes any argument prefixed with -Xlinker directly to the
481 linker. See prefix-args.c for an explanation of why we do not do
482 this with the shell''s ``for'' construct.
483 Note that some people do not have '.' in their paths, so we must
484 use ./prefix-args. */
485 #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
486 #else
487 #define YMF_PASS_LDFLAGS(flags) flags
488 #endif
490 #else /* not __GNUC__ */
491 GNULIB_VAR =
493 #endif /* not __GNUC__ */
494 #endif /* not ORDINARY_LINK */
496 #ifdef ORDINARY_LINK
497 LD = $(CC)
498 #else
499 #ifdef LINKER
500 LD=LINKER
501 #else /* not LINKER */
502 LD=ld
503 #endif /* not LINKER */
504 #endif /* not ORDINARY_LINK */
506 /* Flags to pass to LD only for temacs. */
507 /* Do not split this line with a backslash. That can cause trouble with
508 some cpps. */
509 TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS
511 /* A macro which other sections of Makefile can redefine to munge the
512 flags before they are passed to LD. This is helpful if you have
513 redefined LD to something odd, like "gcc".
514 (The YMF prefix is a holdover from the old name "ymakefile".)
516 #ifndef YMF_PASS_LDFLAGS
517 #define YMF_PASS_LDFLAGS(flags) flags
518 #endif
520 /* Allow config.h to specify a replacement file for unexec.c. */
521 #ifndef UNEXEC
522 #define UNEXEC unexec.o
523 #endif
525 INTERVALS_H = dispextern.h intervals.h composite.h
527 GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
529 #ifdef MSDOS
530 #ifdef HAVE_X_WINDOWS
531 MSDOS_OBJ = dosfns.o msdos.o xmenu.o
532 #else
533 MSDOS_OBJ = dosfns.o msdos.o w16select.o xmenu.o
534 #endif
535 #endif
537 #ifdef CYGWIN
538 CYGWIN_OBJ = sheap.o
539 #endif
541 #ifdef HAVE_NS
542 ns_appdir=@ns_appdir@/
543 ns_appbindir=@ns_appbindir@/
544 ns_appresdir=@ns_appresdir@/
545 ns_appsrc=@ns_appsrc@
546 /* Object files for NeXTstep */
547 NS_OBJ= nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
548 fontset.o fringe.o image.o
549 #endif /* HAVE_NS */
551 #ifdef HAVE_WINDOW_SYSTEM
552 #ifdef HAVE_X_WINDOWS
553 #if defined (HAVE_XFT)
554 FONT_DRIVERS = xfont.o ftfont.o xftfont.o ftxfont.o
555 #elif defined (HAVE_FREETYPE)
556 FONT_DRIVERS = xfont.o ftfont.o ftxfont.o
557 #else /* ! defined (HAVE_XFT) && ! defined (HAVE_FREETYPE) */
558 FONT_DRIVERS = xfont.o
559 #endif /* ! defined (HAVE_XFT) && ! defined (HAVE_FREETYPE) */
560 #endif /* HAVE_X_WINDOWS */
561 #endif /* HAVE_WINDOW_SYSTEM */
563 /* lastfile must follow all files
564 whose initialized data areas should be dumped as pure by dump-emacs. */
565 obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
566 charset.o coding.o category.o ccl.o character.o chartab.o \
567 cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
568 emacs.o keyboard.o macros.o keymap.o sysdep.o \
569 buffer.o filelock.o insdel.o marker.o \
570 minibuf.o fileio.o dired.o filemode.o \
571 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
572 alloc.o data.o doc.o editfns.o callint.o \
573 eval.o floatfns.o fns.o font.o print.o lread.o \
574 syntax.o UNEXEC bytecode.o \
575 process.o callproc.o \
576 region-cache.o sound.o atimer.o \
577 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
578 $(MSDOS_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
580 /* Object files used on some machine or other.
581 These go in the DOC file on all machines
582 in case they are needed there. */
583 SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
584 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
585 fontset.o dbusbind.o \
586 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
587 w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
588 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
591 #ifdef TERMINFO
592 /* Used to be -ltermcap here. If your machine needs that,
593 define LIBS_TERMCAP in the m/MACHINE.h file. */
594 #ifndef LIBS_TERMCAP
595 #define LIBS_TERMCAP -lcurses
596 #endif /* LIBS_TERMCAP */
597 termcapobj = terminfo.o
598 #else /* ! defined (TERMINFO) */
599 #ifndef LIBS_TERMCAP
600 #define LIBS_TERMCAP
601 termcapobj = termcap.o tparam.o
602 #else /* LIBS_TERMCAP */
603 termcapobj = tparam.o
604 #endif /* LIBS_TERMCAP */
605 #endif /* ! defined (TERMINFO) */
608 #ifndef SYSTEM_MALLOC
610 #ifndef DOUG_LEA_MALLOC
611 gmallocobj = gmalloc.o
612 #endif
614 #ifdef REL_ALLOC
615 rallocobj = ralloc.o
616 #endif
618 mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
620 #endif /* SYSTEM_MALLOC */
623 #ifdef USE_X_TOOLKIT
624 widgetobj= widget.o
625 #else /* not USE_X_TOOLKIT */
626 widgetobj=
627 #endif /* not USE_X_TOOLKIT */
630 /* define otherobj as list of object files that make-docfile
631 should not be told about. */
632 #ifdef CYGWIN
633 /* Cygwin differs because of its unexec(). */
634 otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(widgetobj) $(LIBOBJS)
635 #else
636 otherobj= $(termcapobj) lastfile.o $(mallocobj) $(widgetobj) $(LIBOBJS)
637 #endif
639 #ifdef HAVE_MOUSE
640 #define MOUSE_SUPPORT ${lispsource}mouse.elc \
641 ${lispsource}select.elc ${lispsource}scroll-bar.elc
642 #else
643 #ifdef HAVE_GPM
644 #define MOUSE_SUPPORT ${lispsource}mouse.elc
645 #else
646 #define MOUSE_SUPPORT
647 #endif
648 #endif
650 #ifdef MSDOS
651 #define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
652 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
653 ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc
655 #else
656 #define MSDOS_SUPPORT
657 #endif
659 #ifdef HAVE_WINDOW_SYSTEM
660 #ifdef HAVE_X_WINDOWS
661 #define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
662 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
663 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc ${lispsource}x-dnd.elc \
664 ${lispsource}term/common-win.elc ${lispsource}term/x-win.elc \
665 ${lispsource}font-setting.elc
666 #else
667 #define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
668 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
669 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc
670 #endif
671 #else
672 #define WINDOW_SUPPORT
673 #endif
675 #ifdef WINDOWSNT
676 #define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
677 ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \
678 ${lispsource}w32-fns.elc ${lispsource}term/common-win.elc \
679 ${lispsource}term/w32-win.elc
680 #else
681 #define WINNT_SUPPORT
682 #endif
684 #ifdef HAVE_WINDOW_SYSTEM
685 #define TOOLTIP_SUPPORT ${lispsource}tooltip.elc
686 #else
687 #define TOOLTIP_SUPPORT
688 #endif
690 #ifdef HAVE_NS
691 #define NS_SUPPORT ${lispsource}emacs-lisp/easymenu.elc \
692 ${lispsource}term/ns-win.elc
693 #else
694 #define NS_SUPPORT
695 #endif
697 /* This is the platform-specific list of Lisp files loaded into the
698 dumped Emacs. It is arranged like this because it is easier to generate
699 it semi-mechanically from loadup.el this way.
701 Note that this list should not include lisp files which might not
702 be present, like site-load.el and site-init.el; this makefile
703 expects them all to be either present or buildable.
705 Files which are loaded unconditionally (i.e., on all platforms) should
706 also be in shortlisp. Files which are loaded conditionally (i.e., only
707 on some platforms) should instead be in SOME_MACHINE_LISP. */
709 /* Place loaddefs.el first, so it gets generated first, since it is on
710 the critical path (relevant in parallel compilations). */
712 lisp= \
713 ${lispsource}loaddefs.el \
714 ${lispsource}abbrev.elc \
715 ${lispsource}buff-menu.elc \
716 ${lispsource}button.elc \
717 ${lispsource}emacs-lisp/byte-run.elc \
718 ${lispsource}composite.elc \
719 ${lispsource}cus-face.elc \
720 ${lispsource}cus-start.elc \
721 ${lispsource}custom.elc \
722 ${lispsource}emacs-lisp/backquote.elc \
723 ${lispsource}emacs-lisp/lisp-mode.elc \
724 ${lispsource}emacs-lisp/lisp.elc \
725 ${lispsource}env.elc \
726 ${lispsource}faces.elc \
727 ${lispsource}files.elc \
728 ${lispsource}format.elc \
729 ${lispsource}facemenu.elc \
730 MOUSE_SUPPORT \
731 ${lispsource}emacs-lisp/float-sup.elc \
732 ${lispsource}frame.elc \
733 ${lispsource}help.elc \
734 ${lispsource}indent.elc \
735 ${lispsource}isearch.elc \
736 ${lispsource}rfn-eshadow.elc \
737 ${lispsource}loadup.el \
738 ${lispsource}bindings.elc \
739 ${lispsource}emacs-lisp/map-ynp.elc \
740 ${lispsource}menu-bar.elc \
741 ${lispsource}international/mule.elc \
742 ${lispsource}international/mule-conf.elc \
743 ${lispsource}international/mule-cmds.elc \
744 ${lispsource}international/characters.elc \
745 ${lispsource}international/charprop.el \
746 ${lispsource}case-table.elc \
747 ${lispsource}language/chinese.elc \
748 ${lispsource}language/cyrillic.elc \
749 ${lispsource}language/indian.elc \
750 ${lispsource}language/sinhala.el \
751 ${lispsource}language/english.el \
752 ${lispsource}language/ethiopic.elc \
753 ${lispsource}language/european.elc \
754 ${lispsource}language/czech.el \
755 ${lispsource}language/slovak.el \
756 ${lispsource}language/romanian.el \
757 ${lispsource}language/greek.el \
758 ${lispsource}language/hebrew.el \
759 ${lispsource}language/japanese.el \
760 ${lispsource}language/korean.el \
761 ${lispsource}language/lao.el \
762 ${lispsource}language/cham.el \
763 ${lispsource}language/tai-viet.el \
764 ${lispsource}language/thai.el \
765 ${lispsource}language/tibetan.elc \
766 ${lispsource}language/vietnamese.elc \
767 ${lispsource}language/misc-lang.el \
768 ${lispsource}language/utf-8-lang.el \
769 ${lispsource}language/georgian.el \
770 ${lispsource}language/khmer.el \
771 ${lispsource}language/burmese.el \
772 ${lispsource}paths.el \
773 ${lispsource}register.elc \
774 ${lispsource}replace.elc \
775 ${lispsource}simple.elc \
776 ${lispsource}minibuffer.elc \
777 ${lispsource}startup.elc \
778 ${lispsource}subr.elc \
779 ${lispsource}term/tty-colors.elc \
780 ${lispsource}font-core.elc \
781 ${lispsource}emacs-lisp/syntax.elc \
782 ${lispsource}font-lock.elc \
783 ${lispsource}jit-lock.elc \
784 ${lispsource}textmodes/fill.elc \
785 ${lispsource}textmodes/page.elc \
786 ${lispsource}textmodes/paragraphs.elc \
787 ${lispsource}textmodes/text-mode.elc \
788 ${lispsource}emacs-lisp/timer.elc \
789 ${lispsource}jka-cmpr-hook.elc \
790 ${lispsource}vc-hooks.elc \
791 ${lispsource}ediff-hook.elc \
792 ${lispsource}epa-hook.elc \
793 TOOLTIP_SUPPORT \
794 MSDOS_SUPPORT \
795 WINNT_SUPPORT \
796 WINDOW_SUPPORT \
797 NS_SUPPORT \
798 ${lispsource}widget.elc \
799 ${lispsource}window.elc \
800 ${lispsource}version.el
802 /* List of relative names for those files from $lisp that are loaded
803 unconditionally (i.e. on all platforms). Files from $lisp that
804 are only loaded on some platforms should instead be placed in
805 SOME_MACHINE_LISP. The only reason this variable exists is to prevent
806 the make-docfile command-line getting too long for some systems. */
807 shortlisp= \
808 ../lisp/loaddefs.el \
809 ../lisp/abbrev.elc \
810 ../lisp/buff-menu.elc \
811 ../lisp/button.elc \
812 ../lisp/emacs-lisp/byte-run.elc \
813 ../lisp/composite.elc \
814 ../lisp/cus-face.elc \
815 ../lisp/cus-start.elc \
816 ../lisp/custom.elc \
817 ../lisp/emacs-lisp/backquote.elc \
818 ../lisp/emacs-lisp/lisp-mode.elc \
819 ../lisp/emacs-lisp/lisp.elc \
820 ../lisp/facemenu.elc \
821 ../lisp/faces.elc \
822 ../lisp/files.elc \
823 ../lisp/emacs-lisp/float-sup.elc \
824 ../lisp/format.elc \
825 ../lisp/frame.elc \
826 ../lisp/help.elc \
827 ../lisp/indent.elc \
828 ../lisp/isearch.elc \
829 ../lisp/rfn-eshadow.elc \
830 ../lisp/loadup.el \
831 ../lisp/bindings.elc \
832 ../lisp/emacs-lisp/map-ynp.elc \
833 ../lisp/env.elc \
834 ../lisp/international/mule.elc \
835 ../lisp/international/mule-conf.elc \
836 ../lisp/international/mule-cmds.elc \
837 ../lisp/international/characters.elc \
838 ../lisp/case-table.elc \
839 ../lisp/language/chinese.elc \
840 ../lisp/language/cyrillic.elc \
841 ../lisp/language/indian.elc \
842 ../lisp/language/sinhala.el \
843 ../lisp/language/english.el \
844 ../lisp/language/ethiopic.elc \
845 ../lisp/language/european.elc \
846 ../lisp/language/czech.el \
847 ../lisp/language/slovak.el \
848 ../lisp/language/romanian.el \
849 ../lisp/language/greek.el \
850 ../lisp/language/hebrew.el \
851 ../lisp/language/japanese.el \
852 ../lisp/language/korean.el \
853 ../lisp/language/lao.el \
854 ../lisp/language/cham.el \
855 ../lisp/language/tai-viet.el \
856 ../lisp/language/thai.el \
857 ../lisp/language/tibetan.elc \
858 ../lisp/language/vietnamese.elc \
859 ../lisp/language/misc-lang.el \
860 ../lisp/language/utf-8-lang.el \
861 ../lisp/language/georgian.el \
862 ../lisp/language/khmer.el \
863 ../lisp/language/burmese.el \
864 ../lisp/menu-bar.elc \
865 ../lisp/paths.el \
866 ../lisp/register.elc \
867 ../lisp/replace.elc \
868 ../lisp/simple.elc \
869 ../lisp/minibuffer.elc \
870 ../lisp/startup.elc \
871 ../lisp/subr.elc \
872 ../lisp/term/tty-colors.elc \
873 ../lisp/font-core.elc \
874 ../lisp/emacs-lisp/syntax.elc \
875 ../lisp/font-lock.elc \
876 ../lisp/jit-lock.elc \
877 ../lisp/textmodes/fill.elc \
878 ../lisp/textmodes/page.elc \
879 ../lisp/textmodes/paragraphs.elc \
880 ../lisp/textmodes/text-mode.elc \
881 ../lisp/emacs-lisp/timer.elc \
882 ../lisp/vc-hooks.elc \
883 ../lisp/jka-cmpr-hook.elc \
884 ../lisp/ediff-hook.elc \
885 ../lisp/epa-hook.elc \
886 ../lisp/widget.elc \
887 ../lisp/window.elc \
888 ../lisp/version.el
890 /* Like $shortlisp, but includes only those files from $lisp that are loaded
891 conditionally (i.e., only on some platforms). */
892 SOME_MACHINE_LISP = ../lisp/mouse.elc \
893 ../lisp/select.elc ../lisp/scroll-bar.elc \
894 ../lisp/ls-lisp.elc ../lisp/dos-fns.elc \
895 ../lisp/w32-fns.elc ../lisp/dos-w32.elc \
896 ../lisp/disp-table.elc ../lisp/dos-vars.elc \
897 ../lisp/tooltip.elc ../lisp/image.elc \
898 ../lisp/fringe.elc ../lisp/dnd.elc \
899 ../lisp/mwheel.elc ../lisp/tool-bar.elc \
900 ../lisp/x-dnd.elc ../lisp/font-setting.elc \
901 ../lisp/international/ccl.elc \
902 ../lisp/international/fontset.elc \
903 ../lisp/mouse.elc \
904 ../lisp/term/common-win.elc \
905 ../lisp/term/x-win.elc \
906 ../lisp/term/pc-win.elc ../lisp/term/internal.elc \
907 ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \
908 ../lisp/emacs-lisp/easymenu.elc
910 /* Construct full set of libraries to be linked.
911 Note that SunOS needs -lm to come before -lc; otherwise, you get
912 duplicated symbols. If the standard libraries were compiled
913 with GCC, we might need gnulib again after them. */
915 LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
916 LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
917 LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \
918 @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
919 $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
921 #ifdef HAVE_SHM
922 RUN_TEMACS = `/bin/pwd`/temacs -nl
923 #else
924 RUN_TEMACS = `/bin/pwd`/temacs
925 #endif
927 all: emacs${EXEEXT} $(OTHER_FILES)
929 emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
930 #ifdef CANNOT_DUMP
931 rm -f emacs${EXEEXT}
932 ln temacs${EXEEXT} emacs${EXEEXT}
933 -EMACSLOADPATH=${lispsource} ./emacs -q -batch -f list-load-path-shadows
934 #else
935 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
936 @: This new Emacs is as functional and more efficient then
937 @: bootstrap-emacs, so let us replace it.
938 -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
939 -./emacs -q -batch -f list-load-path-shadows
940 #endif /* ! defined (CANNOT_DUMP) */
942 /* We run make-docfile twice because the command line may get too long
943 on some systems. */
944 /* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
945 or may not be included in ${obj}, but they are always included in
946 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
947 for the first time, this prevents any variation between configurations
948 in the contents of the DOC file.
949 Likewise for ${SOME_MACHINE_LISP}. */
950 /* Most of this Makefile refers to Lisp files via ${lispsource}, so
951 we also use ${lisp} rather than ${shortlisp} for the dependency since
952 the Makefile uses string equality to decide when we talk about identical
953 files. Apparently we pass ${shortlisp} rather than ${lisp} to make-docfile
954 only in order to reduce the command line length. --Stef */
955 ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
956 -rm -f ${etc}DOC
957 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
958 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
960 ${libsrc}make-docfile${EXEEXT}:
961 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
963 buildobj.h: Makefile
964 echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
966 temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
967 #ifdef NS_IMPL_GNUSTEP
968 $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
969 -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \
970 -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
971 ${obj} ${otherobj} ${LIBES}
972 #else
973 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
974 -o temacs ${STARTFILES} ${obj} ${otherobj} \
975 ${LIBES}
976 #endif
978 /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
979 often contain options that have to do with using Emacs''s crt0,
980 which are only good with temacs. */
981 prefix-args${EXEEXT}: prefix-args.o $(config_h)
982 $(CC) $(LDFLAGS) prefix-args.o -o prefix-args
984 #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
986 /* We use stamp-xmenu with these two deps
987 to both ensure that lwlib gets remade based on its dependencies
988 in its own makefile,
989 and remake temacs if lwlib gets changed by this. */
990 stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
991 touch stamp-oldxmenu
992 /* Supply an ordering for parallel make. */
993 ../src/$(OLDXMENU): ${OLDXMENU}
995 /* Encode the values of these two macros in Make variables,
996 so we can use $(...) to substitute their values within "...". */
997 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
998 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
999 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
1000 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
1001 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
1003 #ifdef USE_X_TOOLKIT
1004 $(OLDXMENU): really-lwlib
1006 really-lwlib:
1007 cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
1008 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
1009 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
1010 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
1011 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
1012 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
1013 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
1014 @true /* make -t should not create really-lwlib. */
1015 .PHONY: really-lwlib
1016 #else /* not USE_X_TOOLKIT */
1017 $(OLDXMENU): really-oldXMenu
1019 really-oldXMenu:
1020 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
1021 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
1022 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
1023 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
1024 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
1025 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
1026 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
1027 @true /* make -t should not create really-oldXMenu. */
1028 .PHONY: really-oldXMenu
1029 #endif /* not USE_X_TOOLKIT */
1030 #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
1032 /* We don''t really need this, but satisfy the dependency. */
1033 stamp-oldxmenu:
1034 touch stamp-oldxmenu
1035 #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
1037 ../config.status:: epaths.in
1038 @echo "The file epaths.h needs to be set up from epaths.in."
1039 @echo "Please run the `configure' script again."
1040 exit 1
1042 ../config.status:: config.in
1043 @echo "The file config.h needs to be set up from config.in."
1044 @echo "Please run the `configure' script again."
1045 exit 1
1047 ecrt0.o: ecrt0.c $(config_h)
1048 #ifdef AUTO_DEPEND
1049 @-test -d deps || mkdir deps
1050 #endif
1051 CRT0_COMPILE ${srcdir}/ecrt0.c
1052 doc.o: buildobj.h
1054 #ifndef AUTO_DEPEND
1056 atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \
1057 $(config_h)
1058 buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
1059 $(INTERVALS_H) blockinput.h atimer.h systime.h character.h \
1060 indent.h keyboard.h coding.h keymap.h frame.h lisp.h $(config_h)
1061 callint.o: callint.c window.h commands.h buffer.h keymap.h \
1062 keyboard.h dispextern.h systime.h coding.h composite.h lisp.h $(config_h)
1063 callproc.o: callproc.c epaths.h buffer.h commands.h lisp.h $(config_h) \
1064 process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \
1065 composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h \
1066 buffer.h
1067 casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \
1068 composite.h keymap.h lisp.h $(config_h)
1069 casetab.o: casetab.c buffer.h character.h lisp.h $(config_h)
1070 category.o: category.c category.h buffer.h charset.h keymap.h \
1071 character.h lisp.h $(config_h)
1072 ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h $(config_h)
1073 character.o: character.c character.h buffer.h charset.h composite.h disptab.h \
1074 lisp.h $(config_h)
1075 charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \
1076 disptab.h lisp.h $(config_h)
1077 chartab.o: charset.h character.h ccl.h lisp.h $(config_h)
1078 coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \
1079 window.h dispextern.h frame.h termhooks.h lisp.h $(config_h)
1080 cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h lisp.h $(config_h)
1081 cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h $(config_h) \
1082 msdos.h dispextern.h keyboard.h keymap.h systime.h coding.h frame.h \
1083 composite.h
1084 pre-crt0.o: pre-crt0.c
1085 dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h)
1086 dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \
1087 coding.h regex.h systime.h blockinput.h atimer.h composite.h
1088 dispnew.o: dispnew.c systime.h commands.h process.h frame.h coding.h \
1089 window.h buffer.h termchar.h termopts.h termhooks.h cm.h \
1090 disptab.h indent.h $(INTERVALS_H) \
1091 xterm.h blockinput.h atimer.h character.h msdos.h keyboard.h \
1092 syssignal.h lisp.h $(config_h)
1093 doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h \
1094 character.h systime.h coding.h composite.h
1095 doprnt.o: doprnt.c character.h lisp.h $(config_h)
1096 dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
1097 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
1098 lisp.h $(config_h)
1099 editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
1100 coding.h frame.h blockinput.h atimer.h lisp.h $(config_h)
1101 emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1102 termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \
1103 window.h dispextern.h keyboard.h keymap.h frame.h coding.h
1104 fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
1105 coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h commands.h
1106 filelock.o: filelock.c buffer.h character.h coding.h systime.h composite.h \
1107 lisp.h $(config_h)
1108 filemode.o: filemode.c $(config_h)
1109 frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1110 blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \
1111 msdos.h dosfns.h dispextern.h w32term.h termchar.h coding.h composite.h \
1112 lisp.h $(config_h) termhooks.h ccl.h
1113 fringe.o: fringe.c dispextern.h frame.h window.h buffer.h termhooks.h \
1114 blockinput.h atimer.h systime.h lisp.h $(config_h)
1115 font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \
1116 font.h lisp.h $(config_h) buffer.h composite.h fontset.h xterm.h
1117 ftfont.o: dispextern.h frame.h character.h charset.h composite.h font.h \
1118 lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h fontset.h \
1119 ccl.h ftfont.h
1120 fontset.o: fontset.c fontset.h ccl.h buffer.h character.h \
1121 charset.h frame.h keyboard.h termhooks.h font.h lisp.h $(config_h) \
1122 blockinput.h atimer.h systime.h coding.h $(INTERVALS_H) window.h xterm.h
1123 getloadavg.o: getloadavg.c $(config_h)
1124 gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h lisp.h $(config_h) \
1125 blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \
1126 charset.h coding.h syssignal.h dispextern.h composite.h
1127 image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \
1128 systime.h xterm.h w32term.h w32gui.h font.h epaths.h character.h coding.h \
1129 nsterm.h nsgui.h lisp.h $(config_h) composite.h termhooks.h ccl.h
1130 indent.o: indent.c frame.h window.h indent.h buffer.h lisp.h $(config_h) termchar.h \
1131 termopts.h disptab.h region-cache.h character.h category.h \
1132 keyboard.h systime.h coding.h $(INTERVALS_H)
1133 insdel.o: insdel.c window.h buffer.h $(INTERVALS_H) blockinput.h character.h \
1134 dispextern.h atimer.h systime.h region-cache.h lisp.h $(config_h)
1135 keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \
1136 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
1137 systime.h syntax.h $(INTERVALS_H) blockinput.h atimer.h composite.h \
1138 xterm.h puresize.h msdos.h keymap.h w32term.h nsterm.h coding.h \
1139 lisp.h $(config_h)
1140 keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
1141 atimer.h systime.h puresize.h character.h charset.h $(INTERVALS_H) keymap.h window.h \
1142 coding.h frame.h lisp.h $(config_h)
1143 lastfile.o: lastfile.c $(config_h)
1144 macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
1145 dispextern.h lisp.h $(config_h) systime.h coding.h composite.h
1146 gmalloc.o: gmalloc.c $(config_h)
1147 ralloc.o: ralloc.c lisp.h $(config_h)
1148 vm-limit.o: vm-limit.c mem-limits.h lisp.h $(config_h)
1149 marker.o: marker.c buffer.h character.h lisp.h $(config_h)
1150 md5.o: md5.c md5.h $(config_h)
1151 minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \
1152 buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \
1153 termhooks.h lisp.h $(config_h) coding.h
1154 mktime.o: mktime.c $(config_h)
1155 msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
1156 termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \
1157 keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h lisp.h $(config_h)
1158 nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \
1159 dispextern.h nsgui.h fontset.h $(INTERVALS_H) keyboard.h blockinput.h \
1160 atimer.h systime.h epaths.h termhooks.h coding.h systime.h lisp.h $(config_h)
1161 nsfont.o: nsterm.h dispextern.h frame.h lisp.h lisp.h $(config_h)
1162 nsimage.o: nsimage.m nsterm.h lisp.h $(config_h)
1163 nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \
1164 nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \
1165 nsterm.h lisp.h $(config_h)
1166 nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \
1167 nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \
1168 termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \
1169 $(INTERVALS_H) process.h coding.h lisp.h $(config_h)
1170 nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h lisp.h $(config_h)
1171 process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
1172 commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
1173 blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
1174 keyboard.h lisp.h $(config_h) character.h xgselect.h sysselect.h
1175 regex.o: regex.c syntax.h buffer.h lisp.h $(config_h) regex.h category.h character.h
1176 region-cache.o: region-cache.c buffer.h region-cache.h lisp.h $(config_h)
1177 scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \
1178 termhooks.h lisp.h $(config_h) systime.h coding.h composite.h window.h
1179 search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
1180 blockinput.h atimer.h systime.h category.h character.h charset.h \
1181 $(INTERVALS_H) \
1182 lisp.h $(config_h)
1183 sound.o: sound.c dispextern.h syssignal.h lisp.h $(config_h) atimer.h systime.h
1184 strftime.o: strftime.c $(config_h)
1185 syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \
1186 keymap.h regex.h $(INTERVALS_H) lisp.h $(config_h)
1187 sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \
1188 process.h dispextern.h termhooks.h termchar.h termopts.h coding.h \
1189 frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h lisp.h $(config_h) \
1190 composite.h
1191 term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) cm.h frame.h \
1192 disptab.h keyboard.h character.h charset.h coding.h ccl.h xterm.h \
1193 msdos.h window.h keymap.h blockinput.h atimer.h systime.h systty.h \
1194 syssignal.h $(INTERVALS_H) buffer.h
1195 termcap.o: termcap.c lisp.h $(config_h)
1196 terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \
1197 keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h
1198 terminfo.o: terminfo.c lisp.h $(config_h)
1199 tparam.o: tparam.c lisp.h $(config_h)
1200 undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h)
1201 unexaix.o: unexaix.c lisp.h $(config_h)
1202 unexalpha.o: unexalpha.c $(config_h)
1203 unexcw.o: unexcw.c lisp.h $(config_h)
1204 unexec.o: unexec.c lisp.h $(config_h)
1205 unexelf.o: unexelf.c $(config_h)
1206 unexhp9k800.o: unexhp9k800.c $(config_h)
1207 unexmacosx.o: unexmacosx.c $(config_h)
1208 unexsol.o: unexsol.c lisp.h $(config_h)
1209 unexw32.o: unexw32.c $(config_h)
1210 w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
1211 msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h)
1212 widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1213 $(srcdir)/../lwlib/lwlib.h lisp.h $(config_h)
1214 window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
1215 disptab.h keyboard.h msdos.h coding.h termhooks.h \
1216 keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \
1217 xterm.h w32term.h nsterm.h lisp.h $(config_h)
1218 xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \
1219 coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \
1220 charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h xterm.h \
1221 w32term.h nsterm.h msdos.h composite.h fontset.h ccl.h \
1222 blockinput.h atimer.h systime.h keymap.h font.h
1223 xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1224 window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \
1225 systime.h keyboard.h fontset.h w32term.h nsterm.h coding.h ccl.h \
1226 $(INTERVALS_H) termchar.h termhooks.h font.h lisp.h $(config_h)
1227 xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \
1228 $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \
1229 character.h charset.h coding.h gtkutil.h lisp.h $(config_h) termhooks.h \
1230 fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h
1231 xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
1232 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h
1233 xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
1234 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h ftfont.h
1235 ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
1236 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h
1237 menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \
1238 dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \
1239 lisp.h $(config_h) systime.h coding.h composite.h window.h atimer.h
1240 xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
1241 charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \
1242 systime.h gtkutil.h msdos.h coding.h menu.h lisp.h $(config_h) composite.h \
1243 keymap.h sysselect.h
1244 xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
1245 dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
1246 keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \
1247 coding.h process.h gtkutil.h font.h fontset.h lisp.h $(config_h) \
1248 xsettings.h intervals.h keymap.h xgselect.h sysselect.h
1249 xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
1250 buffer.h atimer.h systime.h termhooks.h lisp.h $(config_h) keyboard.h \
1251 coding.h composite.h
1252 xgselect.o: xgselect.h systime.h sysselect.h lisp.h $(config_h)
1253 xrdb.o: xrdb.c lisp.h $(config_h) epaths.h
1254 xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h xterm.h \
1255 lisp.h termopts.h frame.h dispextern.h
1256 xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \
1257 dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h atimer.h \
1258 termopts.h
1259 /* The files of Lisp proper */
1261 alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \
1262 keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \
1263 $(INTERVALS_H) termhooks.h
1264 bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \
1265 frame.h xterm.h lisp.h $(config_h)
1266 data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \
1267 termhooks.h systime.h coding.h composite.h dispextern.h font.h ccl.h \
1268 lisp.h $(config_h)
1269 eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
1270 dispextern.h lisp.h $(config_h) coding.h composite.h xterm.h
1271 floatfns.o: floatfns.c syssignal.h lisp.h $(config_h)
1272 fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h keyboard.h \
1273 keymap.h window.h dispextern.h $(INTERVALS_H) coding.h md5.h \
1274 blockinput.h atimer.h systime.h xterm.h
1275 print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \
1276 lisp.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \
1277 blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h
1278 lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \
1279 charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \
1280 systime.h frame.h blockinput.h atimer.h
1282 /* Text properties support */
1283 composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \
1284 frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h)
1285 intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \
1286 keymap.h lisp.h $(config_h) systime.h coding.h
1287 textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \
1288 lisp.h $(config_h)
1290 #endif /* ! AUTO_DEPEND */
1292 /* System-specific programs to be made.
1293 OTHER_FILES
1294 select which of these should be compiled. */
1296 #ifdef HAVE_NS
1297 /* In fact, every .o file depends directly or indirectly on dispextern.h
1298 and hence nsgui.h under NS. But the ones that actually use stuff there
1299 are more limited. */
1300 dispnew.o font.o fontset.o frame.o fringe.o image.o keyboard.o menu.o \
1301 window.o xdisp.o xfaces.o: nsgui.h
1303 ${ns_appdir}: ${ns_appsrc}
1304 rm -fr ${ns_appdir}
1305 mkdir -p ${ns_appdir}
1306 ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - )
1307 ( cd ${ns_appdir} ; for subdir in `find . -type d ! -name CVS -print` ; do \
1308 chmod a+rx $${subdir} ; \
1309 rm -rf $${subdir}/CVS ; \
1310 rm -f $${subdir}/.cvsignore ; done ; )
1312 ${ns_appbindir}Emacs: emacs${EXEEXT}
1313 mkdir -p ${ns_appbindir}
1314 cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
1316 ns-app: ${ns_appdir} ${ns_appbindir}Emacs
1318 #endif /* HAVE_NS */
1320 mostlyclean:
1321 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
1322 rm -f ../etc/DOC
1323 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
1324 rm -f buildobj.h
1325 clean: mostlyclean
1326 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
1327 -rm -rf deps
1328 #ifdef HAVE_NS
1329 rm -fr ${ns_appdir}
1330 #endif
1331 /* bootstrap-clean is used to clean up just before a bootstrap.
1332 It should remove all files generated during a compilation/bootstrap,
1333 but not things like config.status or TAGS. */
1334 bootstrap-clean: clean
1335 rm -f epaths.h config.h Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
1336 if test -f ./.gdbinit; then \
1337 mv ./.gdbinit ./.gdbinit.save; \
1338 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
1339 else mv ./.gdbinit.save ./.gdbinit; fi; \
1341 /**/# This is used in making a distribution.
1342 /**/# Do not use it on development directories!
1343 distclean: bootstrap-clean
1344 rm -f Makefile
1345 maintainer-clean: distclean
1346 @echo "This command is intended for maintainers to use;"
1347 @echo "it deletes files that may require special tools to rebuild."
1348 rm -f TAGS
1349 versionclean:
1350 -rm -f emacs${EXEEXT} emacs-*.*.*${EXEEXT} ../etc/DOC*
1351 extraclean: distclean
1352 -rm -f *~ \#* m/?*~ s/?*~
1354 /* Arrange to make a tags table TAGS-LISP for ../lisp,
1355 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1357 ctagsfiles1 = [xyzXYZ]*.[hcm]
1358 ctagsfiles2 = [a-wA-W]*.[hcm]
1360 TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1361 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1362 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1363 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1364 frc:
1365 TAGS-LISP: frc
1366 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
1368 $(lwlibdir)TAGS:
1369 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
1371 tags: TAGS TAGS-LISP $(lwlibdir)TAGS
1372 .PHONY: tags
1375 /* Bootstrapping. */
1376 /* Bootstrapping right is difficult because of the circular dependencies.
1377 Furthermore, we have to deal with the fact that many compilation targets
1378 such as loaddefs.el or *.elc can typically be produced by any old
1379 Emacs executable, so we would like to avoid rebuilding them whenever
1380 we build a new Emacs executable.
1381 To solve the circularity, we use 2 different Emacs executables,
1382 "emacs" is the main target and "bootstrap-emacs" is the one used
1383 to build the *.elc and loaddefs.el files.
1384 To solve the freshness issue, we used to use a third file "witness-emacs"
1385 which was used to witness the fact that there is a bootstrap-emacs
1386 executable, and then have dependencies on witness-emacs rather than
1387 bootstrap-emacs, but that lead to problems in parallel builds (because
1388 witness-emacs needed to be free from dependencies (to avoid rebuilding
1389 it), so it was compiled in parallel, leading typically to having 2
1390 processes dumping bootstrap-emacs at the same time).
1391 So instead, we replace the witness-emacs dependencies by conditional
1392 bootstrap-dependencies (via ${BOOTSTRAPEMACS}). Of course, since we do
1393 not want to rely on GNU Make features, we have to rely on an external
1394 script to do the conditional part of the dependency
1395 (i.e. see the ${SUBDIR} rule ../Makefile.in). */
1397 .SUFFIXES: .elc .el
1399 /* These suffix rules do not allow additional dependencies, sadly, so
1400 instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
1401 separately below.
1402 With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)" */
1403 .el.elc:
1404 @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
1405 THEFILE=$< EMACS=${bootstrap_exe}
1407 /* Since the .el.elc rule cannot specify an extra dependency, we do it here. */
1408 ${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
1410 ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
1411 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe}
1413 /* Dump an Emacs executable named bootstrap-emacs containing the
1414 files from loadup.el in source form. */
1416 bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
1417 cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
1418 #ifdef CANNOT_DUMP
1419 ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT}
1420 #else
1421 $(RUN_TEMACS) --batch --load loadup bootstrap
1422 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
1423 #endif /* ! defined (CANNOT_DUMP) */
1424 @: Compile some files earlier to speed up further compilation.
1425 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
1427 #ifdef AUTO_DEPEND
1428 ALLOBJS=$(STARTFILES) ${obj} ${otherobj} prefix-args.o
1429 -include $(ALLOBJS:%.o=deps/%.d)
1430 #endif