Add arch tagline
[emacs.git] / src / Makefile.in
blob1083dacdc879b349278304e4bfcf1e2d63bb885c
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
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 # ========================== start of cpp stuff =======================
67 /* From here on, comments must be done in C syntax. */
69 C_SWITCH_SYSTEM=
71 /* just to be sure the sh is used */
72 SHELL=/bin/sh
74 #define THIS_IS_MAKEFILE
75 #define NOT_C_CODE
76 #include "config.h"
78 /* Do not let the file name mktime.c get messed up. */
79 #ifdef mktime
80 #undef mktime
81 #endif
83 /* Use HAVE_X11 as an alias for X11 in this file
84 to avoid problems with X11 as a subdirectory name
85 in -I and other such options which pass through this file. */
87 #ifdef X11
88 #define HAVE_X11
89 #undef X11
90 #endif
92 /* On some machines #define register is done in config;
93 do not let it interfere with this file. */
94 #undef register
96 /* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
97 GNU/Linux is an exception because it uses a funny variant of GNU libc. */
98 #ifdef __GNU_LIBRARY__
99 #ifndef GNU_LINUX
100 #define ORDINARY_LINK
101 #endif
102 #endif
104 /* Some machines do not find the standard C libraries in the usual place. */
105 #ifndef ORDINARY_LINK
106 #ifndef LIB_STANDARD
107 #define LIB_STANDARD -lc
108 #endif
109 #else
110 #ifndef LIB_STANDARD
111 #define LIB_STANDARD
112 #endif
113 #endif
115 /* Under GNUstep, putting libc on the link line causes problems. */
116 #ifdef GNUSTEP
117 #define LIB_STANDARD
118 #endif
120 /* Unless inhibited or changed, use -lg to link for debugging. */
121 #ifndef LIBS_DEBUG
122 #define LIBS_DEBUG -lg
123 #endif
125 /* Some s/SYSTEM.h files define this to request special libraries. */
126 #ifndef LIBS_SYSTEM
127 #define LIBS_SYSTEM
128 #endif
130 /* Some m/MACHINE.h files define this to request special libraries. */
131 #ifndef LIBS_MACHINE
132 #define LIBS_MACHINE
133 #endif
135 #ifndef LIB_MATH
136 # define LIB_MATH -lm
137 #endif /* LIB_MATH */
139 /* Some s/SYSTEM.h files define this to request special switches in ld. */
140 #ifndef LD_SWITCH_SYSTEM
141 #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
142 #define LD_SWITCH_SYSTEM -X
143 #else /* (defined (BSD_SYSTEM) && !defined (COFF)) */
144 #define LD_SWITCH_SYSTEM
145 #endif /* (defined (BSD_SYSTEM) && !defined (COFF)) */
146 #endif /* LD_SWITCH_SYSTEM */
148 /* This holds special options for linking temacs
149 that should be used for linking anything else. */
150 #ifndef LD_SWITCH_SYSTEM_TEMACS
151 #define LD_SWITCH_SYSTEM_TEMACS
152 #endif
154 /* Some s/SYSTEM.h files define this to request special switches
155 for compiling temacs. */
156 #ifndef C_SWITCH_SYSTEM_TEMACS
157 #define C_SWITCH_SYSTEM_TEMACS
158 #endif
160 /* Some m/MACHINE.h files define this to request special switches in ld. */
161 #ifndef LD_SWITCH_MACHINE
162 #define LD_SWITCH_MACHINE
163 #endif
165 /* This holds special options for linking temacs
166 that should be used for linking anything else. */
167 #ifndef LD_SWITCH_MACHINE_TEMACS
168 #define LD_SWITCH_MACHINE_TEMACS
169 #endif
171 /* Some m/MACHINE.h files define this to request special switches in cc. */
172 #ifndef C_SWITCH_MACHINE
173 #define C_SWITCH_MACHINE
174 #endif
176 /* Some s/SYSTEM.h files define this to request special switches in cc. */
177 #ifndef C_SWITCH_SYSTEM
178 #define C_SWITCH_SYSTEM
179 #endif
181 /* These macros are for switches specifically related to X Windows. */
182 #ifndef C_SWITCH_X_MACHINE
183 #define C_SWITCH_X_MACHINE
184 #endif
186 #ifndef C_SWITCH_X_SYSTEM
187 #define C_SWITCH_X_SYSTEM
188 #endif
190 #ifndef C_SWITCH_X_SITE
191 #define C_SWITCH_X_SITE
192 #endif
194 #ifndef LD_SWITCH_X_SITE
195 #define LD_SWITCH_X_SITE
196 #endif
198 #ifndef LD_SWITCH_X_DEFAULT
199 #define LD_SWITCH_X_DEFAULT
200 #endif
202 /* These can be passed in from config.h to define special load and
203 compile switches needed by individual sites */
204 #ifndef LD_SWITCH_SITE
205 #define LD_SWITCH_SITE
206 #endif
208 #ifndef C_SWITCH_SITE
209 #define C_SWITCH_SITE
210 #endif
212 #ifndef ORDINARY_LINK
214 #ifndef CRT0_COMPILE
215 #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
216 #endif
218 #ifndef START_FILES
219 #ifdef NO_REMAP
220 #define START_FILES pre-crt0.o /lib/crt0.o
221 #else /* ! defined (NO_REMAP) */
222 #define START_FILES ecrt0.o
223 #endif /* ! defined (NO_REMAP) */
224 #endif /* START_FILES */
225 STARTFILES = START_FILES
227 #else /* ORDINARY_LINK */
229 /* config.h might want to force START_FILES anyway */
230 #ifdef START_FILES
231 STARTFILES = START_FILES
232 #endif /* START_FILES */
234 #endif /* not ORDINARY_LINK */
237 #ifdef GNUSTEP
238 /* Pull in stuff from GNUstep-make. */
239 FOUNDATION_LIB=gnu
240 GUI_LIB=gnu
241 include $(GNUSTEP_MAKEFILES)/Additional/base.make
242 include $(GNUSTEP_MAKEFILES)/Additional/gui.make
243 shared=no
244 #endif
246 #ifdef HAVE_DBUS
247 DBUS_CFLAGS = @DBUS_CFLAGS@
248 DBUS_LIBS = @DBUS_LIBS@
249 DBUS_OBJ = dbusbind.o
250 #endif
252 /* DO NOT use -R. There is a special hack described in lastfile.c
253 which is used instead. Some initialized data areas are modified
254 at initial startup, then labeled as part of the text area when
255 Emacs is dumped for the first time, and never changed again. */
257 /* -Demacs is needed to make some files produce the correct version
258 for use in Emacs.
260 -DHAVE_CONFIG_H is needed for some other files to take advantage of
261 the information in ``config.h''. */
263 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
264 since it may have -I options that should override those two. */
265 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@
266 .SUFFIXES: .m
267 .c.o:
268 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
269 .m.o:
270 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) GNU_OBJC_CFLAGS $<
272 #ifndef LIBX11_SYSTEM
273 #define LIBX11_SYSTEM
274 #endif
276 #ifndef LIB_X11_LIB
277 #define LIB_X11_LIB -lX11
278 #endif
280 #ifdef HAVE_X_WINDOWS
281 XMENU_OBJ = xmenu.o
282 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o
284 #ifdef HAVE_MENUS
286 #ifdef USE_GTK
287 GTK_OBJ= gtkutil.o
288 #endif
290 /* The X Menu stuff is present in the X10 distribution, but missing
291 from X11. If we have X10, just use the installed library;
292 otherwise, use our own copy. */
293 #ifdef HAVE_X11
294 #ifdef USE_X_TOOLKIT
295 OLDXMENU=${lwlibdir}liblw.a
296 LIBXMENU= $(OLDXMENU)
297 #else /* not USE_X_TOOLKIT */
298 OLDXMENU= ${oldXMenudir}libXMenu11.a
299 LIBXMENU= $(OLDXMENU)
300 #endif /* not USE_X_TOOLKIT */
301 #else /* not HAVE_X11 */
302 LIBXMENU= -lXMenu
303 #endif /* not HAVE_X11 */
305 #else /* not HAVE_MENUS */
307 /* Otherwise, do not worry about the menu library at all. */
308 LIBXMENU=
309 #endif /* not HAVE_MENUS */
311 #ifdef USE_X_TOOLKIT
312 # define @X_TOOLKIT_TYPE@
313 # if HAVE_XAW3D
314 LUCID_LIBW= -lXaw3d
315 # else
316 LUCID_LIBW= -lXaw
317 # endif
318 # if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
319 # define LIB_MOTIF_EXTRA -lXp
320 # else
321 # define LIB_MOTIF_EXTRA
322 # endif
323 # ifdef LIB_MOTIF
324 MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
325 # else
326 MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA
327 # endif
328 LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
330 #ifdef HAVE_X11XTR6
331 #ifdef NEED_LIBW
332 LIBXTR6 = -lSM -lICE -lw
333 #else
334 LIBXTR6 = -lSM -lICE
335 #endif
336 #endif
338 #ifndef LIBXMU
339 #define LIBXMU -lXmu
340 #endif
342 LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
344 #else /* not USE_X_TOOLKIT */
346 #ifdef USE_GTK
347 LIBW=@GTK_LIBS@
348 OLDXMENU=
349 LIBXMENU=
350 #endif /* USE_GTK */
352 #ifdef HAVE_X_SM
353 LIBXT=$(LIBW) -lSM -lICE
354 #else
355 LIBXT=$(LIBW)
356 #endif
357 #endif /* not USE_X_TOOLKIT */
359 #if HAVE_XFT
360 XFT_LIBS=@XFT_LIBS@
361 #endif /* HAVE_XFT */
363 #if HAVE_XPM
364 #ifndef LIBXPM
365 #define LIBXPM -lXpm
366 #endif /* not defined LIBXPM */
367 #else /* not HAVE_XPM */
368 #define LIBXPM
369 #endif /* not HAVE_XPM */
371 #if HAVE_JPEG
372 #ifndef LIBJPEG
373 #define LIBJPEG -ljpeg
374 #endif /* not defined LIBJPEG */
375 #else /* not HAVE_JPEG */
376 #define LIBJPEG
377 #endif /* not HAVE_JPEG */
379 #if HAVE_PNG
380 #ifndef LIBPNG
381 #define LIBPNG -lpng -lz -lm
382 #endif /* not defined LIBPNG */
383 #else /* not HAVE_PNG */
384 #define LIBPNG
385 #endif /* not HAVE_PNG */
387 #if HAVE_TIFF
388 #ifndef LIBTIFF
389 #define LIBTIFF -ltiff
390 #endif /* not defined LIBTIFF */
391 #else /* not HAVE_TIFF */
392 #define LIBTIFF
393 #endif /* not HAVE_TIFF */
395 #if HAVE_GIF
396 #ifndef LIBGIF
397 #define LIBGIF -lgif
398 #endif /* not defined LIBGIF */
399 #else /* not HAVE_GIF */
400 #define LIBGIF
401 #endif /* not HAVE_GIF */
403 #ifdef HAVE_X11
404 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
405 options for where to find X libraries, but before those libraries. */
406 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
407 LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS)
408 #else /* not HAVE_X11 */
409 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
410 #endif /* not HAVE_X11 */
411 #else /* not HAVE_X_WINDOWS */
412 #endif /* not HAVE_X_WINDOWS */
414 #if HAVE_GPM
415 #ifndef LIBGPM
416 #define LIBGPM -lgpm
417 #endif /* not defined LIBGPM */
418 #else /* not HAVE_GPM */
419 #define LIBGPM
420 #endif /* not HAVE_GPM */
422 #if HAVE_LIBRESOLV
423 #ifndef LIBRESOLV
424 #define LIBRESOLV -lresolv
425 #endif /* not defined LIBRESOLV */
426 #else /* not HAVE_LIBRESOLV */
427 #define LIBRESOLV
428 #endif /* not HAVE_LIBRESOLV */
430 LIBSOUND= @LIBSOUND@
431 CFLAGS_SOUND= @CFLAGS_SOUND@
433 RSVG_LIBS= @RSVG_LIBS@
434 RSVG_CFLAGS= @RSVG_CFLAGS@
436 #ifndef ORDINARY_LINK
437 /* Fix linking if compiled with GCC. */
438 #ifdef __GNUC__
440 #ifdef LINKER
441 #define LINKER_WAS_SPECIFIED
442 #endif
444 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
445 places that are difficult to figure out at make time. Fortunately,
446 these same versions allow you to pass arbitrary flags on to the
447 linker, so there is no reason not to use it as a linker.
449 Well, it is not quite perfect. The "-nostdlib" keeps GCC from
450 searching for libraries in its internal directories, so we have to
451 ask GCC explicitly where to find libgcc.a. */
453 #ifndef LINKER
454 #define LINKER $(CC) -nostdlib
455 #endif
457 #ifndef LIB_GCC
458 /* Ask GCC where to find libgcc.a. */
459 #define LIB_GCC `$(CC) -print-libgcc-file-name`
460 #endif /* not LIB_GCC */
462 GNULIB_VAR = LIB_GCC
464 #ifndef LINKER_WAS_SPECIFIED
465 /* GCC passes any argument prefixed with -Xlinker directly to the
466 linker. See prefix-args.c for an explanation of why we do not do
467 this with the shell''s ``for'' construct.
468 Note that some people do not have '.' in their paths, so we must
469 use ./prefix-args. */
470 #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
471 #else
472 #define YMF_PASS_LDFLAGS(flags) flags
473 #endif
475 #else /* not __GNUC__ */
476 GNULIB_VAR =
478 #endif /* not __GNUC__ */
479 #endif /* not ORDINARY_LINK */
481 #ifdef ORDINARY_LINK
482 LD = $(CC)
483 #else
484 #ifdef LINKER
485 LD=LINKER
486 #else /* not LINKER */
487 LD=ld
488 #endif /* not LINKER */
489 #endif /* not ORDINARY_LINK */
491 /* Flags to pass to LD only for temacs. */
492 /* Do not split this line with a backslash. That can cause trouble with
493 some cpps. */
494 TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE
496 /* A macro which other sections of Makefile can redefine to munge the
497 flags before they are passed to LD. This is helpful if you have
498 redefined LD to something odd, like "gcc".
499 (The YMF prefix is a holdover from the old name "ymakefile".)
501 #ifndef YMF_PASS_LDFLAGS
502 #define YMF_PASS_LDFLAGS(flags) flags
503 #endif
505 /* Allow config.h to specify a replacement file for unexec.c. */
506 #ifndef UNEXEC
507 #define UNEXEC unexec.o
508 #endif
510 INTERVAL_SRC = intervals.h composite.h
512 GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
514 #ifdef MSDOS
515 #ifdef HAVE_X_WINDOWS
516 MSDOS_OBJ = dosfns.o msdos.o
517 #else
518 MSDOS_OBJ = dosfns.o msdos.o w16select.o
519 #endif
520 #endif
522 #ifdef CYGWIN
523 CYGWIN_OBJ = sheap.o
524 #endif
526 #ifdef HAVE_CARBON
527 mac = ../mac/
528 MAC_OBJ = mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o fringe.o image.o mactoolbox.o
529 emacsapp = $(PWD)/$(mac)Emacs.app/
530 emacsappsrc = ${srcdir}/../mac/Emacs.app/
531 #endif
533 #ifdef HAVE_NS
534 /* Object files for NeXTstep */
535 NS_OBJ= nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
536 fontset.o fringe.o image.o
537 emacsapp = $(PWD)/../nextstep/build/Emacs.app/
538 #ifdef GNUSTEP
539 emacsappsrc = ${srcdir}/../nextstep/GNUstep/Emacs.base
540 emacsbindir = $(emacsapp)
541 #else
542 emacsappsrc = ${srcdir}/../nextstep/Cocoa/Emacs.base
543 emacsbindir = $(emacsapp)/Contents/MacOS/
544 #endif /* GNUSTEP */
545 #endif /* HAVE_NS */
547 #ifdef HAVE_WINDOW_SYSTEM
548 #ifdef HAVE_X_WINDOWS
549 #if defined (HAVE_XFT)
550 FONT_DRIVERS = xfont.o ftfont.o xftfont.o ftxfont.o
551 #elif defined (HAVE_FREETYPE)
552 FONT_DRIVERS = xfont.o ftfont.o ftxfont.o
553 #else /* ! defined (HAVE_XFT) && ! defined (HAVE_FREETYPE) */
554 FONT_DRIVERS = xfont.o
555 #endif /* ! defined (HAVE_XFT) && ! defined (HAVE_FREETYPE) */
556 #endif /* HAVE_X_WINDOWS */
557 #endif /* HAVE_WINDOW_SYSTEM */
559 /* lastfile must follow all files
560 whose initialized data areas should be dumped as pure by dump-emacs. */
561 obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
562 charset.o coding.o category.o ccl.o character.o chartab.o \
563 cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
564 emacs.o keyboard.o macros.o keymap.o sysdep.o \
565 buffer.o filelock.o insdel.o marker.o \
566 minibuf.o fileio.o dired.o filemode.o \
567 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
568 alloc.o data.o doc.o editfns.o callint.o \
569 eval.o floatfns.o fns.o font.o print.o lread.o \
570 syntax.o UNEXEC bytecode.o \
571 process.o callproc.o \
572 region-cache.o sound.o atimer.o \
573 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
574 $(MSDOS_OBJ) $(MAC_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
576 /* Object files used on some machine or other.
577 These go in the DOC file on all machines
578 in case they are needed there. */
579 SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
580 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
581 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o \
582 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
583 w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
584 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
587 #ifdef TERMINFO
588 /* Used to be -ltermcap here. If your machine needs that,
589 define LIBS_TERMCAP in the m/MACHINE.h file. */
590 #ifndef LIBS_TERMCAP
591 #define LIBS_TERMCAP -lcurses
592 #endif /* LIBS_TERMCAP */
593 termcapobj = terminfo.o
594 #else /* ! defined (TERMINFO) */
595 #ifndef LIBS_TERMCAP
596 #define LIBS_TERMCAP
597 termcapobj = termcap.o tparam.o
598 #else /* LIBS_TERMCAP */
599 termcapobj = tparam.o
600 #endif /* LIBS_TERMCAP */
601 #endif /* ! defined (TERMINFO) */
604 #ifndef SYSTEM_MALLOC
606 #ifndef DOUG_LEA_MALLOC
607 gmallocobj = gmalloc.o
608 #endif
610 #ifdef REL_ALLOC
611 rallocobj = ralloc.o
612 #endif
614 mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
616 #endif /* SYSTEM_MALLOC */
619 #ifdef USE_X_TOOLKIT
620 widgetobj= widget.o
621 #else /* not USE_X_TOOLKIT */
622 widgetobj=
623 #endif /* not USE_X_TOOLKIT */
626 /* define otherobj as list of object files that make-docfile
627 should not be told about. */
628 #ifdef CYGWIN
629 /* Cygwin differs because of its unexec(). */
630 otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(widgetobj) $(LIBOBJS)
631 #else
632 otherobj= $(termcapobj) lastfile.o $(mallocobj) $(widgetobj) $(LIBOBJS)
633 #endif
635 #ifdef HAVE_MOUSE
636 #define MOUSE_SUPPORT ${lispsource}mouse.elc \
637 ${lispsource}select.elc ${lispsource}scroll-bar.elc
638 #else
639 #ifdef HAVE_GPM
640 #define MOUSE_SUPPORT ${lispsource}mouse.elc
641 #else
642 #define MOUSE_SUPPORT
643 #endif
644 #endif
646 #ifdef VMS
647 #define VMS_SUPPORT ${lispsource}vmsproc.elc ${lispsource}vms-patch.elc
648 #else
649 #define VMS_SUPPORT
650 #endif
652 #ifdef MSDOS
653 #define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
654 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
655 ${lispsource}international/ccl.elc ${lispsource}international/codepage.elc
657 #else
658 #define MSDOS_SUPPORT
659 #endif
661 #ifdef HAVE_WINDOW_SYSTEM
662 #ifdef HAVE_X_WINDOWS
663 #define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
664 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
665 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc ${lispsource}x-dnd.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
679 #else
680 #define WINNT_SUPPORT
681 #endif
683 #ifdef HAVE_WINDOW_SYSTEM
684 #define TOOLTIP_SUPPORT ${lispsource}tooltip.elc
685 #else
686 #define TOOLTIP_SUPPORT
687 #endif
689 /* List of Lisp files loaded into the dumped Emacs. It is arranged
690 like this because it is easier to generate it semi-mechanically from
691 loadup.el this way.
693 Note that this list should not include lisp files which might not
694 be present, like site-load.el and site-init.el; this makefile
695 expects them all to be either present or buildable.
697 Files which are loaded unconditionally should be in shortlisp as well.
698 Files included conditionally here should be included (unconditionally)
699 in SOME_MACHINE_LISP. */
701 /* Place loaddefs.el first, so it gets generated first, since it is on
702 the critical path (relevant in parallel compilations). */
704 lisp= \
705 ${lispsource}loaddefs.el \
706 ${lispsource}abbrev.elc \
707 ${lispsource}buff-menu.elc \
708 ${lispsource}button.elc \
709 ${lispsource}emacs-lisp/byte-run.elc \
710 ${lispsource}composite.elc \
711 ${lispsource}cus-face.elc \
712 ${lispsource}cus-start.elc \
713 ${lispsource}custom.elc \
714 ${lispsource}emacs-lisp/backquote.elc \
715 ${lispsource}emacs-lisp/lisp-mode.elc \
716 ${lispsource}emacs-lisp/lisp.elc \
717 ${lispsource}env.elc \
718 ${lispsource}faces.elc \
719 ${lispsource}files.elc \
720 ${lispsource}format.elc \
721 ${lispsource}facemenu.elc \
722 MOUSE_SUPPORT \
723 ${lispsource}emacs-lisp/float-sup.elc \
724 ${lispsource}frame.elc \
725 ${lispsource}help.elc \
726 ${lispsource}indent.elc \
727 ${lispsource}isearch.elc \
728 ${lispsource}rfn-eshadow.elc \
729 ${lispsource}loadup.el \
730 ${lispsource}bindings.elc \
731 ${lispsource}emacs-lisp/map-ynp.elc \
732 ${lispsource}menu-bar.elc \
733 ${lispsource}international/mule.elc \
734 ${lispsource}international/mule-conf.el \
735 ${lispsource}international/mule-cmds.elc \
736 ${lispsource}international/characters.elc \
737 ${lispsource}international/charprop.el \
738 ${lispsource}case-table.elc \
739 ${lispsource}language/chinese.el \
740 ${lispsource}language/cyrillic.el \
741 ${lispsource}language/indian.el \
742 ${lispsource}language/sinhala.el \
743 ${lispsource}language/english.el \
744 ${lispsource}language/ethiopic.elc \
745 ${lispsource}language/european.elc \
746 ${lispsource}language/czech.el \
747 ${lispsource}language/slovak.el \
748 ${lispsource}language/romanian.el \
749 ${lispsource}language/greek.el \
750 ${lispsource}language/hebrew.el \
751 ${lispsource}language/japanese.el \
752 ${lispsource}language/korean.el \
753 ${lispsource}language/lao.el \
754 ${lispsource}language/cham.el \
755 ${lispsource}language/tai-viet.el \
756 ${lispsource}language/thai.el \
757 ${lispsource}language/tibetan.elc \
758 ${lispsource}language/vietnamese.el \
759 ${lispsource}language/misc-lang.el \
760 ${lispsource}language/utf-8-lang.el \
761 ${lispsource}language/georgian.el \
762 ${lispsource}language/khmer.el \
763 ${lispsource}language/burmese.el \
764 ${lispsource}paths.el \
765 ${lispsource}register.elc \
766 ${lispsource}replace.elc \
767 ${lispsource}simple.elc \
768 ${lispsource}minibuffer.elc \
769 ${lispsource}startup.elc \
770 ${lispsource}subr.elc \
771 ${lispsource}term/tty-colors.elc \
772 ${lispsource}font-core.elc \
773 ${lispsource}emacs-lisp/syntax.elc \
774 ${lispsource}font-lock.elc \
775 ${lispsource}jit-lock.elc \
776 ${lispsource}textmodes/fill.elc \
777 ${lispsource}textmodes/page.elc \
778 ${lispsource}textmodes/paragraphs.elc \
779 ${lispsource}textmodes/text-mode.elc \
780 ${lispsource}emacs-lisp/timer.elc \
781 ${lispsource}jka-cmpr-hook.elc \
782 ${lispsource}vc-hooks.elc \
783 ${lispsource}ediff-hook.elc \
784 ${lispsource}epa-hook.elc \
785 TOOLTIP_SUPPORT \
786 VMS_SUPPORT \
787 MSDOS_SUPPORT \
788 WINNT_SUPPORT \
789 WINDOW_SUPPORT \
790 ${lispsource}widget.elc \
791 ${lispsource}window.elc \
792 ${lispsource}version.el
794 /* These are relative file names for the Lisp files
795 that are loaded unconditionally. This is used in make-docfile.
796 It need not contain the files that are loaded conditionally
797 because SOME_MACHINE_LISP has those. */
798 shortlisp= \
799 ../lisp/loaddefs.el \
800 ../lisp/abbrev.elc \
801 ../lisp/buff-menu.elc \
802 ../lisp/button.elc \
803 ../lisp/emacs-lisp/byte-run.elc \
804 ../lisp/composite.elc \
805 ../lisp/cus-face.elc \
806 ../lisp/cus-start.elc \
807 ../lisp/custom.elc \
808 ../lisp/emacs-lisp/backquote.elc \
809 ../lisp/emacs-lisp/lisp-mode.elc \
810 ../lisp/emacs-lisp/lisp.elc \
811 ../lisp/facemenu.elc \
812 ../lisp/faces.elc \
813 ../lisp/files.elc \
814 ../lisp/emacs-lisp/float-sup.elc \
815 ../lisp/format.elc \
816 ../lisp/frame.elc \
817 ../lisp/help.elc \
818 ../lisp/indent.elc \
819 ../lisp/isearch.elc \
820 ../lisp/rfn-eshadow.elc \
821 ../lisp/loadup.el \
822 ../lisp/bindings.elc \
823 ../lisp/emacs-lisp/map-ynp.elc \
824 ../lisp/env.elc \
825 ../lisp/international/mule.elc \
826 ../lisp/international/mule-conf.el \
827 ../lisp/international/mule-cmds.elc \
828 ../lisp/international/characters.elc \
829 ../lisp/case-table.elc \
830 ../lisp/language/chinese.el \
831 ../lisp/language/cyrillic.el \
832 ../lisp/language/indian.el \
833 ../lisp/language/sinhala.el \
834 ../lisp/language/english.el \
835 ../lisp/language/ethiopic.elc \
836 ../lisp/language/european.elc \
837 ../lisp/language/czech.el \
838 ../lisp/language/slovak.el \
839 ../lisp/language/romanian.el \
840 ../lisp/language/greek.el \
841 ../lisp/language/hebrew.el \
842 ../lisp/language/japanese.el \
843 ../lisp/language/korean.el \
844 ../lisp/language/lao.el \
845 ../lisp/language/cham.el \
846 ../lisp/language/tai-viet.el \
847 ../lisp/language/thai.el \
848 ../lisp/language/tibetan.elc \
849 ../lisp/language/vietnamese.el \
850 ../lisp/language/misc-lang.el \
851 ../lisp/language/utf-8-lang.el \
852 ../lisp/language/georgian.el \
853 ../lisp/language/khmer.el \
854 ../lisp/language/burmese.el \
855 ../lisp/menu-bar.elc \
856 ../lisp/paths.el \
857 ../lisp/register.elc \
858 ../lisp/replace.elc \
859 ../lisp/simple.elc \
860 ../lisp/minibuffer.elc \
861 ../lisp/startup.elc \
862 ../lisp/subr.elc \
863 ../lisp/term/tty-colors.elc \
864 ../lisp/font-core.elc \
865 ../lisp/emacs-lisp/syntax.elc \
866 ../lisp/font-lock.elc \
867 ../lisp/jit-lock.elc \
868 ../lisp/textmodes/fill.elc \
869 ../lisp/textmodes/page.elc \
870 ../lisp/textmodes/paragraphs.elc \
871 ../lisp/textmodes/text-mode.elc \
872 ../lisp/emacs-lisp/timer.elc \
873 ../lisp/vc-hooks.elc \
874 ../lisp/jka-cmpr-hook.elc \
875 ../lisp/ediff-hook.elc \
876 ../lisp/epa-hook.elc \
877 ../lisp/widget.elc \
878 ../lisp/window.elc \
879 ../lisp/version.el
881 /* Lisp files that may or may not be used.
882 We must unconditionally put them in the DOC file.
883 We use ../lisp/ to start the file names
884 to reduce the size of the argument list for make-docfile
885 for the sake of systems which can''t handle large ones. */
886 SOME_MACHINE_LISP = ../lisp/mouse.elc \
887 ../lisp/select.elc ../lisp/scroll-bar.elc \
888 VMS_SUPPORT \
889 ../lisp/ls-lisp.elc ../lisp/dos-fns.elc \
890 ../lisp/w32-fns.elc ../lisp/dos-w32.elc \
891 ../lisp/disp-table.elc ../lisp/dos-vars.elc \
892 ../lisp/tooltip.elc ../lisp/image.elc \
893 ../lisp/fringe.elc ../lisp/dnd.elc \
894 ../lisp/mwheel.elc ../lisp/tool-bar.elc \
895 ../lisp/x-dnd.elc \
896 ../lisp/international/ccl.elc \
897 ../lisp/international/codepage.elc \
898 ../lisp/international/fontset.elc \
899 ../lisp/mouse.elc \
900 ../lisp/term/x-win.elc
902 /* Construct full set of libraries to be linked.
903 Note that SunOS needs -lm to come before -lc; otherwise, you get
904 duplicated symbols. If the standard libraries were compiled
905 with GCC, we might need gnulib again after them. */
907 LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
908 LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
909 LIBS_DEBUG $(GETLOADAVG_LIBS) \
910 @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
911 $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
913 /* Enable recompilation of certain other files depending on system type. */
915 #ifndef OTHER_FILES
916 #define OTHER_FILES
917 #endif
919 #ifndef OBJECTS_MACHINE
920 #define OBJECTS_MACHINE
921 #endif
923 #ifdef HAVE_SHM
924 RUN_TEMACS = `/bin/pwd`/temacs -nl
925 #else
926 RUN_TEMACS = `/bin/pwd`/temacs
927 #endif
929 all: emacs${EXEEXT} OTHER_FILES
931 emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} ${SOME_MACHINE_LISP}
932 #ifdef CANNOT_DUMP
933 rm -f emacs${EXEEXT}
934 ln temacs${EXEEXT} emacs${EXEEXT}
935 #else
936 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
937 @: This new Emacs is as functional and more efficient then
938 @: bootstrap-emacs, so let us replace it.
939 -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
940 #endif /* ! defined (CANNOT_DUMP) */
941 /* XXX: not working under NS currently due to path shenanigans.. */
942 #ifndef HAVE_NS
943 -./emacs -q -batch -f list-load-path-shadows
944 #endif
946 /* We run make-docfile twice because the command line may get too long
947 on some systems. */
948 /* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
949 or may not be included in ${obj}, but they are always included in
950 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
951 for the first time, this prevents any variation between configurations
952 in the contents of the DOC file.
953 Likewise for ${SOME_MACHINE_LISP}. */
954 /* Most of this Makefile refers to Lisp files via ${lispsource}, so
955 we also use ${lisp} rather than ${shortlisp} for the dependency since
956 the Makefile uses string equality to decide when we talk about identical
957 files. Apparently we pass ${shortlisp} rather than ${lisp} to make-docfile
958 only in order to reduce the command line length. --Stef */
959 ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
960 -rm -f ${etc}DOC
961 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
962 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
964 ${libsrc}make-docfile${EXEEXT}:
965 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
967 temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT}
968 echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst
969 #ifdef GNUSTEP
970 $(CC) -rdynamic YMF_PASS_LDFLAGS (${TEMACS_LDFLAGS}) -o temacs ${obj} ${otherobj} OBJECTS_MACHINE ${LIBES}
971 #else
972 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
973 -o temacs ${STARTFILES} ${obj} ${otherobj} \
974 OBJECTS_MACHINE ${LIBES}
975 #endif
977 /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
978 often contain options that have to do with using Emacs''s crt0,
979 which are only good with temacs. */
980 prefix-args${EXEEXT}: prefix-args.c $(config_h)
981 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
983 #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
985 /* We use stamp-xmenu with these two deps
986 to both ensure that lwlib gets remade based on its dependencies
987 in its own makefile,
988 and remake temacs if lwlib gets changed by this. */
989 stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
990 touch stamp-oldxmenu
991 /* Supply an ordering for parallel make. */
992 ../src/$(OLDXMENU): ${OLDXMENU}
994 /* Encode the values of these two macros in Make variables,
995 so we can use $(...) to substitute their values within "...". */
996 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
997 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
998 C_SWITCH_SITE_1 = C_SWITCH_SITE
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_SITE=$(C_SWITCH_SITE_1)" \
1013 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
1014 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
1015 @true /* make -t should not create really-lwlib. */
1016 .PHONY: really-lwlib
1017 #else /* not USE_X_TOOLKIT */
1018 $(OLDXMENU): really-oldXMenu
1020 really-oldXMenu:
1021 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
1022 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
1023 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
1024 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
1025 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
1026 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
1027 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
1028 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
1029 @true /* make -t should not create really-oldXMenu. */
1030 .PHONY: really-oldXMenu
1031 #endif /* not USE_X_TOOLKIT */
1032 #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
1034 /* We don''t really need this, but satisfy the dependency. */
1035 stamp-oldxmenu:
1036 touch stamp-oldxmenu
1037 #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
1039 ../config.status:: epaths.in
1040 @echo "The file epaths.h needs to be set up from epaths.in."
1041 @echo "Please run the `configure' script again."
1042 exit 1
1044 ../config.status:: config.in
1045 @echo "The file config.h needs to be set up from config.in."
1046 @echo "Please run the `configure' script again."
1047 exit 1
1049 /* Nearly all the following files depend on lisp.h,
1050 but it is not included as a dependency because
1051 it is so often changed in ways that do not require any recompilation
1052 and so rarely changed in ways that do require any. */
1054 abbrev.o: abbrev.c buffer.h window.h dispextern.h commands.h character.h \
1055 syntax.h $(config_h)
1056 buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
1057 dispextern.h $(INTERVAL_SRC) blockinput.h atimer.h systime.h character.h \
1058 $(config_h)
1059 callint.o: callint.c window.h commands.h buffer.h keymap.h \
1060 keyboard.h dispextern.h $(config_h)
1061 callproc.o: callproc.c epaths.h buffer.h commands.h $(config_h) \
1062 process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \
1063 composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h
1064 casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \
1065 composite.h \
1066 charset.h keymap.h $(config_h)
1067 casetab.o: casetab.c buffer.h $(config_h)
1068 category.o: category.c category.h buffer.h charset.h keymap.h \
1069 character.h $(config_h)
1070 ccl.o: ccl.c ccl.h charset.h character.h coding.h $(config_h)
1071 character.o: character.c character.h buffer.h charset.h composite.h disptab.h \
1072 $(config.h)
1073 charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \
1074 disptab.h $(config_h)
1075 chartab.o: charset.h character.h $(config.h)
1076 coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h intervals.h composite.h \
1077 window.h dispextern.h frame.h termhooks.h $(config_h)
1078 cm.o: cm.c frame.h cm.h termhooks.h termchar.h $(config_h)
1079 cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h $(config_h) \
1080 msdos.h dispextern.h keyboard.h keymap.h
1081 pre-crt0.o: pre-crt0.c
1082 ecrt0.o: ecrt0.c $(config_h)
1083 CRT0_COMPILE ${srcdir}/ecrt0.c
1084 dired.o: dired.c commands.h buffer.h $(config_h) character.h charset.h \
1085 coding.h regex.h systime.h blockinput.h atimer.h
1086 dispnew.o: dispnew.c systime.h commands.h process.h frame.h \
1087 window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \
1088 disptab.h indent.h intervals.h \
1089 xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \
1090 $(config_h)
1091 doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h
1092 doprnt.o: doprnt.c character.h $(config_h)
1093 dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
1094 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
1095 $(config_h)
1096 editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \
1097 coding.h dispextern.h frame.h blockinput.h atimer.h $(config_h)
1098 emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1099 termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h) \
1100 window.h dispextern.h keyboard.h keymap.h
1101 fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \
1102 coding.h msdos.h dispextern.h blockinput.h atimer.h $(config_h)
1103 filelock.o: filelock.c buffer.h character.h charset.h coding.h systime.h \
1104 epaths.h $(config_h)
1105 filemode.o: filemode.c $(config_h)
1106 frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1107 blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \
1108 msdos.h dosfns.h dispextern.h w32term.h macterm.h termchar.h $(config_h)
1109 fringe.o: fringe.c dispextern.h frame.h window.h buffer.h termhooks.h $(config_h)
1110 font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \
1111 font.h $(config_h)
1112 ftfont.o: dispextern.h frame.h character.h charset.h font.h $(config_h)
1113 fontset.o: dispextern.h fontset.h fontset.c ccl.h buffer.h character.h \
1114 charset.h frame.h keyboard.h termhooks.h font.h $(config_h)
1115 getloadavg.o: getloadavg.c $(config_h)
1116 image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \
1117 systime.h xterm.h w32term.h w32gui.h macterm.h macgui.h font.h \
1118 nsterm.h nsgui.h $(config_h)
1119 indent.o: indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \
1120 termopts.h disptab.h region-cache.h character.h category.h composite.h \
1121 dispextern.h keyboard.h
1122 insdel.o: insdel.c window.h buffer.h $(INTERVAL_SRC) blockinput.h character.h \
1123 dispextern.h atimer.h systime.h region-cache.h $(config_h)
1124 keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \
1125 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
1126 systime.h dispextern.h syntax.h $(INTERVAL_SRC) blockinput.h \
1127 atimer.h xterm.h puresize.h msdos.h keymap.h w32term.h macterm.h nsterm.h \
1128 $(config_h)
1129 keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
1130 atimer.h systime.h puresize.h character.h intervals.h keymap.h window.h \
1131 $(config_h)
1132 lastfile.o: lastfile.c $(config_h)
1133 macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
1134 dispextern.h $(config_h)
1135 malloc.o: malloc.c $(config_h)
1136 gmalloc.o: gmalloc.c $(config_h)
1137 ralloc.o: ralloc.c $(config_h)
1138 vm-limit.o: vm-limit.c mem-limits.h $(config_h)
1139 marker.o: marker.c buffer.h character.h $(config_h)
1140 md5.o: md5.c md5.h $(config_h)
1141 minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h keyboard.h \
1142 buffer.h commands.h character.h msdos.h $(INTERVAL_SRC) keymap.h \
1143 termhooks.h $(config_h)
1144 mktime.o: mktime.c $(config_h)
1145 msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
1146 termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \
1147 keyboard.h intervals.h buffer.h commands.h blockinput.h atimer.h $(config_h)
1148 process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
1149 commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
1150 blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
1151 keyboard.h $(config_h)
1152 regex.o: regex.c syntax.h buffer.h $(config_h) regex.h category.h character.h \
1153 charset.h
1154 region-cache.o: region-cache.c buffer.h region-cache.h $(config_h)
1155 scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \
1156 termhooks.h $(config_h)
1157 search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
1158 blockinput.h atimer.h systime.h category.h character.h charset.h \
1159 composite.h $(INTERVAL_SRC) \
1160 $(config_h)
1161 strftime.o: strftime.c $(config_h)
1162 syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \
1163 composite.h keymap.h regex.h $(INTERVAL_SRC) $(config_h)
1164 sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \
1165 process.h dispextern.h termhooks.h termchar.h termopts.h \
1166 frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h $(config_h)
1167 term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \
1168 disptab.h dispextern.h keyboard.h character.h charset.h coding.h ccl.h \
1169 msdos.h window.h keymap.h blockinput.h atimer.h systime.h
1170 termcap.o: termcap.c $(config_h)
1171 terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \
1172 keyboard.h $(config_h)
1173 terminfo.o: terminfo.c $(config_h)
1174 tparam.o: tparam.c $(config_h)
1175 undo.o: undo.c buffer.h commands.h window.h $(config_h)
1176 unexaix.o: unexaix.c $(config_h)
1177 unexalpha.o: unexalpha.c $(config_h)
1178 unexcw.o: unexcw.c $(config_h)
1179 unexec.o: unexec.c $(config_h)
1180 unexelf.o: unexelf.c $(config_h)
1181 unexhp9k800.o: unexhp9k800.c $(config_h)
1182 unexmacosx.o: unexmacosx.c $(config_h)
1183 unexmips.o: unexmips.c $(config_h)
1184 unexnext.o: unexnext.c $(config_h)
1185 unexsol.o: unexsol.c $(config_h)
1186 unexw32.o: unexw32.c $(config_h)
1187 w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
1188 msdos.h buffer.h charset.h coding.h composite.h $(config_h)
1189 widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1190 $(srcdir)/../lwlib/lwlib.h $(config_h)
1191 window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
1192 disptab.h keyboard.h dispextern.h msdos.h composite.h \
1193 keymap.h blockinput.h atimer.h systime.h $(INTERVAL_SRC) \
1194 xterm.h w32term.h macterm.h nsterm.h $(config_h)
1195 xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \
1196 coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \
1197 charset.h $(config_h) keyboard.h $(INTERVAL_SRC) region-cache.h xterm.h \
1198 w32term.h macterm.h nsterm.h msdos.h composite.h fontset.h blockinput.h \
1199 atimer.h systime.h keymap.h font.h
1200 xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1201 window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \
1202 systime.h keyboard.h fontset.h w32term.h macterm.h nsterm.h $(INTERVAL_SRC) \
1203 termchar.h termhooks.h font.h $(config_h)
1204 xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \
1205 $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \
1206 character.h charset.h coding.h gtkutil.h $(config_h) termhooks.h \
1207 fontset.h termchar.h font.h
1208 xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
1209 font.h $(config_h)
1210 xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
1211 font.h $(config_h)
1212 ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
1213 font.h $(config_h)
1214 menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \
1215 dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \
1216 $(config_h)
1217 xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
1218 charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \
1219 systime.h gtkutil.h msdos.h coding.h menu.h $(config_h)
1220 xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
1221 dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
1222 keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \
1223 coding.h process.h gtkutil.h font.h fontset.h $(config_h)
1224 xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
1225 buffer.h atimer.h systime.h termhooks.h $(config_h)
1226 xrdb.o: xrdb.c $(config_h) epaths.h
1227 xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h xterm.h \
1228 lisp.h termopts.h
1229 gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \
1230 blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \
1231 charset.h coding.h
1232 dbusbind.o: dbusbind.c termhooks.h $(config_h)
1234 hftctl.o: hftctl.c $(config_h)
1235 sound.o: sound.c dispextern.h $(config_h)
1236 atimer.o: atimer.c atimer.h systime.h $(config_h)
1238 /* The files of Lisp proper */
1240 alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
1241 blockinput.h atimer.h systime.h character.h dispextern.h $(config_h) \
1242 $(INTERVAL_SRC)
1243 bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \
1244 frame.h xterm.h $(config_h)
1245 data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \
1246 termhooks.h $(config_h)
1247 eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
1248 dispextern.h $(config_h)
1249 floatfns.o: floatfns.c $(config_h)
1250 fns.o: fns.c commands.h $(config_h) frame.h buffer.h character.h keyboard.h \
1251 keymap.h frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h \
1252 blockinput.h atimer.h systime.h xterm.h termhooks.h
1253 print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \
1254 $(config_h) dispextern.h termchar.h $(INTERVAL_SRC) msdos.h composite.h \
1255 blockinput.h atimer.h systime.h font.h
1256 lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \
1257 charset.h $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h
1259 /* Text properties support */
1260 textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \
1261 $(config_h)
1262 intervals.o: intervals.c buffer.h $(INTERVAL_SRC) keyboard.h puresize.h \
1263 keymap.h $(config_h)
1264 composite.o: composite.c buffer.h character.h $(INTERVAL_SRC) $(config_h)
1266 /* System-specific programs to be made.
1267 OTHER_FILES and OBJECTS_MACHINE
1268 select which of these should be compiled. */
1270 #ifdef HAVE_CARBON
1271 buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
1272 fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
1273 scroll.o sysdep.o term.o terminal.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
1274 xterm.o xselect.o sound.o: macgui.h
1275 mac.o: mac.c process.h sysselect.h blockinput.h atimer.h systime.h charset.h \
1276 coding.h ccl.h $(config_h)
1277 macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \
1278 dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
1279 atimer.h systime.h epaths.h termhooks.h coding.h $(config_h)
1280 macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \
1281 keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h)
1282 macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \
1283 frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \
1284 termchar.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
1285 process.h coding.h $(config_h)
1286 macselect.o: blockinput.h atimer.h systime.h macterm.h macgui.h frame.h \
1287 keymap.h $(config_h)
1288 mactoolbox.o: blockinput.h atimer.h systime.h macterm.h macgui.h frame.h \
1289 charset.h coding.h ccl.h dispextern.h fontset.h termhooks.h buffer.h \
1290 window.h keyboard.h $(config_h)
1292 ${emacsapp}Contents/Resources/English.lproj:
1293 mkdir -p $@
1295 ifneq (${emacsapp},${emacsappsrc})
1296 ${emacsapp}Contents/Info.plist: ${emacsappsrc}Contents/Info.plist
1297 cp $< $@
1298 ${emacsapp}Contents/PkgInfo: ${emacsappsrc}Contents/PkgInfo
1299 cp $< $@
1300 ${emacsapp}Contents/Resources/Emacs.icns: ${emacsappsrc}Contents/Resources/Emacs.icns
1301 mkdir -p ${emacsapp}Contents/Resources
1302 cp $< $@
1303 ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings: ${emacsappsrc}Contents/Resources/English.lproj/InfoPlist.strings
1304 cp $< $@
1305 endif
1307 macosx-bundle: ${emacsapp}Contents/Resources/English.lproj \
1308 ${emacsapp}Contents/Info.plist ${emacsapp}Contents/PkgInfo \
1309 ${emacsapp}Contents/Resources/Emacs.icns \
1310 ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings
1311 macosx-app: macosx-bundle ${emacsapp}Contents/MacOS/Emacs
1312 ${emacsapp}Contents/MacOS/Emacs: emacs${EXEEXT}
1313 mkdir -p ${emacsapp}Contents/MacOS/;
1314 cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} Emacs${EXEEXT}
1315 #endif /* HAVE_CARBON */
1317 #ifdef HAVE_NS
1318 abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
1319 fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
1320 scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o xfns.o \
1321 xterm.o xselect.o sound.o: nsgui.h
1322 nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \
1323 dispextern.h nsgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
1324 atimer.h systime.h epaths.h termhooks.h coding.h systime.h $(config_h)
1325 nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \
1326 nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \
1327 nsterm.h $(config_h)
1328 nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \
1329 nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \
1330 termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \
1331 $(INTERVAL_SRC) process.h coding.h $(config_h)
1332 nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h $(config_h)
1333 nsimage.o: nsimage.m nsterm.h
1334 nsfont.o: nsterm.h dispextern.h frame.h lisp.h $(config_h)
1336 ${emacsapp}: ${emacsappsrc}
1337 mkdir -p ${emacsapp}
1338 ( cd ${emacsappsrc} ; tar cfh - . ) | ( cd ${emacsapp} ; tar xf - )
1340 ${emacsbindir}Emacs: emacs${EXEEXT}
1341 mkdir -p ${emacsbindir}
1342 cp -f emacs${EXEEXT} ${emacsbindir}Emacs
1344 ns-app: ${emacsapp} ${emacsbindir}Emacs
1346 #endif /* HAVE_NS */
1348 mostlyclean:
1349 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
1350 rm -f ../etc/DOC
1351 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
1352 rm -f buildobj.lst
1353 clean: mostlyclean
1354 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
1355 #ifdef GNUSTEP
1356 rm -f *.d
1357 #endif
1358 /* bootstrap-clean is used to clean up just before a bootstrap.
1359 It should remove all files generated during a compilation/bootstrap,
1360 but not things like config.status or TAGS. */
1361 bootstrap-clean: clean
1362 rm -f epaths.h config.h Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
1363 if test -f ./.gdbinit; then \
1364 mv ./.gdbinit ./.gdbinit.save; \
1365 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
1366 else mv ./.gdbinit.save ./.gdbinit; fi; \
1368 /**/# This is used in making a distribution.
1369 /**/# Do not use it on development directories!
1370 distclean: bootstrap-clean
1371 rm -f Makefile
1372 maintainer-clean: distclean
1373 @echo "This command is intended for maintainers to use;"
1374 @echo "it deletes files that may require special tools to rebuild."
1375 rm -f TAGS
1376 versionclean:
1377 -rm -f emacs${EXEEXT} emacs-*.*.*${EXEEXT} ../etc/DOC*
1378 extraclean: distclean
1379 -rm -f *~ \#* m/?*~ s/?*~
1381 /* Arrange to make a tags table TAGS-LISP for ../lisp,
1382 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1384 ctagsfiles1 = [xyzXYZ]*.[hc]
1385 ctagsfiles2 = [a-wA-W]*.[hc]
1387 TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1388 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1389 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1390 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1391 frc:
1392 TAGS-LISP: frc
1393 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
1395 $(lwlibdir)TAGS:
1396 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
1398 tags: TAGS TAGS-LISP $(lwlibdir)TAGS
1399 .PHONY: tags
1402 /* Bootstrapping. */
1403 /* Bootstrapping right is difficult because of the circular dependencies.
1404 Furthermore, we have to deal with the fact that many compilation targets
1405 such as loaddefs.el or *.elc can typically be produced by any old
1406 Emacs executable, so we would like to avoid rebuilding them whenever
1407 we build a new Emacs executable.
1408 To solve the circularity, we use 2 different Emacs executables,
1409 "emacs" is the main target and "bootstrap-emacs" is the one used
1410 to build the *.elc and loaddefs.el files.
1411 To solve the freshness issue, we used to use a third file "witness-emacs"
1412 which was used to witness the fact that there is a bootstrap-emacs
1413 executable, and then have dependencies on witness-emacs rather than
1414 bootstrap-emacs, but that lead to problems in parallel builds (because
1415 witness-emacs needed to be free from dependencies (to avoid rebuilding
1416 it), so it was compiled in parallel, leading typically to having 2
1417 processes dumping bootstrap-emacs at the same time).
1418 So instead, we replace the witness-emacs dependencies by conditional
1419 bootstrap-dependencies (via ${BOOTSTRAPEMACS}). Of course, since we do
1420 not want to rely on GNU Make features, we have to rely on an external
1421 script to do the conditional part of the dependency
1422 (i.e. see the ${SUBDIR} rule ../Makefile.in). */
1424 .SUFFIXES: .elc .el
1426 /* These suffix rules do not allow additional dependencies, sadly, so
1427 instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
1428 separately below.
1429 With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)" */
1430 .el.elc:
1431 @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
1432 THEFILE=$< EMACS=../src/bootstrap-emacs${EXEEXT}
1434 /* Since the .el.elc rule cannot specify an extra dependency, we do it here. */
1435 ${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
1437 ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
1438 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=../src/bootstrap-emacs${EXEEXT}
1440 /* Dump an Emacs executable named bootstrap-emacs containing the
1441 files from loadup.el in source form. */
1443 bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
1444 cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
1445 #ifdef CANNOT_DUMP
1446 ln temacs${EXEEXT} bootstrap-emacs${EXEEXT}
1447 #else
1448 $(RUN_TEMACS) --batch --load loadup bootstrap
1449 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
1450 #endif /* ! defined (CANNOT_DUMP) */
1451 @: Compile some files earlier to speed up further compilation.
1452 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=../src/bootstrap-emacs${EXEEXT}