If HAVE_X11, also HAVE_X_WINDOWS and HAVE_MENUS.
[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,
b5457f14
GM
3# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
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
e20f1f07 33SHELL = /bin/sh
a0528984
EZ
34
35# Here are the things that we expect ../configure to edit.
36# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
82c3d67a
AS
37srcdir = @srcdir@
38abs_builddir = @abs_builddir@
39VPATH = $(srcdir)
40CC = @CC@
82c3d67a
AS
41CFLAGS = @CFLAGS@
42CPPFLAGS = @CPPFLAGS@
43LDFLAGS = @LDFLAGS@
82c3d67a
AS
44EXEEXT = @EXEEXT@
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
82c3d67a 66bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
7763401b 67
005bd5a2
DN
68OTHER_FILES = @OTHER_FILES@
69
70eab5c1
GM
70CRT_DIR=@CRT_DIR@
71
49628785
GM
72## Machine-specific CFLAGS.
73C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
74## System-specific CFLAGS.
75C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
5a903aa9
GM
76
77## Currently only set if NS_IMPL_GNUSTEP.
78## C_SWITCH_X_SITE may override this.
79C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
80
81## Define C_SWITCH_X_SITE to contain any special flags your compiler
82## may need to deal with X Windows. For instance, if you've defined
83## HAVE_X_WINDOWS and your X include files aren't in a place that your
84## compiler can find on its own, you might want to add "-I/..." or
85## something similar. This is normally set by configure.
86## This is used before C_SWITCH_X_SYSTEM and may override it.
87C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
88
0116466b
GM
89## Define LD_SWITCH_X_SITE to contain any special flags your loader
90## may need to deal with X Windows. For instance, if your X libraries
91## aren't in a place that your loader can find on its own, you might
92## want to add "-L/..." or something similar. Only used if
93## HAVE_X_WINDOWS.
94## FIXME? configure sets a value for this, but it has never been
95## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE.
96LD_SWITCH_X_SITE=
97
eb21eab5 98## This holds any special options for linking temacs only (ie, not
2f86b22b
GM
99## used by configure). Not used elsewhere because it sometimes
100## contains options that have to do with using Emacs's crt0,
101## which are only good with temacs.
eb21eab5 102LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
5a903aa9 103
27a2cdfc
GM
104## Next two must come before LD_SWITCH_SYSTEM.
105## If needed, a -R option that says where to find X windows at run time.
106LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
107## As above, but using -rpath instead.
108LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
5a903aa9 109
2f86b22b
GM
110## System-specific LDFLAGS.
111LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
112LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@
5a903aa9 113
2f86b22b
GM
114## Flags to pass to ld only for temacs.
115TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS)
49628785 116
97efb629
GM
117## Some systems define this to request special libraries.
118LIBS_SYSTEM=@LIBS_SYSTEM@
119
1a0d7c06
GM
120## Where to find libgcc.a, if using gcc and necessary.
121LIB_GCC=@LIB_GCC@
122
5a903aa9
GM
123## May use $CRT_DIR.
124LIB_STANDARD=@LIB_STANDARD@
125
126## -lm, or empty.
127LIB_MATH=@LIB_MATH@
128
0dc2e11d
GM
129LIBTIFF=@LIBTIFF@
130LIBJPEG=@LIBJPEG@
131LIBPNG=@LIBPNG@
132LIBGIF=@LIBGIF@
133LIBXPM=@LIBXPM@
134XFT_LIBS=@XFT_LIBS@
3dee6fdb 135LIBX_EXTRA=$(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
0dc2e11d 136
5a903aa9
GM
137FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
138FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
139FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
140FREETYPE_LIBS = @FREETYPE_LIBS@
141LIBOTF_CFLAGS = @LIBOTF_CFLAGS@
142LIBOTF_LIBS = @LIBOTF_LIBS@
143M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
144M17N_FLT_LIBS = @M17N_FLT_LIBS@
145
19d4c244
DN
146DBUS_CFLAGS = @DBUS_CFLAGS@
147DBUS_LIBS = @DBUS_LIBS@
10efe302 148DBUS_OBJ = @DBUS_OBJ@
19d4c244
DN
149
150GCONF_CFLAGS = @GCONF_CFLAGS@
151GCONF_LIBS = @GCONF_LIBS@
152
10efe302
GM
153GTK_OBJ=@GTK_OBJ@
154
40c17879
GM
155## -ltermcap, or -lncurses, or -lcurses, or "".
156LIBS_TERMCAP=@LIBS_TERMCAP@
157## terminfo.o if TERMINFO, else tparam.o.
158TERMCAP_OBJ=@TERMCAP_OBJ@
159
294c50a0
GM
160LIBXMU=@LIBXMU@
161
10efe302
GM
162LIBXSM=@LIBXSM@
163
8fdac2c3
GM
164LIBXTR6=@LIBXTR6@
165
3dee6fdb
GM
166## $(LIBXMU) -lXt $(LIBXTR6) -lXext if USE_X_TOOLKIT, else $(LIBXSM).
167## Only used if HAVE_X_WINDOWS.
168LIBXT_OTHER=@LIBXT_OTHER@
169
10efe302
GM
170XMENU_OBJ=@XMENU_OBJ@
171XOBJ=@XOBJ@
172
986fb647 173TOOLKIT_LIBW=@TOOLKIT_LIBW@
b678dd8b 174
19d4c244
DN
175LIBSOUND= @LIBSOUND@
176CFLAGS_SOUND= @CFLAGS_SOUND@
177
178RSVG_LIBS= @RSVG_LIBS@
179RSVG_CFLAGS= @RSVG_CFLAGS@
180
b678dd8b
GM
181## widget.o if USE_X_TOOLKIT, otherwise empty.
182WIDGET_OBJ=@WIDGET_OBJ@
183
c40f9449
GM
184## sheap.o if CYGWIN, otherwise empty.
185CYGWIN_OBJ=@CYGWIN_OBJ@
186
f14d1dfd
GM
187## dosfns.o msdos.o if MSDOS.
188MSDOS_OBJ =
189## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS.
190MSDOS_X_OBJ =
191MSDOS_SUPPORT_REAL = ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
192 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
193 ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc
194## $MSDOS_SUPPORT_REAL if MSDOS.
195MSDOS_SUPPORT =
196
177b0288
GM
197ns_appdir=@ns_appdir@/
198ns_appbindir=@ns_appbindir@/
199ns_appsrc=@ns_appsrc@
e6ec4e99
GM
200NS_OBJ=@NS_OBJ@
201NS_SUPPORT=@NS_SUPPORT@
5a903aa9
GM
202## Next two only set if NS_IMPL_GNUSTEP.
203GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
204GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@
e6ec4e99 205
3369c79f 206## Only used if HAVE_X_WINDOWS.
bc0b5f61
GM
207FONT_OBJ=@FONT_OBJ@
208
11842bd8
GM
209## Used if HAVE_MOUSE.
210REAL_MOUSE_SUPPORT=${lispsource}mouse.elc ${lispsource}select.elc \
211 ${lispsource}scroll-bar.elc
212## Used if HAVE_GPM && !HAVE_MOUSE
213GPM_MOUSE_SUPPORT=${lispsource}mouse.elc
5a903aa9 214LIBGPM = @LIBGPM@
11842bd8
GM
215## Either of the two preceding options, or empty.
216MOUSE_SUPPORT=@MOUSE_SUPPORT@
217
218## ${lispsource}tooltip.elc if HAVE_WINDOW_SYSTEM, else empty.
219TOOLTIP_SUPPORT=@TOOLTIP_SUPPORT@
658f86ca 220
faf535f8
GM
221BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \
222 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
223 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc
224
225X_WINDOW_SUPPORT=${lispsource}x-dnd.elc ${lispsource}term/common-win.elc \
226 ${lispsource}term/x-win.elc ${lispsource}dynamic-setting.elc
227
11842bd8
GM
228## If HAVE_X_WINDOWS, both the above
229## else if HAVE_WINDOW_SYSTEM (ie, HAVE_NS) just the former; else empty.
230WINDOW_SUPPORT=@WINDOW_SUPPORT@
231
5a903aa9
GM
232## -lresolv, or empty.
233LIBRESOLV = @LIBRESOLV@
234
2807228d
GM
235LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
236
19d4c244
DN
237INTERVALS_H = dispextern.h intervals.h composite.h
238
239GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
240
241RUN_TEMACS = `/bin/pwd`/temacs
242
49ebbd65
DN
243START_FILES = @START_FILES@
244
5a903aa9
GM
245UNEXEC_OBJ = @unexec@
246
a0528984
EZ
247# ========================== start of cpp stuff =======================
248/* From here on, comments must be done in C syntax. */
249
a0528984
EZ
250#define NOT_C_CODE
251#include "config.h"
252
a53cfbe5
JD
253#ifdef AUTO_DEPEND
254DEPFLAGS = -MMD -MF deps/$*.d
255#endif
256
489d31a4
GM
257/* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */
258@NS_IMPL_GNUSTEP_INC@
edfda783 259
a0528984
EZ
260/* DO NOT use -R. There is a special hack described in lastfile.c
261 which is used instead. Some initialized data areas are modified
262 at initial startup, then labeled as part of the text area when
e20f1f07 263 Emacs is dumped for the first time, and never changed again. */
a0528984
EZ
264
265/* -Demacs is needed to make some files produce the correct version
266 for use in Emacs.
267
268 -DHAVE_CONFIG_H is needed for some other files to take advantage of
5aa17bb2 269 the information in ``config.h''. */
a0528984 270
e769f484 271/* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
5a903aa9 272 since it may have -I options that should override those. */
e3cf0cde 273/* MYCPPFLAGS only referenced in etc/DEBUG. */
5a903aa9
GM
274ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS}
275ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
48fad8e8 276
edfda783 277.SUFFIXES: .m
a0528984 278.c.o:
a53cfbe5 279#ifdef AUTO_DEPEND
5d1e70a2 280 @-test -d deps || mkdir deps
a53cfbe5 281#endif
a0528984 282 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
edfda783 283.m.o:
a53cfbe5 284#ifdef AUTO_DEPEND
5d1e70a2 285 @-test -d deps || mkdir deps
a53cfbe5 286#endif
48fad8e8 287 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
a0528984 288
a0528984 289#ifdef HAVE_X_WINDOWS
d5096f16
GM
290OLDXMENU=@OLDXMENU@
291LIBXMENU=@LIBXMENU@
3dee6fdb 292LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER)
0116466b 293LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
3dee6fdb 294LIBX_OTHER=@LIBX_OTHER@
3369c79f 295FONT_DRIVERS=$(FONT_OBJ)
472c5d6b 296#endif /* HAVE_X_WINDOWS */
a0528984 297
1a0d7c06 298
b5457f14
GM
299/* A macro which other sections of Makefile can redefine to munge the
300 flags before they are passed to LD. This is helpful if you have
301 redefined LD to something odd, like "gcc".
302 (The YMF prefix is a holdover from the old name "ymakefile".) */
303#define YMF_PASS_LDFLAGS(flags) flags
a0528984 304
a0528984 305
b5457f14
GM
306#ifdef ORDINARY_LINK
307LD = $(CC)
308
309#else /* not ORDINARY_LINK */
310GNULIB_VAR = $(LIB_GCC)
311
312/* Fix linking if compiled with GCC. */
313#if defined (__GNUC__) && ! defined (LINKER)
a0528984
EZ
314/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
315 places that are difficult to figure out at make time. Fortunately,
316 these same versions allow you to pass arbitrary flags on to the
be9b5a60 317 linker, so there is no reason not to use it as a linker.
a0528984 318
be9b5a60 319 Well, it is not quite perfect. The "-nostdlib" keeps GCC from
a0528984
EZ
320 searching for libraries in its internal directories, so we have to
321 ask GCC explicitly where to find libgcc.a. */
a0528984 322#define LINKER $(CC) -nostdlib
b5457f14
GM
323/* GCC passes any argument prefixed with -Xlinker directly to the linker.
324 See prefix-args.c for an explanation of why we do not do this with the
325 shell''s ``for'' construct. Note that sane people do not have '.' in
326 their paths, so we must use ./prefix-args. */
327#undef YMF_PASS_LDFLAGS
a0528984 328#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
b5457f14 329#endif /* defined (__GNUC__) && ! defined (LINKER) */
a0528984 330
a0528984
EZ
331#ifdef LINKER
332LD=LINKER
333#else /* not LINKER */
334LD=ld
335#endif /* not LINKER */
b5457f14 336
a0528984
EZ
337#endif /* not ORDINARY_LINK */
338
11842bd8
GM
339/* lastfile must follow all files whose initialized data areas should
340 be dumped as pure by dump-emacs. */
01ef9d36 341obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
f44e260c 342 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
033b73e2 343 cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
a0528984
EZ
344 emacs.o keyboard.o macros.o keymap.o sysdep.o \
345 buffer.o filelock.o insdel.o marker.o \
346 minibuf.o fileio.o dired.o filemode.o \
347 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
348 alloc.o data.o doc.o editfns.o callint.o \
0f91ebe6 349 eval.o floatfns.o fns.o font.o print.o lread.o \
5a903aa9 350 syntax.o $(UNEXEC_OBJ) bytecode.o \
a0528984
EZ
351 process.o callproc.o \
352 region-cache.o sound.o atimer.o \
353 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
f14d1dfd 354 $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
a0528984
EZ
355
356/* Object files used on some machine or other.
e20f1f07 357 These go in the DOC file on all machines in case they are needed. */
04a697fe 358SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
d87a9ab8 359 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
25c72475 360 fontset.o dbusbind.o \
a68fda4a 361 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
c9fc02c7 362 w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
0f91ebe6 363 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
a0528984 364
7acac9f4
GM
365gmallocobj =
366rallocobj =
367vmlimitobj =
a0528984 368#ifndef SYSTEM_MALLOC
2fa0eedf
RS
369#ifndef DOUG_LEA_MALLOC
370gmallocobj = gmalloc.o
371#endif
372
a0528984 373#ifdef REL_ALLOC
2fa0eedf
RS
374rallocobj = ralloc.o
375#endif
5a1bb006
GM
376
377vmlimitobj = vm-limit.o
7eb1ac33 378#endif /* !SYSTEM_MALLOC */
2fa0eedf 379
f724825e 380/* Empty on Cygwin, lastfile.o elsewhere. */
7acac9f4 381PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@
f724825e 382/* lastfile.o vm-limit.o on Cygwin, $vmlimitobj elsewhere. */
7acac9f4 383POST_ALLOC_OBJ=@POST_ALLOC_OBJ@
5a1bb006 384
7eb1ac33 385/* List of object files that make-docfile should not be told about. */
40c17879 386otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(gmallocobj) $(rallocobj) \
7acac9f4 387 $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
a0528984 388
00e2f46c
GM
389/* This is the platform-specific list of Lisp files loaded into the
390 dumped Emacs. It is arranged like this because it is easier to generate
391 it semi-mechanically from loadup.el this way.
a0528984
EZ
392
393 Note that this list should not include lisp files which might not
394 be present, like site-load.el and site-init.el; this makefile
395 expects them all to be either present or buildable.
396
00e2f46c
GM
397 Files which are loaded unconditionally (i.e., on all platforms) should
398 also be in shortlisp. Files which are loaded conditionally (i.e., only
399 on some platforms) should instead be in SOME_MACHINE_LISP. */
a0528984 400
c045cf6e 401/* Place loaddefs.el first, so it gets generated first, since it is on
b4945b95
SM
402 the critical path (relevant in parallel compilations). */
403
a0528984 404lisp= \
b4945b95 405 ${lispsource}loaddefs.el \
a0528984
EZ
406 ${lispsource}abbrev.elc \
407 ${lispsource}buff-menu.elc \
aae5b722 408 ${lispsource}button.elc \
f984e73e 409 ${lispsource}emacs-lisp/byte-run.elc \
731055f5 410 ${lispsource}composite.elc \
bfcf6dbe 411 ${lispsource}cus-face.elc \
d381a855 412 ${lispsource}cus-start.elc \
a0528984 413 ${lispsource}custom.elc \
6e860d15 414 ${lispsource}emacs-lisp/backquote.elc \
a0528984
EZ
415 ${lispsource}emacs-lisp/lisp-mode.elc \
416 ${lispsource}emacs-lisp/lisp.elc \
417 ${lispsource}env.elc \
418 ${lispsource}faces.elc \
419 ${lispsource}files.elc \
420 ${lispsource}format.elc \
421 ${lispsource}facemenu.elc \
11842bd8 422 ${MOUSE_SUPPORT} \
f984e73e 423 ${lispsource}emacs-lisp/float-sup.elc \
af0ad939 424 ${lispsource}frame.elc \
a0528984
EZ
425 ${lispsource}help.elc \
426 ${lispsource}indent.elc \
427 ${lispsource}isearch.elc \
29f05691 428 ${lispsource}rfn-eshadow.elc \
a0528984 429 ${lispsource}loadup.el \
aae5b722 430 ${lispsource}bindings.elc \
f984e73e 431 ${lispsource}emacs-lisp/map-ynp.elc \
a0528984
EZ
432 ${lispsource}menu-bar.elc \
433 ${lispsource}international/mule.elc \
e118d2be 434 ${lispsource}international/mule-conf.elc \
a0528984
EZ
435 ${lispsource}international/mule-cmds.elc \
436 ${lispsource}international/characters.elc \
15e2814c 437 ${lispsource}international/charprop.el \
a0528984 438 ${lispsource}case-table.elc \
e118d2be
AS
439 ${lispsource}language/chinese.elc \
440 ${lispsource}language/cyrillic.elc \
7e694795 441 ${lispsource}language/indian.elc \
cc8d1311 442 ${lispsource}language/sinhala.el \
74fc84af 443 ${lispsource}language/english.el \
a0528984
EZ
444 ${lispsource}language/ethiopic.elc \
445 ${lispsource}language/european.elc \
74fc84af
EZ
446 ${lispsource}language/czech.el \
447 ${lispsource}language/slovak.el \
448 ${lispsource}language/romanian.el \
449 ${lispsource}language/greek.el \
450 ${lispsource}language/hebrew.el \
451 ${lispsource}language/japanese.el \
452 ${lispsource}language/korean.el \
453 ${lispsource}language/lao.el \
c9228487 454 ${lispsource}language/cham.el \
16460a76 455 ${lispsource}language/tai-viet.el \
74fc84af 456 ${lispsource}language/thai.el \
a0528984 457 ${lispsource}language/tibetan.elc \
e118d2be 458 ${lispsource}language/vietnamese.elc \
74fc84af 459 ${lispsource}language/misc-lang.el \
1e9a6186
DL
460 ${lispsource}language/utf-8-lang.el \
461 ${lispsource}language/georgian.el \
0e45710c 462 ${lispsource}language/khmer.el \
7f6519c5 463 ${lispsource}language/burmese.el \
a0528984
EZ
464 ${lispsource}paths.el \
465 ${lispsource}register.elc \
466 ${lispsource}replace.elc \
467 ${lispsource}simple.elc \
32bae13c 468 ${lispsource}minibuffer.elc \
a0528984
EZ
469 ${lispsource}startup.elc \
470 ${lispsource}subr.elc \
471 ${lispsource}term/tty-colors.elc \
bfcf6dbe 472 ${lispsource}font-core.elc \
1f7b1131
DN
473 ${lispsource}emacs-lisp/syntax.elc \
474 ${lispsource}font-lock.elc \
475 ${lispsource}jit-lock.elc \
a0528984
EZ
476 ${lispsource}textmodes/fill.elc \
477 ${lispsource}textmodes/page.elc \
478 ${lispsource}textmodes/paragraphs.elc \
479 ${lispsource}textmodes/text-mode.elc \
f984e73e 480 ${lispsource}emacs-lisp/timer.elc \
6e6851b0 481 ${lispsource}jka-cmpr-hook.elc \
a0528984
EZ
482 ${lispsource}vc-hooks.elc \
483 ${lispsource}ediff-hook.elc \
86914123 484 ${lispsource}epa-hook.elc \
11842bd8 485 ${TOOLTIP_SUPPORT} \
f14d1dfd 486 ${MSDOS_SUPPORT} \
11842bd8 487 ${WINDOW_SUPPORT} \
e6ec4e99 488 ${NS_SUPPORT} \
a0528984
EZ
489 ${lispsource}widget.elc \
490 ${lispsource}window.elc \
491 ${lispsource}version.el
492
00e2f46c
GM
493/* List of relative names for those files from $lisp that are loaded
494 unconditionally (i.e. on all platforms). Files from $lisp that
495 are only loaded on some platforms should instead be placed in
496 SOME_MACHINE_LISP. The only reason this variable exists is to prevent
497 the make-docfile command-line getting too long for some systems. */
a0528984 498shortlisp= \
b4945b95 499 ../lisp/loaddefs.el \
a0528984
EZ
500 ../lisp/abbrev.elc \
501 ../lisp/buff-menu.elc \
aae5b722 502 ../lisp/button.elc \
f984e73e 503 ../lisp/emacs-lisp/byte-run.elc \
731055f5 504 ../lisp/composite.elc \
bfcf6dbe 505 ../lisp/cus-face.elc \
d381a855 506 ../lisp/cus-start.elc \
a0528984 507 ../lisp/custom.elc \
f7d5d963 508 ../lisp/emacs-lisp/backquote.elc \
a0528984
EZ
509 ../lisp/emacs-lisp/lisp-mode.elc \
510 ../lisp/emacs-lisp/lisp.elc \
511 ../lisp/facemenu.elc \
512 ../lisp/faces.elc \
513 ../lisp/files.elc \
f984e73e 514 ../lisp/emacs-lisp/float-sup.elc \
a0528984
EZ
515 ../lisp/format.elc \
516 ../lisp/frame.elc \
517 ../lisp/help.elc \
518 ../lisp/indent.elc \
519 ../lisp/isearch.elc \
29f05691 520 ../lisp/rfn-eshadow.elc \
a0528984 521 ../lisp/loadup.el \
aae5b722 522 ../lisp/bindings.elc \
f984e73e 523 ../lisp/emacs-lisp/map-ynp.elc \
a0528984
EZ
524 ../lisp/env.elc \
525 ../lisp/international/mule.elc \
e118d2be 526 ../lisp/international/mule-conf.elc \
a0528984
EZ
527 ../lisp/international/mule-cmds.elc \
528 ../lisp/international/characters.elc \
529 ../lisp/case-table.elc \
e118d2be
AS
530 ../lisp/language/chinese.elc \
531 ../lisp/language/cyrillic.elc \
7e694795 532 ../lisp/language/indian.elc \
cc8d1311 533 ../lisp/language/sinhala.el \
74fc84af 534 ../lisp/language/english.el \
a0528984
EZ
535 ../lisp/language/ethiopic.elc \
536 ../lisp/language/european.elc \
74fc84af
EZ
537 ../lisp/language/czech.el \
538 ../lisp/language/slovak.el \
539 ../lisp/language/romanian.el \
540 ../lisp/language/greek.el \
541 ../lisp/language/hebrew.el \
542 ../lisp/language/japanese.el \
543 ../lisp/language/korean.el \
544 ../lisp/language/lao.el \
c9228487 545 ../lisp/language/cham.el \
16460a76 546 ../lisp/language/tai-viet.el \
74fc84af 547 ../lisp/language/thai.el \
a0528984 548 ../lisp/language/tibetan.elc \
e118d2be 549 ../lisp/language/vietnamese.elc \
74fc84af 550 ../lisp/language/misc-lang.el \
1e9a6186
DL
551 ../lisp/language/utf-8-lang.el \
552 ../lisp/language/georgian.el \
0e45710c 553 ../lisp/language/khmer.el \
7f6519c5 554 ../lisp/language/burmese.el \
f7d5d963 555 ../lisp/menu-bar.elc \
a0528984
EZ
556 ../lisp/paths.el \
557 ../lisp/register.elc \
558 ../lisp/replace.elc \
559 ../lisp/simple.elc \
32bae13c 560 ../lisp/minibuffer.elc \
a0528984
EZ
561 ../lisp/startup.elc \
562 ../lisp/subr.elc \
563 ../lisp/term/tty-colors.elc \
59809627 564 ../lisp/font-core.elc \
1f7b1131
DN
565 ../lisp/emacs-lisp/syntax.elc \
566 ../lisp/font-lock.elc \
567 ../lisp/jit-lock.elc \
a0528984
EZ
568 ../lisp/textmodes/fill.elc \
569 ../lisp/textmodes/page.elc \
570 ../lisp/textmodes/paragraphs.elc \
571 ../lisp/textmodes/text-mode.elc \
f984e73e 572 ../lisp/emacs-lisp/timer.elc \
a0528984 573 ../lisp/vc-hooks.elc \
6e6851b0 574 ../lisp/jka-cmpr-hook.elc \
a0528984 575 ../lisp/ediff-hook.elc \
86914123 576 ../lisp/epa-hook.elc \
a0528984
EZ
577 ../lisp/widget.elc \
578 ../lisp/window.elc \
579 ../lisp/version.el
580
00e2f46c
GM
581/* Like $shortlisp, but includes only those files from $lisp that are loaded
582 conditionally (i.e., only on some platforms). */
60a3d7ee
DN
583SOME_MACHINE_LISP = ../lisp/mouse.elc \
584 ../lisp/select.elc ../lisp/scroll-bar.elc \
60a3d7ee
DN
585 ../lisp/ls-lisp.elc ../lisp/dos-fns.elc \
586 ../lisp/w32-fns.elc ../lisp/dos-w32.elc \
587 ../lisp/disp-table.elc ../lisp/dos-vars.elc \
588 ../lisp/tooltip.elc ../lisp/image.elc \
589 ../lisp/fringe.elc ../lisp/dnd.elc \
590 ../lisp/mwheel.elc ../lisp/tool-bar.elc \
f904c0f9 591 ../lisp/x-dnd.elc ../lisp/dynamic-setting.elc \
60a3d7ee 592 ../lisp/international/ccl.elc \
60a3d7ee
DN
593 ../lisp/international/fontset.elc \
594 ../lisp/mouse.elc \
24ed93fb 595 ../lisp/term/common-win.elc \
7206e7b7 596 ../lisp/term/x-win.elc \
e227ba05 597 ../lisp/term/pc-win.elc ../lisp/term/internal.elc \
b7d552d6
GM
598 ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \
599 ../lisp/emacs-lisp/easymenu.elc
a0528984
EZ
600
601/* Construct full set of libraries to be linked.
602 Note that SunOS needs -lm to come before -lc; otherwise, you get
603 duplicated symbols. If the standard libraries were compiled
604 with GCC, we might need gnulib again after them. */
edfda783 605
3dee6fdb 606LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
5a903aa9 607 $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
97efb629 608 $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
5a903aa9
GM
609 $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
610 $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR)
a0528984 611
005bd5a2 612all: emacs${EXEEXT} $(OTHER_FILES)
a0528984 613
3df7b338 614/* Does anyone ever pay attention to the load-path-shadows output here? */
0c2b6f8e 615emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
a0528984 616#ifdef CANNOT_DUMP
108c7c97
AS
617 rm -f emacs${EXEEXT}
618 ln temacs${EXEEXT} emacs${EXEEXT}
c8edcc01 619 -EMACSLOADPATH=${lispsource} ./emacs -q -batch -f list-load-path-shadows
a0528984 620#else
83f1cb94 621 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
fc46d219
SM
622 @: This new Emacs is as functional and more efficient then
623 @: bootstrap-emacs, so let us replace it.
624 -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
a0528984 625 -./emacs -q -batch -f list-load-path-shadows
c8edcc01 626#endif /* ! defined (CANNOT_DUMP) */
a0528984
EZ
627
628/* We run make-docfile twice because the command line may get too long
629 on some systems. */
630/* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
631 or may not be included in ${obj}, but they are always included in
632 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
633 for the first time, this prevents any variation between configurations
634 in the contents of the DOC file.
635 Likewise for ${SOME_MACHINE_LISP}. */
d7c664f3
SM
636/* Most of this Makefile refers to Lisp files via ${lispsource}, so
637 we also use ${lisp} rather than ${shortlisp} for the dependency since
638 the Makefile uses string equality to decide when we talk about identical
639 files. Apparently we pass ${shortlisp} rather than ${lisp} to make-docfile
640 only in order to reduce the command line length. --Stef */
641${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
a0528984
EZ
642 -rm -f ${etc}DOC
643 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
644 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
645
108c7c97
AS
646${libsrc}make-docfile${EXEEXT}:
647 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
a0528984 648
878bde49 649buildobj.h: Makefile
005bd5a2 650 echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
878bde49 651
e3cf0cde 652/* FIXME LOCALCPP not defined or mentioned anywhere. */
49ebbd65 653temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
122e9f8f 654#ifdef NS_IMPL_GNUSTEP
a2d3af1c 655 $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
5a903aa9 656 -L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \
a2d3af1c 657 -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
005bd5a2 658 ${obj} ${otherobj} ${LIBES}
edfda783 659#else
dfe15ea3 660 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
49ebbd65 661 -o temacs ${START_FILES} ${obj} ${otherobj} \
005bd5a2 662 ${LIBES}
edfda783 663#endif
a0528984 664
a53cfbe5 665prefix-args${EXEEXT}: prefix-args.o $(config_h)
f4c21026 666 $(CC) $(LDFLAGS) prefix-args.o -o prefix-args
a0528984 667
3df7b338
GM
668/* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */
669#if defined (HAVE_X11) && ! defined (USE_GTK)
e20f1f07
GM
670/* We use stamp-xmenu with these two deps to both ensure that lwlib
671 gets remade based on its dependencies in its own makefile,
a0528984 672 and remake temacs if lwlib gets changed by this. */
c60ee5e7 673stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
a0528984
EZ
674 touch stamp-oldxmenu
675/* Supply an ordering for parallel make. */
676../src/$(OLDXMENU): ${OLDXMENU}
677
deeaffe1
DN
678#ifdef USE_X_TOOLKIT
679$(OLDXMENU): really-lwlib
680
a0528984 681really-lwlib:
6b61353c 682 cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
ed6281b0 683 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
a0528984
EZ
684 @true /* make -t should not create really-lwlib. */
685.PHONY: really-lwlib
686#else /* not USE_X_TOOLKIT */
687$(OLDXMENU): really-oldXMenu
688
a0528984 689really-oldXMenu:
9c28b587 690 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
ed6281b0 691 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
a0528984
EZ
692 @true /* make -t should not create really-oldXMenu. */
693.PHONY: really-oldXMenu
694#endif /* not USE_X_TOOLKIT */
3df7b338 695#else /* !HAVE_X11 || USE_GTK */
a0528984 696
5aa17bb2 697/* We don''t really need this, but satisfy the dependency. */
a0528984
EZ
698stamp-oldxmenu:
699 touch stamp-oldxmenu
3df7b338 700#endif /* HAVE_X11 && !USE_GTK */
a0528984
EZ
701
702../config.status:: epaths.in
703 @echo "The file epaths.h needs to be set up from epaths.in."
704 @echo "Please run the `configure' script again."
705 exit 1
706
707../config.status:: config.in
708 @echo "The file config.h needs to be set up from config.in."
709 @echo "Please run the `configure' script again."
710 exit 1
711
a53cfbe5 712ecrt0.o: ecrt0.c $(config_h)
cfc86c7a
JD
713#ifdef AUTO_DEPEND
714 @-test -d deps || mkdir deps
715#endif
19d4c244 716 $(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c
a53cfbe5
JD
717doc.o: buildobj.h
718
719#ifndef AUTO_DEPEND
a0528984 720
a48bc865
GM
721/* FIXME some of these dependencies are platform-specific.
722Eg callproc.c only depends on w32.h for WINDOWSNT builds.
723One way to fix this would be to replace w32.h (etc) by $(W32_H),
724a variable set by configure. Does not seem worth the trouble.
11842bd8
GM
725Since the w32 build does not even use this file, you might ask
726why these dependencies are here at all...
a48bc865
GM
727
728nsgui.h: In fact, every .o file depends directly or indirectly on
729dispextern.h and hence nsgui.h under NS. But the ones that actually
730use stuff there are more limited. */
3f670e9a
EZ
731atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \
732 $(config_h)
ad55bd46 733bidi.o: bidi.c buffer.h character.h dispextern.h lisp.h $(config_h)
a0528984 734buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
3f670e9a
EZ
735 $(INTERVALS_H) blockinput.h atimer.h systime.h character.h \
736 indent.h keyboard.h coding.h keymap.h frame.h lisp.h $(config_h)
21065c92 737callint.o: callint.c window.h commands.h buffer.h keymap.h \
3f670e9a 738 keyboard.h dispextern.h systime.h coding.h composite.h lisp.h $(config_h)
0a5d24ae 739callproc.o: callproc.c epaths.h buffer.h commands.h lisp.h $(config_h) \
8f924df7 740 process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \
3f670e9a
EZ
741 composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h \
742 buffer.h
85969c22 743casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \
3f670e9a
EZ
744 composite.h keymap.h lisp.h $(config_h)
745casetab.o: casetab.c buffer.h character.h lisp.h $(config_h)
a63aa692 746category.o: category.c category.h buffer.h charset.h keymap.h \
0a5d24ae 747 character.h lisp.h $(config_h)
3f670e9a 748ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h $(config_h)
85969c22 749character.o: character.c character.h buffer.h charset.h composite.h disptab.h \
0a5d24ae 750 lisp.h $(config_h)
85969c22 751charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \
0a5d24ae 752 disptab.h lisp.h $(config_h)
3f670e9a
EZ
753chartab.o: charset.h character.h ccl.h lisp.h $(config_h)
754coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \
0a5d24ae 755 window.h dispextern.h frame.h termhooks.h lisp.h $(config_h)
3f670e9a 756cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h lisp.h $(config_h)
0a5d24ae 757cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h $(config_h) \
3f670e9a
EZ
758 msdos.h dispextern.h keyboard.h keymap.h systime.h coding.h frame.h \
759 composite.h
a0528984 760pre-crt0.o: pre-crt0.c
0a5d24ae
DN
761dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h)
762dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \
3f670e9a
EZ
763 coding.h regex.h systime.h blockinput.h atimer.h composite.h
764dispnew.o: dispnew.c systime.h commands.h process.h frame.h coding.h \
765 window.h buffer.h termchar.h termopts.h termhooks.h cm.h \
517d086b 766 disptab.h indent.h $(INTERVALS_H) nsgui.h \
3f670e9a 767 xterm.h blockinput.h atimer.h character.h msdos.h keyboard.h \
0a5d24ae 768 syssignal.h lisp.h $(config_h)
3f670e9a
EZ
769doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h \
770 character.h systime.h coding.h composite.h
0a5d24ae 771doprnt.o: doprnt.c character.h lisp.h $(config_h)
21065c92 772dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
ffb72b67 773 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
0a5d24ae 774 lisp.h $(config_h)
bd7bbf29 775editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
3f670e9a 776 coding.h frame.h blockinput.h atimer.h lisp.h $(config_h)
a0528984 777emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
0a5d24ae 778 termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \
3f670e9a 779 window.h dispextern.h keyboard.h keymap.h frame.h coding.h
bd7bbf29 780fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
3f670e9a
EZ
781 coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h commands.h
782filelock.o: filelock.c buffer.h character.h coding.h systime.h composite.h \
783 lisp.h $(config_h)
784filemode.o: filemode.c $(config_h)
a0528984 785frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
08b3caa9 786 blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \
517d086b
GM
787 msdos.h dosfns.h dispextern.h w32term.h nsgui.h termchar.h coding.h \
788 composite.h lisp.h $(config_h) termhooks.h ccl.h
789fringe.o: fringe.c dispextern.h nsgui.h frame.h window.h buffer.h termhooks.h \
3f670e9a 790 blockinput.h atimer.h systime.h lisp.h $(config_h)
08b1e593 791font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \
517d086b 792 font.h lisp.h $(config_h) buffer.h composite.h fontset.h xterm.h nsgui.h
6b7f0860 793ftfont.o: dispextern.h frame.h character.h charset.h composite.h font.h \
3f670e9a
EZ
794 lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h fontset.h \
795 ccl.h ftfont.h
796fontset.o: fontset.c fontset.h ccl.h buffer.h character.h \
797 charset.h frame.h keyboard.h termhooks.h font.h lisp.h $(config_h) \
517d086b
GM
798 blockinput.h atimer.h systime.h coding.h $(INTERVALS_H) nsgui.h \
799 window.h xterm.h
a0528984 800getloadavg.o: getloadavg.c $(config_h)
0a5d24ae 801gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h lisp.h $(config_h) \
b9fd67bd 802 blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \
3f670e9a 803 charset.h coding.h syssignal.h dispextern.h composite.h
6b61353c 804image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \
3f670e9a
EZ
805 systime.h xterm.h w32term.h w32gui.h font.h epaths.h character.h coding.h \
806 nsterm.h nsgui.h lisp.h $(config_h) composite.h termhooks.h ccl.h
0a5d24ae 807indent.o: indent.c frame.h window.h indent.h buffer.h lisp.h $(config_h) termchar.h \
3f670e9a
EZ
808 termopts.h disptab.h region-cache.h character.h category.h \
809 keyboard.h systime.h coding.h $(INTERVALS_H)
bd7bbf29 810insdel.o: insdel.c window.h buffer.h $(INTERVALS_H) blockinput.h character.h \
0a5d24ae 811 dispextern.h atimer.h systime.h region-cache.h lisp.h $(config_h)
85969c22 812keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \
a0528984 813 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
3f670e9a 814 systime.h syntax.h $(INTERVALS_H) blockinput.h atimer.h composite.h \
517d086b 815 xterm.h puresize.h msdos.h keymap.h w32term.h nsterm.h nsgui.h coding.h \
0a5d24ae 816 lisp.h $(config_h)
a0528984 817keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
bd7bbf29 818 atimer.h systime.h puresize.h character.h charset.h $(INTERVALS_H) keymap.h window.h \
3f670e9a 819 coding.h frame.h lisp.h $(config_h)
0a5d24ae 820lastfile.o: lastfile.c $(config_h)
a0528984 821macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
3f670e9a 822 dispextern.h lisp.h $(config_h) systime.h coding.h composite.h
a0528984 823gmalloc.o: gmalloc.c $(config_h)
0a5d24ae
DN
824ralloc.o: ralloc.c lisp.h $(config_h)
825vm-limit.o: vm-limit.c mem-limits.h lisp.h $(config_h)
826marker.o: marker.c buffer.h character.h lisp.h $(config_h)
39c9a034 827md5.o: md5.c md5.h $(config_h)
3f670e9a 828minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \
bd7bbf29 829 buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \
3f670e9a 830 termhooks.h lisp.h $(config_h) coding.h
a0528984 831mktime.o: mktime.c $(config_h)
a0528984 832msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
85969c22 833 termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \
0a5d24ae 834 keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h lisp.h $(config_h)
55737942 835nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \
0a7df391 836 dispextern.h fontset.h $(INTERVALS_H) keyboard.h blockinput.h \
0a5d24ae
DN
837 atimer.h systime.h epaths.h termhooks.h coding.h systime.h lisp.h $(config_h)
838nsfont.o: nsterm.h dispextern.h frame.h lisp.h lisp.h $(config_h)
839nsimage.o: nsimage.m nsterm.h lisp.h $(config_h)
55737942
AR
840nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \
841 nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \
0a5d24ae 842 nsterm.h lisp.h $(config_h)
55737942
AR
843nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \
844 nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \
845 termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \
0a5d24ae
DN
846 $(INTERVALS_H) process.h coding.h lisp.h $(config_h)
847nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h lisp.h $(config_h)
a0528984
EZ
848process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
849 commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
850 blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
3f670e9a
EZ
851 keyboard.h lisp.h $(config_h) character.h xgselect.h sysselect.h
852regex.o: regex.c syntax.h buffer.h lisp.h $(config_h) regex.h category.h character.h
0a5d24ae 853region-cache.o: region-cache.c buffer.h region-cache.h lisp.h $(config_h)
a0528984 854scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \
3f670e9a 855 termhooks.h lisp.h $(config_h) systime.h coding.h composite.h window.h
a0528984 856search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
6660e3a8 857 blockinput.h atimer.h systime.h category.h character.h charset.h \
3f670e9a 858 $(INTERVALS_H) \
0a5d24ae 859 lisp.h $(config_h)
3f670e9a 860sound.o: sound.c dispextern.h syssignal.h lisp.h $(config_h) atimer.h systime.h
a0528984 861strftime.o: strftime.c $(config_h)
85969c22 862syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \
3f670e9a 863 keymap.h regex.h $(INTERVALS_H) lisp.h $(config_h)
4524691f 864sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \
3f670e9a
EZ
865 process.h dispextern.h termhooks.h termchar.h termopts.h coding.h \
866 frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h lisp.h $(config_h) \
867 composite.h
0a5d24ae 868term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) cm.h frame.h \
3f670e9a 869 disptab.h keyboard.h character.h charset.h coding.h ccl.h xterm.h \
f78c2c97 870 msdos.h window.h keymap.h blockinput.h atimer.h systime.h systty.h \
3f670e9a 871 syssignal.h $(INTERVALS_H) buffer.h
0a5d24ae 872termcap.o: termcap.c lisp.h $(config_h)
ed8dad6b 873terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \
3f670e9a 874 keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h
0a5d24ae
DN
875terminfo.o: terminfo.c lisp.h $(config_h)
876tparam.o: tparam.c lisp.h $(config_h)
3f670e9a 877undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h)
0a5d24ae 878unexaix.o: unexaix.c lisp.h $(config_h)
f2a77c3a 879unexalpha.o: unexalpha.c $(config_h)
0a5d24ae
DN
880unexcw.o: unexcw.c lisp.h $(config_h)
881unexec.o: unexec.c lisp.h $(config_h)
f2a77c3a
DN
882unexelf.o: unexelf.c $(config_h)
883unexhp9k800.o: unexhp9k800.c $(config_h)
884unexmacosx.o: unexmacosx.c $(config_h)
0a5d24ae 885unexsol.o: unexsol.c lisp.h $(config_h)
f2a77c3a 886unexw32.o: unexw32.c $(config_h)
a0528984 887w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
0a5d24ae 888 msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h)
a0528984 889widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
0a5d24ae 890 $(srcdir)/../lwlib/lwlib.h lisp.h $(config_h)
a0528984 891window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
3f670e9a 892 disptab.h keyboard.h msdos.h coding.h termhooks.h \
bd7bbf29 893 keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \
517d086b 894 xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h)
a63aa692 895xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \
49628785 896 coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \
517d086b
GM
897 charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \
898 xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \
08b3caa9 899 blockinput.h atimer.h systime.h keymap.h font.h
a63aa692
MB
900xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
901 window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \
3f670e9a 902 systime.h keyboard.h fontset.h w32term.h nsterm.h coding.h ccl.h \
517d086b 903 $(INTERVALS_H) nsgui.h termchar.h termhooks.h font.h lisp.h $(config_h)
a0528984
EZ
904xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \
905 $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \
0a5d24ae 906 character.h charset.h coding.h gtkutil.h lisp.h $(config_h) termhooks.h \
3f670e9a 907 fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h
7de94409 908xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
3f670e9a 909 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h
7de94409 910xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
3f670e9a 911 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h ftfont.h
7de94409 912ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
3f670e9a 913 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h
71015b45 914menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \
e7c9048f 915 dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \
517d086b 916 lisp.h $(config_h) systime.h coding.h composite.h window.h atimer.h nsgui.h
c2d0b18a 917xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
85969c22 918 charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \
3f670e9a
EZ
919 systime.h gtkutil.h msdos.h coding.h menu.h lisp.h $(config_h) composite.h \
920 keymap.h sysselect.h
c2d0b18a 921xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
85969c22 922 dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
73f838ad 923 keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \
3f670e9a
EZ
924 coding.h process.h gtkutil.h font.h fontset.h lisp.h $(config_h) \
925 xsettings.h intervals.h keymap.h xgselect.h sysselect.h
4524691f 926xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
3f670e9a
EZ
927 buffer.h atimer.h systime.h termhooks.h lisp.h $(config_h) keyboard.h \
928 coding.h composite.h
929xgselect.o: xgselect.h systime.h sysselect.h lisp.h $(config_h)
0a5d24ae
DN
930xrdb.o: xrdb.c lisp.h $(config_h) epaths.h
931xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h xterm.h \
3f670e9a
EZ
932 lisp.h termopts.h frame.h dispextern.h
933xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \
934 dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h atimer.h \
935 termopts.h
a0528984 936
e20f1f07 937/* The files of Lisp proper. */
3f670e9a
EZ
938alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \
939 keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \
49105cd0 940 $(INTERVALS_H) termhooks.h
a63aa692 941bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \
0a5d24ae 942 frame.h xterm.h lisp.h $(config_h)
a63aa692 943data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \
3f670e9a
EZ
944 termhooks.h systime.h coding.h composite.h dispextern.h font.h ccl.h \
945 lisp.h $(config_h)
a0528984 946eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
3f670e9a 947 dispextern.h lisp.h $(config_h) coding.h composite.h xterm.h
0a5d24ae
DN
948floatfns.o: floatfns.c syssignal.h lisp.h $(config_h)
949fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h keyboard.h \
3f670e9a
EZ
950 keymap.h window.h dispextern.h $(INTERVALS_H) coding.h md5.h \
951 blockinput.h atimer.h systime.h xterm.h
85969c22 952print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \
3f670e9a
EZ
953 lisp.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \
954 blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h
85969c22 955lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \
3f670e9a
EZ
956 charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \
957 systime.h frame.h blockinput.h atimer.h
a0528984 958
e20f1f07 959/* Text properties support. */
3f670e9a 960composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \
0a5d24ae 961 frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h)
bd7bbf29 962intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \
3f670e9a
EZ
963 keymap.h lisp.h $(config_h) systime.h coding.h
964textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \
0a5d24ae 965 lisp.h $(config_h)
a0528984 966
a53cfbe5
JD
967#endif /* ! AUTO_DEPEND */
968
a0528984 969/* System-specific programs to be made.
e20f1f07 970 OTHER_FILES select which of these should be compiled. */
a0528984 971
edfda783 972#ifdef HAVE_NS
06b62770
AR
973${ns_appdir}: ${ns_appsrc}
974 rm -fr ${ns_appdir}
975 mkdir -p ${ns_appdir}
2b5f541b 976 ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - )
edfda783 977
06b62770
AR
978${ns_appbindir}Emacs: emacs${EXEEXT}
979 mkdir -p ${ns_appbindir}
980 cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
edfda783 981
06b62770 982ns-app: ${ns_appdir} ${ns_appbindir}Emacs
edfda783 983#endif /* HAVE_NS */
e0f712ba 984
a0528984 985mostlyclean:
108c7c97 986 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
a0528984 987 rm -f ../etc/DOC
b4945b95 988 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
878bde49 989 rm -f buildobj.h
a0528984 990clean: mostlyclean
03bd3c1f 991 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
a53cfbe5 992 -rm -rf deps
5c976973
AR
993#ifdef HAVE_NS
994 rm -fr ${ns_appdir}
5c976973 995#endif
49f6eb95
SM
996/* bootstrap-clean is used to clean up just before a bootstrap.
997 It should remove all files generated during a compilation/bootstrap,
998 but not things like config.status or TAGS. */
fd13748d
AS
999bootstrap-clean: clean
1000 rm -f epaths.h config.h Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
1001 if test -f ./.gdbinit; then \
1002 mv ./.gdbinit ./.gdbinit.save; \
1003 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
1004 else mv ./.gdbinit.save ./.gdbinit; fi; \
1005 fi
1006/**/# This is used in making a distribution.
1007/**/# Do not use it on development directories!
1008distclean: bootstrap-clean
1009 rm -f Makefile
a0528984
EZ
1010maintainer-clean: distclean
1011 @echo "This command is intended for maintainers to use;"
1012 @echo "it deletes files that may require special tools to rebuild."
1013 rm -f TAGS
1014versionclean:
03bd3c1f 1015 -rm -f emacs${EXEEXT} emacs-*.*.*${EXEEXT} ../etc/DOC*
a0528984
EZ
1016extraclean: distclean
1017 -rm -f *~ \#* m/?*~ s/?*~
1018
a0528984
EZ
1019/* Arrange to make a tags table TAGS-LISP for ../lisp,
1020 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1021
50da4e56
SM
1022ctagsfiles1 = [xyzXYZ]*.[hcm]
1023ctagsfiles2 = [a-wA-W]*.[hcm]
a0528984
EZ
1024
1025TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1026 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1027 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1028 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1029frc:
1030TAGS-LISP: frc
99b7e543 1031 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
a0528984
EZ
1032
1033$(lwlibdir)TAGS:
1034 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
1035
1036tags: TAGS TAGS-LISP $(lwlibdir)TAGS
1037.PHONY: tags
1038
1039
1040/* Bootstrapping. */
fc46d219
SM
1041/* Bootstrapping right is difficult because of the circular dependencies.
1042 Furthermore, we have to deal with the fact that many compilation targets
1043 such as loaddefs.el or *.elc can typically be produced by any old
1044 Emacs executable, so we would like to avoid rebuilding them whenever
1045 we build a new Emacs executable.
1046 To solve the circularity, we use 2 different Emacs executables,
1047 "emacs" is the main target and "bootstrap-emacs" is the one used
1048 to build the *.elc and loaddefs.el files.
b4945b95
SM
1049 To solve the freshness issue, we used to use a third file "witness-emacs"
1050 which was used to witness the fact that there is a bootstrap-emacs
1051 executable, and then have dependencies on witness-emacs rather than
1052 bootstrap-emacs, but that lead to problems in parallel builds (because
1053 witness-emacs needed to be free from dependencies (to avoid rebuilding
1054 it), so it was compiled in parallel, leading typically to having 2
1055 processes dumping bootstrap-emacs at the same time).
1056 So instead, we replace the witness-emacs dependencies by conditional
1057 bootstrap-dependencies (via ${BOOTSTRAPEMACS}). Of course, since we do
1058 not want to rely on GNU Make features, we have to rely on an external
1059 script to do the conditional part of the dependency
1060 (i.e. see the ${SUBDIR} rule ../Makefile.in). */
fc46d219 1061
36565815
GM
1062.SUFFIXES: .elc .el
1063
b4945b95
SM
1064/* These suffix rules do not allow additional dependencies, sadly, so
1065 instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
1066 separately below.
1067 With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)" */
fc46d219 1068.el.elc:
82c3d67a
AS
1069 @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
1070 THEFILE=$< EMACS=${bootstrap_exe}
fc46d219 1071
b4945b95
SM
1072/* Since the .el.elc rule cannot specify an extra dependency, we do it here. */
1073${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
fc46d219 1074
56f6f760 1075${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
82c3d67a 1076 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe}
49f6eb95 1077
c60ee5e7 1078/* Dump an Emacs executable named bootstrap-emacs containing the
a0528984
EZ
1079 files from loadup.el in source form. */
1080
fc46d219 1081bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
b4945b95 1082 cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
a0528984 1083#ifdef CANNOT_DUMP
11d8ec4a 1084 ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT}
a0528984 1085#else
83f1cb94 1086 $(RUN_TEMACS) --batch --load loadup bootstrap
108c7c97 1087 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
a0528984 1088#endif /* ! defined (CANNOT_DUMP) */
768efd84 1089 @: Compile some files earlier to speed up further compilation.
82c3d67a 1090 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
a53cfbe5
JD
1091
1092#ifdef AUTO_DEPEND
49ebbd65 1093ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o
a53cfbe5
JD
1094-include $(ALLOBJS:%.o=deps/%.d)
1095#endif