(find-emacs-lisp-shadows): Don't mention `subdirs.el'.
[bpt/emacs.git] / src / Makefile.in
CommitLineData
b06f07c0 1# Makefile for GNU Emacs.
f8c25f1b 2# Copyright (C) 1985, 87, 88, 93, 94, 95 Free Software Foundation, Inc.
ec558adc 3
b06f07c0 4# This file is part of GNU Emacs.
ae3bed12 5
b06f07c0
RS
6# GNU Emacs is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
ae3bed12 10
b06f07c0
RS
11# GNU Emacs is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
ae3bed12 15
b06f07c0
RS
16# You should have received a copy of the GNU General Public License
17# along with GNU Emacs; see the file COPYING. If not, write to
3b7ad313
EN
18# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19# Boston, MA 02111-1307, USA.
ae3bed12 20
b06f07c0 21# Here are the things that we expect ../configure to edit.
ae3bed12
BF
22srcdir=@srcdir@
23VPATH=@srcdir@
24CC=@CC@
25CPP=@CPP@
26CFLAGS=@CFLAGS@
d5600d49
RS
27CPPFLAGS=@CPPFLAGS@
28LDFLAGS=@LDFLAGS@
ae3bed12 29LN_S=@LN_S@
b06f07c0
RS
30# Substitute an assignment for the MAKE variable, because
31# BSD doesn't have it as a default.
3bdaa06a 32@SET_MAKE@
ae3bed12 33
b06f07c0 34# On Xenix and the IBM RS6000, double-dot gets screwed up.
ae3bed12 35dot = .
449d572b 36dotdot = ${dot}${dot}
02ae1501 37lispsource = ${srcdir}/$(dot)$(dot)/lisp/
ae3bed12
BF
38libsrc = $(dot)$(dot)/lib-src/
39etc = $(dot)$(dot)/etc/
40shortnamesdir = $(dot)$(dot)/shortnames/
41cppdir = $(dot)$(dot)/cpp/
42oldXMenudir = $(dot)$(dot)/oldXMenu/
3e285e4d 43lwlibdir = $(dot)$(dot)/lwlib/
2a3c6d11 44
b06f07c0 45# Configuration files for .o files to depend on.
2a3c6d11
RS
46M_FILE = ${srcdir}/@machfile@
47S_FILE = ${srcdir}/@opsysfile@
48config_h = config.h $(M_FILE) $(S_FILE)
ae3bed12 49
db188a61 50# ========================== start of cpp stuff =======================
b06f07c0
RS
51/* From here on, comments must be done in C syntax. */
52
02e8e167
RS
53C_SWITCH_SYSTEM=
54
ae3bed12
BF
55/* just to be sure the sh is used */
56SHELL=/bin/sh
57
449d572b 58#define THIS_IS_MAKEFILE
ae3bed12 59#define NO_SHORTNAMES
ae3bed12
BF
60#define NOT_C_CODE
61#include "config.h"
62
4622fe48
RS
63/* We won't really call alloca;
64 don't let the file name alloca.c get messed up. */
65#ifdef alloca
66#undef alloca
67#endif
68
57a6d773
PE
69/* Don't let the file name mktime.c get messed up. */
70#ifdef mktime
71#undef mktime
72#endif
73
ae3bed12
BF
74/* Use HAVE_X11 as an alias for X11 in this file
75 to avoid problems with X11 as a subdirectory name
76 in -I and other such options which pass through this file. */
77
78#ifdef X11
79#define HAVE_X11
80#undef X11
81#endif
82
83/* On some machines #define register is done in config;
84 don't let it interfere with this file. */
85#undef register
86
87/* On some systems we may not be able to use the system make command. */
88#ifdef MAKE_COMMAND
89MAKE = MAKE_COMMAND
ae3bed12
BF
90#endif
91
92#ifdef C_COMPILER
93CC = C_COMPILER
94#endif
95
5520f84f
RS
96/* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
97 Linux is an exception because it uses a funny variant of GNU libc. */
98#ifdef __GNU_LIBRARY__
99#ifndef LINUX
100#define ORDINARY_LINK
101#endif
102#endif
103
ae3bed12
BF
104/* Some machines don't find the standard C libraries in the usual place. */
105#ifndef ORDINARY_LINK
106#ifndef LIB_STANDARD
107#define LIB_STANDARD -lc
108#endif
109#else
110#ifndef LIB_STANDARD
111#define LIB_STANDARD
112#endif
113#endif
114
115/* Unless inhibited or changed, use -lg to link for debugging. */
116#ifndef LIBS_DEBUG
117#define LIBS_DEBUG -lg
118#endif
119
f11c1c14 120/* Some s/SYSTEM.h files define this to request special libraries. */
ae3bed12
BF
121#ifndef LIBS_SYSTEM
122#define LIBS_SYSTEM
123#endif
124
f11c1c14 125/* Some m/MACHINE.h files define this to request special libraries. */
ae3bed12
BF
126#ifndef LIBS_MACHINE
127#define LIBS_MACHINE
128#endif
129
130#ifndef LIB_MATH
131# ifdef LISP_FLOAT_TYPE
132# define LIB_MATH -lm
133# else /* ! defined (LISP_FLOAT_TYPE) */
134# define LIB_MATH
135# endif /* ! defined (LISP_FLOAT_TYPE) */
136#endif /* LIB_MATH */
137
f11c1c14 138/* Some s/SYSTEM.h files define this to request special switches in ld. */
ae3bed12 139#ifndef LD_SWITCH_SYSTEM
488b7cb3 140#if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)))
ae3bed12 141#define LD_SWITCH_SYSTEM -X
488b7cb3 142#else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
ae3bed12 143#define LD_SWITCH_SYSTEM
488b7cb3 144#endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
ae3bed12
BF
145#endif /* LD_SWITCH_SYSTEM */
146
0273f2e5
RS
147/* This holds special options for linking temacs
148 that should be used for linking anything else. */
149#ifndef LD_SWITCH_SYSTEM_TEMACS
150#define LD_SWITCH_SYSTEM_TEMACS
151#endif
152
f11c1c14 153/* Some m/MACHINE.h files define this to request special switches in ld. */
ae3bed12
BF
154#ifndef LD_SWITCH_MACHINE
155#define LD_SWITCH_MACHINE
156#endif
157
f11c1c14 158/* Some m/MACHINE.h files define this to request special switches in cc. */
ae3bed12
BF
159#ifndef C_SWITCH_MACHINE
160#define C_SWITCH_MACHINE
161#endif
162
f11c1c14 163/* Some s/SYSTEM.h files define this to request special switches in cc. */
ae3bed12
BF
164#ifndef C_SWITCH_SYSTEM
165#define C_SWITCH_SYSTEM
166#endif
167
168/* These macros are for switches specifically related to X Windows. */
169#ifndef C_SWITCH_X_MACHINE
170#define C_SWITCH_X_MACHINE
171#endif
172
173#ifndef C_SWITCH_X_SYSTEM
174#define C_SWITCH_X_SYSTEM
175#endif
176
177#ifndef C_SWITCH_X_SITE
178#define C_SWITCH_X_SITE
179#endif
180
181#ifndef LD_SWITCH_X_SITE
182#define LD_SWITCH_X_SITE
183#endif
184
d2e75974
RS
185#ifndef LD_SWITCH_X_DEFAULT
186#define LD_SWITCH_X_DEFAULT
187#endif
188
ae3bed12
BF
189/* These can be passed in from config.h to define special load and
190 compile switches needed by individual sites */
191#ifndef LD_SWITCH_SITE
192#define LD_SWITCH_SITE
193#endif
194
195#ifndef C_SWITCH_SITE
196#define C_SWITCH_SITE
197#endif
198
199#ifndef ORDINARY_LINK
9e012fc3 200
ae3bed12 201#ifndef CRT0_COMPILE
8f641052 202#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
ae3bed12
BF
203#endif
204
205#ifndef START_FILES
206#ifdef NO_REMAP
207#ifdef COFF_ENCAPSULATE
208#define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
209#else /* ! defined (COFF_ENCAPSULATE) */
210#define START_FILES pre-crt0.o /lib/crt0.o
211#endif /* ! defined (COFF_ENCAPSULATE) */
212#else /* ! defined (NO_REMAP) */
1c738407 213#define START_FILES ecrt0.o
ae3bed12
BF
214#endif /* ! defined (NO_REMAP) */
215#endif /* START_FILES */
216STARTFILES = START_FILES
217
218#else /* ORDINARY_LINK */
219
220/* config.h might want to force START_FILES anyway */
221#ifdef START_FILES
222STARTFILES = START_FILES
223#endif /* START_FILES */
224
225#endif /* not ORDINARY_LINK */
226
227
228/* cc switches needed to make `asm' keyword work.
229 Nothing special needed on most machines. */
230#ifndef C_SWITCH_ASM
231#define C_SWITCH_ASM
232#endif
233
234/* Figure out whether the system cpp can handle long names.
235 Do it by testing it right now.
236 If it loses, arrange to use the GNU cpp. */
237
238#define LONGNAMEBBBFOOX
239#ifdef LONGNAMEBBBARFOOX
240/* Installed cpp fails to distinguish those names! */
241/* Arrange to compile the GNU cpp later on */
242#define NEED_CPP
243/* Cause cc to invoke the cpp that comes with Emacs,
244 which will be in a file named localcpp. */
245MYCPPFLAG= -Blocal
246/* LOCALCPP is the local one or nothing.
8e6208c5 247 CPP is the local one or the standard one. */
ae3bed12
BF
248LOCALCPP= localcpp
249#endif /* ! defined (LONGNAMEBBBARFOOX) */
250
251#ifdef SHORTNAMES
252SHORT= shortnames
253#endif
254
52ee0561 255#ifdef USE_X_TOOLKIT
7ee4884a 256#define USE_@X_TOOLKIT_TYPE@
52ee0561
KH
257TOOLKIT_DEFINES = -DUSE_@X_TOOLKIT_TYPE@
258#else
259TOOLKIT_DEFINES =
260#endif
261
ae3bed12
BF
262/* DO NOT use -R. There is a special hack described in lastfile.c
263 which is used instead. Some initialized data areas are modified
264 at initial startup, then labeled as part of the text area when
265 Emacs is dumped for the first time, and never changed again. */
266
ae3bed12
BF
267/* -Demacs is needed to make some files produce the correct version
268 for use in Emacs.
269
270 -DHAVE_CONFIG_H is needed for some other files to take advantage of
271 the information in `config.h'. */
644ab589 272
ae3bed12
BF
273/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
274 since it may have -I options that should override those two. */
52ee0561 275ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM ${CFLAGS}
ae3bed12
BF
276.c.o:
277 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
278
279#ifndef LIBX10_MACHINE
280#define LIBX10_MACHINE
281#endif
282
283#ifndef LIBX11_MACHINE
284#define LIBX11_MACHINE
285#endif
286
287#ifndef LIBX10_SYSTEM
288#define LIBX10_SYSTEM
289#endif
290
291#ifndef LIBX11_SYSTEM
292#define LIBX11_SYSTEM
293#endif
294
295#ifndef LIB_X11_LIB
296#define LIB_X11_LIB -lX11
297#endif
298
299#ifdef HAVE_X_WINDOWS
46c0ddcf 300#ifdef HAVE_MENUS
ae3bed12
BF
301
302/* Include xmenu.o in the list of X object files. */
5bfd038e 303XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o
ae3bed12
BF
304
305/* The X Menu stuff is present in the X10 distribution, but missing
306 from X11. If we have X10, just use the installed library;
307 otherwise, use our own copy. */
308#ifdef HAVE_X11
3e285e4d 309#ifdef USE_X_TOOLKIT
f489d526 310OLDXMENU=${lwlibdir}liblw.a
3e285e4d
RS
311LIBXMENU= $(OLDXMENU)
312#else /* not USE_X_TOOLKIT */
f489d526 313OLDXMENU= ${oldXMenudir}libXMenu11.a
ae3bed12 314LIBXMENU= $(OLDXMENU)
3e285e4d
RS
315#endif /* not USE_X_TOOLKIT */
316#else /* not HAVE_X11 */
ae3bed12 317LIBXMENU= -lXMenu
3e285e4d 318#endif /* not HAVE_X11 */
ae3bed12 319
46c0ddcf 320#else /* not HAVE_MENUS */
ae3bed12
BF
321
322/* Otherwise, omit xmenu.o from the list of X object files, and
323 don't worry about the menu library at all. */
5bfd038e 324XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o
ae3bed12 325LIBXMENU=
46c0ddcf 326#endif /* not HAVE_MENUS */
3e285e4d
RS
327
328#ifdef USE_X_TOOLKIT
b1fc21c5
RS
329#define @X_TOOLKIT_TYPE@
330#if defined (LUCID) || defined (ATHENA)
331LIBW= -lXaw
332#endif
333#ifdef MOTIF
334#ifdef LIB_MOTIF
335LIBW= LIB_MOTIF
336#else
337LIBW= -lXm
338#endif
339#endif
340#ifdef OPEN_LOOK
341LIBW= -lXol
342#endif
343
b036baef 344#ifdef HAVE_X11XTR6
a0efd887
RS
345#ifdef NEED_LIBW
346LIBXTR6 = -lSM -lICE -lw
347#else
8b550e92
RS
348LIBXTR6 = -lSM -lICE
349#endif
a0efd887 350#endif
8b550e92 351
eb6a9dca
RS
352#ifndef LIBXMU
353#define LIBXMU -lXmu
354#endif
355
449d572b
KH
356#ifdef LIBXT_STATIC
357/* We assume the config files have defined STATIC_OPTION
358 since that might depend on the operating system.
359 (Don't forget you need different definitions with and without __GNUC__.) */
8f641052 360LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION
449d572b 361#else /* not LIBXT_STATIC */
eb6a9dca 362LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
449d572b
KH
363#endif /* not LIBXT_STATIC */
364
365#else /* not USE_X_TOOLKIT */
3e285e4d 366LIBXT=
449d572b 367#endif /* not USE_X_TOOLKIT */
ae3bed12
BF
368
369#ifdef HAVE_X11
d2e75974
RS
370/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
371 options for where to find X libraries, but before those libraries. */
fe9f955a
RS
372X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
373LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3e285e4d 374#else /* not HAVE_X11 */
ae3bed12 375LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
3e285e4d
RS
376#endif /* not HAVE_X11 */
377#endif /* not HAVE_X_WINDOWS */
ae3bed12
BF
378
379#ifndef ORDINARY_LINK
380/* Fix linking if compiled with GCC. */
381#ifdef __GNUC__
382
383#if __GNUC__ > 1
384
ab8fbbf7
RS
385#ifdef LINKER
386#define LINKER_WAS_SPECIFIED
387#endif
388
ae3bed12
BF
389/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
390 places that are difficult to figure out at make time. Fortunately,
391 these same versions allow you to pass arbitrary flags on to the
392 linker, so there's no reason not to use it as a linker.
393
394 Well, it's not quite perfect. The `-nostdlib' keeps GCC from
395 searching for libraries in its internal directories, so we have to
396 ask GCC explicitly where to find libgcc.a. */
9e012fc3 397
ae3bed12
BF
398#ifndef LINKER
399#define LINKER $(CC) -nostdlib
400#endif
0c22fbca 401
ae3bed12
BF
402#ifndef LIB_GCC
403/* Ask GCC where to find libgcc.a. */
404#define LIB_GCC `$(CC) -print-libgcc-file-name`
3e285e4d 405#endif /* not LIB_GCC */
c8ff0e1b 406
ae3bed12 407GNULIB_VAR = LIB_GCC
5627d72e 408
ab8fbbf7 409#ifndef LINKER_WAS_SPECIFIED
ae3bed12
BF
410/* GCC passes any argument prefixed with -Xlinker directly to the
411 linker. See prefix-args.c for an explanation of why we don't do
412 this with the shell's `for' construct.
413 Note that some people don't have '.' in their paths, so we must
414 use ./prefix-args. */
415#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
ab8fbbf7
RS
416#else
417#define YMF_PASS_LDFLAGS(flags) flags
418#endif
9e012fc3 419
ae3bed12 420#else /* __GNUC__ < 2 */
c8ff0e1b 421
ae3bed12
BF
422#ifndef LIB_GCC
423#define LIB_GCC /usr/local/lib/gcc-gnulib
3e285e4d 424#endif /* not LIB_GCC */
ae3bed12
BF
425GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
426#endif /* __GNUC__ < 2 */
3e285e4d 427#else /* not __GNUC__ */
8f641052 428GNULIB_VAR =
c8ff0e1b 429
3e285e4d 430#endif /* not __GNUC__ */
ae3bed12
BF
431#endif /* not ORDINARY_LINK */
432
433/* Specify address for ld to start loading at,
434 if requested by configuration. */
435#ifdef LD_TEXT_START_ADDR
436STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
437#endif
438
439#ifdef ORDINARY_LINK
440LD = $(CC)
441#else
442#ifdef COFF_ENCAPSULATE
443LD=$(CC) -nostdlib
444#else /* not ORDINARY_LINK */
445#ifdef LINKER
446LD=LINKER
3e285e4d 447#else /* not LINKER */
ae3bed12 448LD=ld
3e285e4d
RS
449#endif /* not LINKER */
450#endif /* not COFF_ENCAPSULATE */
ae3bed12
BF
451#endif /* not ORDINARY_LINK */
452
2f5ee43f
RS
453ALL_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE \
454 LD_SWITCH_SITE $(LDFLAGS)
ae3bed12 455
907d2190 456/* A macro which other sections of Makefile can redefine to munge the
ae3bed12 457 flags before they're passed to LD. This is helpful if you have
907d2190
KH
458 redefined LD to something odd, like "gcc".
459 (The YMF prefix is a holdover from the old name "ymakefile".)
460 */
ae3bed12
BF
461#ifndef YMF_PASS_LDFLAGS
462#define YMF_PASS_LDFLAGS(flags) flags
463#endif
464
465/* Allow config.h to specify a replacement file for unexec.c. */
466#ifndef UNEXEC
467#define UNEXEC unexec.o
468#endif
469#ifndef UNEXEC_SRC
470#define UNEXEC_SRC unexec.c
471#endif
472
473#ifdef USE_TEXT_PROPERTIES
474#define INTERVAL_SRC intervals.h
475#define INTERVAL_OBJ intervals.o textprop.o
476#else
477#define INTERVAL_SRC
478#define INTERVAL_OBJ
479#endif
480
481#ifdef HAVE_GETLOADAVG
482#define GETLOADAVG_OBJ
483#else
484#define GETLOADAVG_OBJ getloadavg.o
485#endif
486
6009ff5a 487#if HAVE_MKTIME && ! BROKEN_MKTIME
2e6edd06
RS
488#define MKTIME_OBJ
489#else
490#define MKTIME_OBJ mktime.o
491#endif
492
87485d6f
MW
493#ifdef MSDOS
494#ifdef HAVE_X_WINDOWS
495#define MSDOS_OBJ dosfns.o msdos.o
496#else
5bfd038e 497#define MSDOS_OBJ dosfns.o msdos.o w16select.o
87485d6f
MW
498#endif
499#else
500#define MSDOS_OBJ
501#endif
502
503
ae3bed12 504/* lastfile must follow all files
dddff397
RS
505 whose initialized data areas should be dumped as pure by dump-emacs. */
506obj= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \
713c0574 507 charset.o coding.o category.o ccl.o\
5bfd038e 508 cm.o term.o xfaces.o $(XOBJ) \
ae3bed12
BF
509 emacs.o keyboard.o macros.o keymap.o sysdep.o \
510 buffer.o filelock.o insdel.o marker.o INTERVAL_OBJ \
511 minibuf.o fileio.o dired.o filemode.o \
512 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
513 alloc.o data.o doc.o editfns.o callint.o \
514 eval.o floatfns.o fns.o print.o lread.o \
515 abbrev.o syntax.o UNEXEC mocklisp.o bytecode.o \
516 process.o callproc.o \
e8951513 517 region-cache.o \
87485d6f 518 doprnt.o strftime.o MKTIME_OBJ GETLOADAVG_OBJ MSDOS_OBJ
ae3bed12 519
229c1c6a
RS
520/* Object files used on some machine or other.
521 These go in the DOC file on all machines
522 in case they are needed there. */
c0cce923 523SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o intervals.o textprop.o \
5bfd038e 524 xterm.o xfns.o xmenu.o xselect.o xrdb.o
149cbcb0 525
229c1c6a 526
ae3bed12
BF
527#ifdef TERMINFO
528/* Used to be -ltermcap here. If your machine needs that,
f11c1c14 529 define LIBS_TERMCAP in the m/MACHINE.h file. */
ae3bed12
BF
530#ifndef LIBS_TERMCAP
531#define LIBS_TERMCAP -lcurses
532#endif /* LIBS_TERMCAP */
533termcapobj = terminfo.o
534#else /* ! defined (TERMINFO) */
535#ifndef LIBS_TERMCAP
536#define LIBS_TERMCAP
537termcapobj = termcap.o tparam.o
538#else /* LIBS_TERMCAP */
539termcapobj = tparam.o
540#endif /* LIBS_TERMCAP */
541#endif /* ! defined (TERMINFO) */
542
543
544#ifndef SYSTEM_MALLOC
545
b1377d7f
RS
546#ifdef DOUG_LEA_MALLOC
547#ifdef REL_ALLOC
548mallocobj = ralloc.o vm-limit.o
549#else /* ! defined (REL_ALLOC) */
27d77e96 550mallocobj = vm-limit.o
b1377d7f
RS
551#endif /* ! defined (REL_ALLOC) */
552#else /* ! defined (DOUG_LEA_MALLOC) */
ae3bed12
BF
553#ifdef REL_ALLOC
554mallocobj = gmalloc.o ralloc.o vm-limit.o
555#else /* ! defined (REL_ALLOC) */
556mallocobj = gmalloc.o vm-limit.o
557#endif /* ! defined (REL_ALLOC) */
b1377d7f 558#endif /* ! defined (DOUG_LEA_MALLOC) */
ae3bed12
BF
559
560#endif /* SYSTEM_MALLOC */
561
562
563#ifndef HAVE_ALLOCA
564allocaobj = alloca.o
565#else
566allocaobj =
567#endif
568
3e285e4d
RS
569#ifdef USE_X_TOOLKIT
570widgetobj= widget.o
571#else /* not USE_X_TOOLKIT */
572widgetobj=
573#endif /* not USE_X_TOOLKIT */
574
ae3bed12
BF
575
576/* define otherobj as list of object files that make-docfile
577 should not be told about. */
3e285e4d 578otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj)
ae3bed12 579
ce339dfb 580#ifdef HAVE_FACES
5bfd038e 581#define FACE_SUPPORT ${lispsource}facemenu.elc
ce339dfb
KH
582#else
583#define FACE_SUPPORT
584#endif
585
ae3bed12 586#ifdef LISP_FLOAT_TYPE
02ae1501 587#define FLOAT_SUPPORT ${lispsource}float-sup.elc
ae3bed12
BF
588#else
589#define FLOAT_SUPPORT
590#endif
591
ce339dfb 592#ifdef HAVE_MOUSE
94636ed5 593#define MOUSE_SUPPORT ${lispsource}mouse.elc \
02ae1501 594 ${lispsource}select.elc ${lispsource}scroll-bar.elc
ce339dfb
KH
595#else
596#define MOUSE_SUPPORT
597#endif
598
2f1b0bbd 599#ifdef HAVE_X_WINDOWS
f32b54d4 600#define X_WINDOWS_SUPPORT
2f1b0bbd
RM
601#else
602#define X_WINDOWS_SUPPORT
603#endif
604
ae3bed12 605#ifdef VMS
02ae1501 606#define VMS_SUPPORT ${lispsource}vmsproc.elc ${lispsource}vms-patch.elc
ae3bed12
BF
607#else
608#define VMS_SUPPORT
609#endif
610
d95ebf76 611#ifdef MSDOS
dc32bb91 612#define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
489f9371 613 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc
d95ebf76
RS
614#else
615#define MSDOS_SUPPORT
616#endif
617
ce339dfb 618#ifdef WINDOWSNT
489f9371
GV
619#define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}w32-fns.elc \
620 ${lispsource}dos-w32.elc
ce339dfb
KH
621#else
622#define WINNT_SUPPORT
623#endif
624
ae3bed12
BF
625/* List of Lisp files loaded into the dumped Emacs. It's arranged
626 like this because it's easier to generate it semi-mechanically from
627 loadup.el this way.
628
629 Note that this list should not include lisp files which might not
630 be present, like site-load.el and site-init.el; this makefile
449d572b
KH
631 expects them all to be either present or buildable.
632
df36c262
RS
633 Files which are loaded unconditionally should be in shortlisp as well.
634 Files included conditionally here should be included (unconditionally)
635 in SOME_MACHINE_LISP. */
449d572b 636
ae3bed12 637lisp= \
02ae1501
KH
638 ${lispsource}abbrev.elc \
639 ${lispsource}buff-menu.elc \
640 ${lispsource}byte-run.elc \
7b30f6cf 641 ${lispsource}cus-start.el \
94636ed5 642 ${lispsource}custom.elc \
de732ea7
RS
643 ${lispsource}emacs-lisp/lisp-mode.elc \
644 ${lispsource}emacs-lisp/lisp.elc \
5bfd038e 645 ${lispsource}faces.elc \
02ae1501 646 ${lispsource}files.elc \
02ae1501 647 ${lispsource}format.elc \
ce339dfb
KH
648 FACE_SUPPORT \
649 MOUSE_SUPPORT \
ae3bed12 650 FLOAT_SUPPORT \
e3678b64 651 ${lispsource}frame.elc\
2f1b0bbd 652 X_WINDOWS_SUPPORT \
02ae1501
KH
653 ${lispsource}help.elc \
654 ${lispsource}indent.elc \
655 ${lispsource}isearch.elc \
7ee4884a 656 ${lispsource}loadup.el \
02ae1501
KH
657 ${lispsource}loaddefs.el \
658 ${lispsource}map-ynp.elc \
94636ed5 659 ${lispsource}menu-bar.elc \
29fad69a
RS
660 ${lispsource}international/mule.elc \
661 ${lispsource}international/mule-conf.el \
662 ${lispsource}international/mule-cmds.elc \
663 ${lispsource}international/characters.elc \
713c0574
KH
664 ${lispsource}language/chinese.elc \
665 ${lispsource}language/cyrillic.elc \
666 ${lispsource}language/devanagari.elc \
3604fd00 667 ${lispsource}language/english.elc \
713c0574
KH
668 ${lispsource}language/ethiopic.elc \
669 ${lispsource}language/european.elc \
670 ${lispsource}language/greek.elc \
671 ${lispsource}language/hebrew.elc \
672 ${lispsource}language/indian.elc \
673 ${lispsource}language/japanese.elc \
674 ${lispsource}language/korean.elc \
57647d09 675 ${lispsource}language/lao.elc \
713c0574 676 ${lispsource}language/thai.elc \
3604fd00 677 ${lispsource}language/tibetan.elc \
713c0574
KH
678 ${lispsource}language/vietnamese.elc \
679 ${lispsource}language/misc-lang.elc \
02ae1501
KH
680 ${lispsource}paths.el \
681 ${lispsource}register.elc \
682 ${lispsource}replace.elc \
683 ${lispsource}simple.elc \
684 ${lispsource}startup.elc \
685 ${lispsource}subr.elc \
de732ea7
RS
686 ${lispsource}textmodes/fill.elc \
687 ${lispsource}textmodes/page.elc \
688 ${lispsource}textmodes/paragraphs.elc \
689 ${lispsource}textmodes/text-mode.elc \
02ae1501 690 ${lispsource}vc-hooks.elc \
730cce4a 691 ${lispsource}ediff-hook.elc \
ae3bed12 692 VMS_SUPPORT \
d95ebf76 693 MSDOS_SUPPORT \
ce339dfb 694 WINNT_SUPPORT \
0273f2e5 695 ${lispsource}widget.elc \
02ae1501
KH
696 ${lispsource}window.elc \
697 ${lispsource}version.el
ae3bed12 698
449d572b
KH
699/* These are relative file names for the Lisp files
700 that are loaded unconditionally. This is used in make-docfile.
701 It need not contain the files that are loaded conditionally
702 because SOME_MACHINE_LISP has those. */
703shortlisp= \
704 ../lisp/abbrev.elc \
705 ../lisp/buff-menu.elc \
706 ../lisp/byte-run.elc \
7b30f6cf 707 ../lisp/cus-start.el \
df36c262 708 ../lisp/custom.elc \
de732ea7
RS
709 ../lisp/emacs-lisp/lisp-mode.elc \
710 ../lisp/emacs-lisp/lisp.elc \
5bfd038e 711 ../lisp/faces.elc \
449d572b 712 ../lisp/files.elc \
449d572b
KH
713 ../lisp/format.elc \
714 ../lisp/help.elc \
715 ../lisp/indent.elc \
716 ../lisp/isearch.elc \
449d572b
KH
717 ../lisp/loadup.el \
718 ../lisp/loaddefs.el \
719 ../lisp/map-ynp.elc \
29fad69a
RS
720 ../lisp/international/mule.elc \
721 ../lisp/international/mule-conf.el \
722 ../lisp/international/mule-cmds.elc \
d32515cd 723 ../lisp/international/characters.elc \
713c0574
KH
724 ../lisp/language/chinese.elc \
725 ../lisp/language/cyrillic.elc \
726 ../lisp/language/devanagari.elc \
3604fd00 727 ../lisp/language/english.elc \
713c0574
KH
728 ../lisp/language/ethiopic.elc \
729 ../lisp/language/european.elc \
730 ../lisp/language/greek.elc \
731 ../lisp/language/hebrew.elc \
732 ../lisp/language/indian.elc \
733 ../lisp/language/japanese.elc \
734 ../lisp/language/korean.elc \
57647d09 735 ../lisp/language/lao.elc \
713c0574 736 ../lisp/language/thai.elc \
3604fd00 737 ../lisp/language/tibetan.elc \
713c0574
KH
738 ../lisp/language/vietnamese.elc \
739 ../lisp/language/misc-lang.elc \
449d572b
KH
740 ../lisp/paths.el \
741 ../lisp/register.elc \
742 ../lisp/replace.elc \
743 ../lisp/simple.elc \
744 ../lisp/startup.elc \
745 ../lisp/subr.elc \
de732ea7
RS
746 ../lisp/textmodes/fill.elc \
747 ../lisp/textmodes/page.elc \
748 ../lisp/textmodes/paragraphs.elc \
749 ../lisp/textmodes/text-mode.elc \
449d572b
KH
750 ../lisp/vc-hooks.elc \
751 ../lisp/ediff-hook.elc \
0273f2e5 752 ../lisp/widget.elc \
449d572b
KH
753 ../lisp/window.elc \
754 ../lisp/version.el
755
f9d6b3c9 756/* Lisp files that may or may not be used.
8f641052 757 We must unconditionally put them in the DOC file.
449d572b
KH
758 We use ../lisp/ to start the file names
759 to reduce the size of the argument list for make-docfile
760 for the sake of systems which can't handle large ones. */
5bfd038e 761SOME_MACHINE_LISP = ${dotdot}/lisp/facemenu.elc \
449d572b
KH
762 ${dotdot}/lisp/float-sup.elc ${dotdot}/lisp/frame.elc \
763 ${dotdot}/lisp/menu-bar.elc ${dotdot}/lisp/mouse.elc \
764 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
765 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
766 ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
489f9371 767 ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc
f9d6b3c9 768
ae3bed12
BF
769/* Construct full set of libraries to be linked.
770 Note that SunOS needs -lm to come before -lc; otherwise, you get
709f7c1f
RM
771 duplicated symbols. If the standard libraries were compiled
772 with GCC, we might need gnulib again after them. */
86dafc78 773LIBES = $(LOADLIBES) $(LDLIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
709f7c1f 774 LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
ae3bed12
BF
775
776/* Enable recompilation of certain other files depending on system type. */
777
778#ifndef OTHER_FILES
779#define OTHER_FILES
780#endif
781
782/* Enable inclusion of object files in temacs depending on system type. */
783#ifndef OBJECTS_SYSTEM
784#define OBJECTS_SYSTEM
785#endif
786
787#ifndef OBJECTS_MACHINE
788#define OBJECTS_MACHINE
789#endif
790
791all: emacs OTHER_FILES
792
793emacs: temacs ${etc}DOC ${lisp}
794#ifdef CANNOT_DUMP
2bbc6b0a 795 rm -f emacs
ae3bed12
BF
796 ln temacs emacs
797#else
798#ifdef HAVE_SHM
ae3bed12
BF
799 ./temacs -nl -batch -l loadup dump
800#else /* ! defined (HAVE_SHM) */
ae3bed12
BF
801 ./temacs -batch -l loadup dump
802#endif /* ! defined (HAVE_SHM) */
803#endif /* ! defined (CANNOT_DUMP) */
804
847bb755
RS
805/* We run make-docfile twice because the command line may get too long
806 on some systems. */
633796fe
RS
807/* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
808 or may not be included in ${obj}, but they are always included in
809 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
810 for the first time, this prevents any variation between configurations
f9d6b3c9
RS
811 in the contents of the DOC file.
812 Likewise for ${SOME_MACHINE_LISP}. */
80b233a9 813${etc}DOC: ${libsrc}make-docfile ${obj} ${lisp}
d95ebf76 814 -rm -f ${etc}DOC
633796fe 815 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
449d572b 816 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
ae3bed12
BF
817
818${libsrc}make-docfile:
918a80cf 819 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
ae3bed12
BF
820
821/* Some systems define this to cause parallel Make-ing. */
822#ifndef MAKE_PARALLEL
823#define MAKE_PARALLEL
824#endif
825
084f76ff 826temacs: MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_SYSTEM OBJECTS_MACHINE prefix-args
88f176a4 827 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${ALL_LDFLAGS}) \
ae3bed12
BF
828 -o temacs ${STARTFILES} ${obj} ${otherobj} \
829 OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
830
f6190d46
RS
831/* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
832 often contain options that have to do with using Emacs's crt0,
833 which are only good with temacs. */
ae3bed12 834prefix-args: prefix-args.c $(config_h)
f6190d46 835 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
ae3bed12
BF
836
837/* These are needed for C compilation, on the systems that need them */
838#ifdef NEED_CPP
839CPP = ./localcpp
840localcpp:
841 cd ${cppdir}; ${MAKE} ${MFLAGS} EMACS=-DEMACS
842 ln ${cppdir}cpp localcpp /* Name where ALL_CFLAGS will refer to it */
843/* cc appears to be cretinous and require all of these to exist
844 if -B is specified -- we can't use one local pass and let the
845 others be the standard ones. What a loser.
846 We can't even use ln, since they are probably
847 on different disks. */
848 cp /lib/ccom localccom
849 -cp /lib/optim localoptim
850 -cp /lib/c2 localc2
851 cp /bin/as localas
852#else /* ! defined (NEED_CPP) */
853CPP = $(CC) -E
854#endif /* ! defined (NEED_CPP) */
855
856#ifdef SHORTNAMES
857shortnames:
858 cd ${shortnamesdir}; ${MAKE} ${MFLAGS}
859#endif
860
861/* Don't lose if this was not defined. */
862#ifndef OLDXMENU_OPTIONS
863#define OLDXMENU_OPTIONS
864#endif
865
3e285e4d
RS
866/* Don't lose if this was not defined. */
867#ifndef LWLIB_OPTIONS
868#define LWLIB_OPTIONS
869#endif
870
6c6c2f69
RM
871#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS)
872
084f76ff
RS
873/* We use stamp-xmenu with these two deps
874 to both ensure that lwlib gets remade based on its dependencies
875 in its own makefile,
876 and remake temacs if lwlib gets changed by this. */
877stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
878 touch stamp-oldxmenu
ee371b01
RS
879/* Supply an ordering for parallel make. */
880../src/$(OLDXMENU): ${OLDXMENU}
084f76ff 881
3e285e4d
RS
882#ifdef USE_X_TOOLKIT
883$(OLDXMENU): really-lwlib
3e285e4d
RS
884
885/* Encode the values of these two macros in Make variables,
886 so we can use $(...) to substitute their values within "...". */
887C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
888C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
889C_SWITCH_SITE_1 = C_SWITCH_SITE
890C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
891C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
892C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
893really-lwlib:
894 cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \
895 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
896 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
897 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
898 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
899 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
900 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
901 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
902 @true /* make -t should not create really-lwlib. */
b1e9ff69 903.PHONY: really-lwlib
3e285e4d 904#else /* not USE_X_TOOLKIT */
ae3bed12 905$(OLDXMENU): really-oldXMenu
ae3bed12
BF
906
907/* Encode the values of these two macros in Make variables,
908 so we can use $(...) to substitute their values within "...". */
909C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
910C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
911C_SWITCH_SITE_1 = C_SWITCH_SITE
912C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
913C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
914C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
915really-oldXMenu:
916 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
917 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
918 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
919 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
920 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
921 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
922 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
923 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
924 @true /* make -t should not create really-oldXMenu. */
b1e9ff69 925.PHONY: really-oldXMenu
3e285e4d 926#endif /* not USE_X_TOOLKIT */
4e7c142c
RS
927#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
928
929/* We don't really need this, but satisfy the dependency. */
930stamp-oldxmenu:
931 touch stamp-oldxmenu
932#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
ae3bed12 933
9ee83b02 934../config.status:: paths.in
66ac18ab 935 @echo "The file paths.h needs to be set up from paths.in."
9ee83b02 936 @echo "Please run the `configure' script again."
ae3bed12
BF
937 exit 1
938
9ee83b02 939../config.status:: config.in
66ac18ab 940 @echo "The file config.h needs to be set up from config.in."
9ee83b02 941 @echo "Please run the `configure' script again."
ae3bed12
BF
942 exit 1
943
944/* Some machines have alloca built-in.
945 They should define HAVE_ALLOCA, or may just let alloca.s
946 be used but generate no code.
947 Some have it written in assembler in alloca.s.
948 Some use the C version in alloca.c (these define C_ALLOCA in config.h).
949 */
950
951#ifdef C_ALLOCA
952/* We could put something in alloca.c to #define free and malloc
953 whenever emacs was #defined, but that's not appropriate for all
954 users of alloca in Emacs. Check out ../lib-src/getopt.c. */
955alloca.o : alloca.c
956 $(CC) -c $(CPPFLAGS) -Dfree=xfree -Dmalloc=xmalloc \
957 $(ALL_CFLAGS) ${srcdir}/alloca.c
958#else
959#ifndef HAVE_ALLOCA
2a3c6d11 960alloca.o : alloca.s $(config_h)
ae3bed12
BF
961/* $(CPP) is cc -E, which may get confused by filenames
962 that do not end in .c. So copy file to a safe name. */
38a31f61 963 -rm -f allocatem.c
ae3bed12
BF
964 cp ${srcdir}/alloca.s allocatem.c
965/* Remove any ^L, blank lines, and preprocessor comments,
966 since some assemblers barf on them. Use a different basename for the
967 output file, since some stupid compilers (Green Hill's) use that
968 name for the intermediate assembler file. */
969 $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \
970 sed -e 's/\f//' -e 's/^#.*//' | \
971 sed -n -e '/^..*$$/p' > allocax.s
972 -rm -f alloca.o
973/* Xenix, in particular, needs to run assembler via cc. */
974 $(CC) -c allocax.s
975 mv allocax.o alloca.o
f194e509 976 -rm -f allocax.s allocatem.c
ae3bed12
BF
977#endif /* HAVE_ALLOCA */
978#endif /* ! defined (C_ALLOCA) */
979
980/* Nearly all the following files depend on lisp.h,
981 but it is not included as a dependency because
982 it is so often changed in ways that do not require any recompilation
983 and so rarely changed in ways that do require any. */
984
da6b134c 985abbrev.o: abbrev.c buffer.h window.h commands.h $(config_h)
e8951513 986buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
713c0574 987 INTERVAL_SRC blockinput.h charset.h $(config_h)
656828cf 988callint.o: callint.c window.h commands.h buffer.h mocklisp.h \
ae3bed12 989 keyboard.h $(config_h)
656828cf 990callproc.o: callproc.c paths.h buffer.h commands.h $(config_h) \
713c0574 991 process.h systty.h syssignal.h charset.h coding.h
8f641052 992casefiddle.o: casefiddle.c syntax.h commands.h buffer.h $(config_h)
656828cf 993casetab.o: casetab.c buffer.h $(config_h)
713c0574
KH
994category.o: category.c category.h buffer.h charset.h $(config_h)
995ccl.o: ccl.c ccl.h charset.h coding.h $(config_h)
b8a9ebfb 996charset.o: charset.c charset.h buffer.h coding.h disptab.h $(config_h)
713c0574 997coding.o: coding.c coding.h buffer.h charset.h $(config_h)
656828cf 998cm.o: cm.c cm.h termhooks.h $(config_h)
713c0574 999cmds.o: cmds.c syntax.h buffer.h charset.h commands.h window.h $(config_h)
656828cf 1000pre-crt0.o: pre-crt0.c
1c738407
RS
1001ecrt0.o: ecrt0.c $(config_h)
1002 CRT0_COMPILE ${srcdir}/ecrt0.c
656828cf 1003dired.o: dired.c commands.h buffer.h $(config_h) regex.h
713c0574 1004dispnew.o: dispnew.c commands.h frame.h window.h buffer.h dispextern.h \
c07d3a87 1005 termchar.h termopts.h termhooks.h cm.h disptab.h systty.h systime.h \
713c0574 1006 xterm.h blockinput.h charset.h $(config_h)
656828cf 1007doc.o: doc.c $(config_h) paths.h buffer.h keyboard.h
713c0574 1008doprnt.o: doprnt.c charset.h $(config_h)
87485d6f 1009dosfns.o: buffer.h termchar.h termhooks.h frame.h msdos.h dosfns.h $(config_h)
713c0574
KH
1010editfns.o: editfns.c window.h buffer.h systime.h INTERVAL_SRC charset.h \
1011 $(config_h)
6bda48a4
RS
1012emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1013 INTERVAL_SRC $(config_h)
713c0574
KH
1014fileio.o: fileio.c window.h buffer.h systime.h INTERVAL_SRC charset.h \
1015 coding.h $(config_h)
656828cf
RS
1016filelock.o: filelock.c buffer.h paths.h $(config_h)
1017filemode.o: filemode.c $(config_h)
da6b134c 1018frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
713c0574
KH
1019 buffer.h charset.h fontset.h $(config_h)
1020fontset.o: fontset.h fontset.c ccl.h charset.h frame.h $(config_h)
656828cf
RS
1021getloadavg.o: getloadavg.c $(config_h)
1022indent.o: indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \
713c0574
KH
1023 termopts.h disptab.h region-cache.h charset.h
1024insdel.o: insdel.c window.h buffer.h INTERVAL_SRC blockinput.h charset.h\
1025 $(config_h)
1026keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h charset.h \
ae3bed12 1027 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
c07d3a87 1028 systty.h systime.h dispextern.h intervals.h blockinput.h xterm.h $(config_h)
656828cf 1029keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
713c0574 1030 puresize.h charset.h $(config_h)
656828cf 1031lastfile.o: lastfile.c $(config_h)
65b6ac4f 1032macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h $(config_h)
656828cf
RS
1033malloc.o: malloc.c $(config_h)
1034gmalloc.o: gmalloc.c $(config_h)
1035ralloc.o: ralloc.c $(config_h)
8f641052
RM
1036vm-limit.o: vm-limit.c mem-limits.h $(config_h)
1037marker.o: marker.c buffer.h $(config_h)
656828cf 1038minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h \
713c0574 1039 buffer.h commands.h charset.h $(config_h)
da6b134c 1040mktime.o: mktime.c $(config_h)
656828cf 1041mocklisp.o: mocklisp.c buffer.h $(config_h)
da6b134c
RS
1042msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h \
1043 termopts.h frame.h window.h $(config_h)
656828cf 1044process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
88771865 1045 commands.h syssignal.h systime.h systty.h syswait.h frame.h \
713c0574
KH
1046 blockinput.h charset.h coding.h $(config_h)
1047regex.o: regex.c syntax.h buffer.h $(config_h) regex.h category.h charset.h
e8951513 1048region-cache.o: region-cache.c buffer.h region-cache.h
0df7d18a 1049scroll.o: scroll.c termchar.h dispextern.h frame.h $(config_h)
e8951513 1050search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
713c0574 1051 blockinput.h category.h charset.h $(config_h)
0df7d18a 1052strftime.o: strftime.c $(config_h)
8b5b51ce 1053 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -Dstrftime=emacs_strftime $<
713c0574
KH
1054syntax.o: syntax.c syntax.h buffer.h commands.h category.h charset.h \
1055 $(config_h)
656828cf 1056sysdep.o: sysdep.c $(config_h) dispextern.h termhooks.h termchar.h termopts.h \
ae3bed12 1057 frame.h syssignal.h systty.h systime.h syswait.h blockinput.h window.h
656828cf 1058term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \
713c0574 1059 disptab.h keyboard.h charset.h coding.h
656828cf
RS
1060termcap.o: termcap.c $(config_h)
1061terminfo.o: terminfo.c $(config_h)
1062tparam.o: tparam.c $(config_h)
8f641052 1063undo.o: undo.c buffer.h commands.h $(config_h)
c04d7da3
RS
1064/* This hack is to discard any space that cpp might put at the beginning
1065 of UNEXEC when substituting it in. */
1066UNEXEC_ALIAS=UNEXEC
656828cf 1067$(UNEXEC_ALIAS): UNEXEC_SRC $(config_h)
481c3743 1068w16select.o: w16select.c lisp.h dispextern.h frame.h blockinput.h
2c01dfb7
RS
1069widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1070 ../lwlib/lwlib.h $(config_h)
656828cf 1071window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
ae3bed12 1072 termhooks.h disptab.h keyboard.h $(config_h)
2d3fa435 1073xdisp.o: xdisp.c macros.h commands.h indent.h buffer.h dispextern.h coding.h \
713c0574 1074 termchar.h frame.h window.h disptab.h termhooks.h charset.h $(config_h)
656828cf 1075xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
713c0574
KH
1076 window.h charset.h $(config_h)
1077xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h\
1078 ../lwlib/lwlib.h blockinput.h paths.h charset.h $(config_h)
690b03fe 1079xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h keyboard.h \
2c01dfb7 1080 ../lwlib/lwlib.h blockinput.h puresize.h msdos.h $(config_h)
656828cf 1081xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h \
ae82682f 1082 dispextern.h frame.h disptab.h blockinput.h systime.h syssignal.h \
713c0574
KH
1083 keyboard.h gnu.h sink.h sinkmask.h charset.h ccl.h fontset.h $(config_h)
1084xselect.o: xselect.c dispextern.h frame.h xterm.h blockinput.h charset.h \
1085 $(config_h)
656828cf
RS
1086xrdb.o: xrdb.c $(config_h)
1087hftctl.o: hftctl.c $(config_h)
ae3bed12
BF
1088
1089/* The files of Lisp proper */
1090
65b6ac4f
RS
1091alloc.o: alloc.c frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
1092 blockinput.h $(config_h) INTERVAL_SRC
ce0af8d5 1093bytecode.o: bytecode.c buffer.h syntax.h $(config_h)
713c0574 1094data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
656828cf
RS
1095eval.o: eval.c commands.h keyboard.h blockinput.h $(config_h)
1096floatfns.o: floatfns.c $(config_h)
da812470 1097fns.o: fns.c commands.h $(config_h) frame.h buffer.h keyboard.h \
22dbea3f 1098 frame.h window.h INTERVAL_SRC
713c0574
KH
1099print.o: print.c process.h frame.h window.h buffer.h keyboard.h charset.h\
1100 $(config_h)
1101lread.o: lread.c commands.h keyboard.h buffer.h paths.h charset.h $(config_h) \
ae3bed12
BF
1102 termhooks.h
1103
1104/* Text properties support */
da6b134c 1105textprop.o: textprop.c buffer.h window.h intervals.h $(config_h)
abd7c202 1106intervals.o: intervals.c buffer.h intervals.h keyboard.h puresize.h $(config_h)
ae3bed12
BF
1107
1108/* System-specific programs to be made.
1109 OTHER_FILES, OBJECTS_SYSTEM and OBJECTS_MACHINE
1110 select which of these should be compiled. */
1111
da6b134c 1112sunfns.o: sunfns.c buffer.h window.h $(config_h)
ae3bed12
BF
1113
1114${libsrc}emacstool: ${libsrc}emacstool.c
1115 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
bfb7b570 1116mostlyclean:
ce0f9653 1117 rm -f temacs prefix-args core \#* *.o libXMenu11.a liblw.a
bfb7b570
JB
1118 rm -f ../etc/DOC
1119clean: mostlyclean
21ed4461 1120 rm -f emacs-* emacs
ae3bed12
BF
1121/**/# This is used in making a distribution.
1122/**/# Do not use it on development directories!
bfb7b570 1123distclean: clean
4322e608 1124 rm -f paths.h config.h Makefile Makefile.c ../etc/DOC-*
40d4f149
RS
1125maintainer-clean: distclean
1126 @echo "This command is intended for maintainers to use;"
1127 @echo "it deletes files that may require special tools to rebuild."
bfb7b570 1128 rm -f TAGS
c3d80a47
ER
1129versionclean:
1130 -rm -f emacs emacs-* ../etc/DOC*
9e012fc3 1131extraclean: distclean
22e5421f 1132 -rm -f *~ \#* m/?*~ s/?*~
9e012fc3 1133
ae3bed12
BF
1134/* The rule for the [sm] files has to be written a little funny to
1135 avoid looking like a C comment to CPP. */
4322e608
RS
1136SOURCES = *.[ch] [sm]/?* COPYING Makefile.in \
1137 config.in paths.in README COPYING ChangeLog vms.pp-trans
a6af8696
ER
1138unlock:
1139 chmod u+w $(SOURCES)
1140
1141relock:
1142 chmod -w $(SOURCES)
1143 chmod +w paths.h
dd6e8a8d 1144
2c32715a
KH
1145/* Arrange to make a tags table in ../lisp, and another in this dir
1146 which includes ../lisp/TAGS by reference. */
a35ee4c3 1147ctagsfiles = [a-zA-Z]*.[hc]
02ae1501 1148lisptagsfiles = ../lisp/[a-zA-Z]*.el
74e89fc9 1149TAGS: $(srcdir)/$(ctagsfiles)
f6190d46 1150 export DIR; DIR=`pwd`; cd ${srcdir}; \
02ae1501 1151 $$DIR/../lib-src/etags --include=../lisp/TAGS \
9dfaca6e 1152 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' $(ctagsfiles)
02ae1501 1153${lispsource}TAGS: ${lispsource}$(lisptagsfiles)
ee371b01
RS
1154 export DIR; DIR=`pwd`; cd ${lispsource}; \
1155 $(MAKE) TAGS ETAGS=$$DIR/../lib-src/etags
02ae1501 1156tags: TAGS ${lispsource}TAGS
ac21ec40 1157.PHONY: tags