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