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