GTK version
[bpt/emacs.git] / src / Makefile.in
CommitLineData
a0528984
EZ
1# Makefile for GNU Emacs.
2# Copyright (C) 1985, 87, 88, 93, 94, 95, 99, 2000, 2001
3# Free Software Foundation, Inc.
4
5# This file is part of GNU Emacs.
6
7# GNU Emacs is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
11
12# GNU Emacs is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs; see the file COPYING. If not, write to
19# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20# Boston, MA 02111-1307, USA.
21
22
23# Note that this file is edited by msdos/sed1v2.inp for MSDOS. That
24# script may need modifying in sync with changes made here. Try to
25# avoid shell-ism because the DOS build has to use the DOS shell.
26
5f351ff1 27# Don't try to replace the cpp processing using autoconf facilities,
a0528984
EZ
28# says rms.
29
30# Here are the things that we expect ../configure to edit.
31# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
32srcdir=@srcdir@
33VPATH=@srcdir@
34CC=@CC@
35CPP=@CPP@
36CFLAGS=@CFLAGS@
37CPPFLAGS=@CPPFLAGS@
38LDFLAGS=@LDFLAGS@
39LN_S=@LN_S@
40# Substitute an assignment for the MAKE variable, because
41# BSD doesn't have it as a default.
42@SET_MAKE@
43# Don't use LIBS. configure puts stuff in it that either shouldn't be
44# linked with Emacs or is duplicated by the cpp stuff below.
45# LIBS = @LIBS@
46LIBOBJS = @LIBOBJS@
47
48# On Xenix and the IBM RS6000, double-dot gets screwed up.
49dot = .
50dotdot = ${dot}${dot}
51lispsource = ${srcdir}/$(dot)$(dot)/lisp/
52libsrc = $(dot)$(dot)/lib-src/
53etc = $(dot)$(dot)/etc/
54oldXMenudir = $(dot)$(dot)/oldXMenu/
55lwlibdir = $(dot)$(dot)/lwlib/
99b7e543 56lispdir = $(dot)$(dot)/lisp/
a0528984
EZ
57
58# Configuration files for .o files to depend on.
59M_FILE = ${srcdir}/@machfile@
60S_FILE = ${srcdir}/@opsysfile@
61config_h = config.h $(M_FILE) $(S_FILE)
62
63# ========================== start of cpp stuff =======================
64/* From here on, comments must be done in C syntax. */
65
66C_SWITCH_SYSTEM=
67
68/* just to be sure the sh is used */
69SHELL=/bin/sh
70
71#define THIS_IS_MAKEFILE
72#define NO_SHORTNAMES
73#define NOT_C_CODE
74#include "config.h"
75
76/* We won't really call alloca;
77 don't let the file name alloca.c get messed up. */
78#ifdef alloca
79#undef alloca
80#endif
81
82/* Don't let the file name mktime.c get messed up. */
83#ifdef mktime
84#undef mktime
85#endif
86
87/* Use HAVE_X11 as an alias for X11 in this file
88 to avoid problems with X11 as a subdirectory name
89 in -I and other such options which pass through this file. */
90
91#ifdef X11
92#define HAVE_X11
93#undef X11
94#endif
95
96/* On some machines #define register is done in config;
97 don't let it interfere with this file. */
98#undef register
99
100/* On some systems we may not be able to use the system make command. */
101#ifdef MAKE_COMMAND
102MAKE = MAKE_COMMAND
103#endif
104
105#ifdef C_COMPILER
106CC = C_COMPILER
107#endif
108
109/* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
09fcea18 110 GNU/Linux is an exception because it uses a funny variant of GNU libc. */
a0528984 111#ifdef __GNU_LIBRARY__
8a2a6032 112#ifndef GNU_LINUX
a0528984
EZ
113#define ORDINARY_LINK
114#endif
115#endif
116
117/* Some machines don't find the standard C libraries in the usual place. */
118#ifndef ORDINARY_LINK
119#ifndef LIB_STANDARD
120#define LIB_STANDARD -lc
121#endif
122#else
123#ifndef LIB_STANDARD
124#define LIB_STANDARD
125#endif
126#endif
127
128/* Unless inhibited or changed, use -lg to link for debugging. */
129#ifndef LIBS_DEBUG
130#define LIBS_DEBUG -lg
131#endif
132
133/* Some s/SYSTEM.h files define this to request special libraries. */
134#ifndef LIBS_SYSTEM
135#define LIBS_SYSTEM
136#endif
137
138/* Some m/MACHINE.h files define this to request special libraries. */
139#ifndef LIBS_MACHINE
140#define LIBS_MACHINE
141#endif
142
143#ifndef LIB_MATH
144# define LIB_MATH -lm
145#endif /* LIB_MATH */
146
147/* Some s/SYSTEM.h files define this to request special switches in ld. */
148#ifndef LD_SWITCH_SYSTEM
149#if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)))
150#define LD_SWITCH_SYSTEM -X
151#else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
152#define LD_SWITCH_SYSTEM
153#endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
154#endif /* LD_SWITCH_SYSTEM */
155
156/* This holds special options for linking temacs
157 that should be used for linking anything else. */
158#ifndef LD_SWITCH_SYSTEM_TEMACS
159#define LD_SWITCH_SYSTEM_TEMACS
160#endif
161
e0f712ba
AC
162/* Some s/SYSTEM.h files define this to request special switches
163 for compiling temacs. */
164#ifndef C_SWITCH_SYSTEM_TEMACS
165#define C_SWITCH_SYSTEM_TEMACS
166#endif
167
a0528984
EZ
168/* Some m/MACHINE.h files define this to request special switches in ld. */
169#ifndef LD_SWITCH_MACHINE
170#define LD_SWITCH_MACHINE
171#endif
172
173/* This holds special options for linking temacs
174 that should be used for linking anything else. */
175#ifndef LD_SWITCH_MACHINE_TEMACS
176#define LD_SWITCH_MACHINE_TEMACS
177#endif
178
179/* Some m/MACHINE.h files define this to request special switches in cc. */
180#ifndef C_SWITCH_MACHINE
181#define C_SWITCH_MACHINE
182#endif
183
184/* Some s/SYSTEM.h files define this to request special switches in cc. */
185#ifndef C_SWITCH_SYSTEM
186#define C_SWITCH_SYSTEM
187#endif
188
189/* These macros are for switches specifically related to X Windows. */
190#ifndef C_SWITCH_X_MACHINE
191#define C_SWITCH_X_MACHINE
192#endif
193
194#ifndef C_SWITCH_X_SYSTEM
195#define C_SWITCH_X_SYSTEM
196#endif
197
198#ifndef C_SWITCH_X_SITE
199#define C_SWITCH_X_SITE
200#endif
201
202#ifndef LD_SWITCH_X_SITE
203#define LD_SWITCH_X_SITE
204#endif
205
206#ifndef LD_SWITCH_X_DEFAULT
207#define LD_SWITCH_X_DEFAULT
208#endif
209
210/* These can be passed in from config.h to define special load and
211 compile switches needed by individual sites */
212#ifndef LD_SWITCH_SITE
213#define LD_SWITCH_SITE
214#endif
215
216#ifndef C_SWITCH_SITE
217#define C_SWITCH_SITE
218#endif
219
220#ifndef ORDINARY_LINK
221
222#ifndef CRT0_COMPILE
223#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
224#endif
225
226#ifndef START_FILES
227#ifdef NO_REMAP
228#ifdef COFF_ENCAPSULATE
229#define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
230#else /* ! defined (COFF_ENCAPSULATE) */
231#define START_FILES pre-crt0.o /lib/crt0.o
232#endif /* ! defined (COFF_ENCAPSULATE) */
233#else /* ! defined (NO_REMAP) */
234#define START_FILES ecrt0.o
235#endif /* ! defined (NO_REMAP) */
236#endif /* START_FILES */
237STARTFILES = START_FILES
238
239#else /* ORDINARY_LINK */
240
241/* config.h might want to force START_FILES anyway */
242#ifdef START_FILES
243STARTFILES = START_FILES
244#endif /* START_FILES */
245
246#endif /* not ORDINARY_LINK */
247
248
249/* cc switches needed to make `asm' keyword work.
250 Nothing special needed on most machines. */
251#ifndef C_SWITCH_ASM
252#define C_SWITCH_ASM
253#endif
254
488dd4c4
JD
255#if HAVE_GTK
256#define USE_GTK
257TOOLKIT_DEFINES = -DUSE_GTK
258#endif
259
a0528984
EZ
260#ifdef USE_X_TOOLKIT
261#define USE_@X_TOOLKIT_TYPE@
262TOOLKIT_DEFINES = -DUSE_@X_TOOLKIT_TYPE@
263#else
488dd4c4 264#ifndef USE_GTK
a0528984
EZ
265TOOLKIT_DEFINES =
266#endif
488dd4c4 267#endif
a0528984
EZ
268
269/* DO NOT use -R. There is a special hack described in lastfile.c
270 which is used instead. Some initialized data areas are modified
271 at initial startup, then labeled as part of the text area when
272 Emacs is dumped for the first time, and never changed again. */
273
274/* -Demacs is needed to make some files produce the correct version
275 for use in Emacs.
276
277 -DHAVE_CONFIG_H is needed for some other files to take advantage of
278 the information in `config.h'. */
279
280/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
281 since it may have -I options that should override those two. */
e0f712ba 282ALL_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 C_SWITCH_SYSTEM_TEMACS ${CFLAGS}
a0528984
EZ
283.c.o:
284 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
285
286#ifndef LIBX10_MACHINE
287#define LIBX10_MACHINE
288#endif
289
290#ifndef LIBX11_MACHINE
291#define LIBX11_MACHINE
292#endif
293
294#ifndef LIBX10_SYSTEM
295#define LIBX10_SYSTEM
296#endif
297
298#ifndef LIBX11_SYSTEM
299#define LIBX11_SYSTEM
300#endif
301
302#ifndef LIB_X11_LIB
303#define LIB_X11_LIB -lX11
304#endif
305
306#ifdef HAVE_X_WINDOWS
307#ifdef HAVE_MENUS
308
309/* Include xmenu.o in the list of X object files. */
488dd4c4
JD
310
311#ifdef USE_GTK
312XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o gtkutil.o
313#else
618c30cb 314XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o
488dd4c4 315#endif
a0528984
EZ
316
317/* The X Menu stuff is present in the X10 distribution, but missing
318 from X11. If we have X10, just use the installed library;
319 otherwise, use our own copy. */
320#ifdef HAVE_X11
321#ifdef USE_X_TOOLKIT
322OLDXMENU=${lwlibdir}liblw.a
323LIBXMENU= $(OLDXMENU)
324#else /* not USE_X_TOOLKIT */
325OLDXMENU= ${oldXMenudir}libXMenu11.a
326LIBXMENU= $(OLDXMENU)
327#endif /* not USE_X_TOOLKIT */
328#else /* not HAVE_X11 */
329LIBXMENU= -lXMenu
330#endif /* not HAVE_X11 */
331
332#else /* not HAVE_MENUS */
333
334/* Otherwise, omit xmenu.o from the list of X object files, and
335 don't worry about the menu library at all. */
618c30cb 336XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o
a0528984
EZ
337LIBXMENU=
338#endif /* not HAVE_MENUS */
339
340#ifdef USE_X_TOOLKIT
341#define @X_TOOLKIT_TYPE@
342#if defined (LUCID) || defined (ATHENA)
343#if HAVE_XAW3D
344LIBW= -lXaw3d
345#else
346LIBW= -lXaw
347#endif
348#endif
349#ifdef MOTIF
350#if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
351#define LIB_MOTIF_EXTRA -lXp
352#else
353#define LIB_MOTIF_EXTRA
354#endif
355#ifdef LIB_MOTIF
356LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
357#else
358LIBW= -lXm LIB_MOTIF_EXTRA
359#endif
360#endif
361#ifdef OPEN_LOOK
362LIBW= -lXol
363#endif
364
365#ifdef HAVE_X11XTR6
366#ifdef NEED_LIBW
367LIBXTR6 = -lSM -lICE -lw
368#else
369LIBXTR6 = -lSM -lICE
370#endif
371#endif
372
373#ifndef LIBXMU
374#define LIBXMU -lXmu
375#endif
376
377#ifdef LIBXT_STATIC
378/* We assume the config files have defined STATIC_OPTION
379 since that might depend on the operating system.
380 (Don't forget you need different definitions with and without __GNUC__.) */
381LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION
382#else /* not LIBXT_STATIC */
383LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
384#endif /* not LIBXT_STATIC */
385
386#else /* not USE_X_TOOLKIT */
488dd4c4
JD
387
388#ifdef USE_GTK
389LIBW=@GTK_LIBS@
390OLDXMENU=
391LIBXMENU=
392#endif /* USE_GTK */
393
618c30cb 394#ifdef HAVE_X_SM
488dd4c4 395LIBXT=$(LIBW) -lSM -lICE
618c30cb 396#else
488dd4c4 397LIBXT=$(LIBW)
618c30cb 398#endif
a0528984
EZ
399#endif /* not USE_X_TOOLKIT */
400
401#if HAVE_XPM
402#ifndef LIBXPM
403#define LIBXPM -lXpm
404#endif /* not defined LIBXPM */
405#else /* not HAVE_XPM */
406#define LIBXPM
407#endif /* not HAVE_XPM */
408
409#if HAVE_JPEG
410#ifndef LIBJPEG
411#define LIBJPEG -ljpeg
412#endif /* not defined LIBJPEG */
413#else /* not HAVE_JPEG */
414#define LIBJPEG
415#endif /* not HAVE_JPEG */
416
417#if HAVE_PNG
418#ifndef LIBPNG
419#define LIBPNG -lpng -lz -lm
420#endif /* not defined LIBPNG */
421#else /* not HAVE_PNG */
422#define LIBPNG
423#endif /* not HAVE_PNG */
424
425#if HAVE_TIFF
426#ifndef LIBTIFF
427#define LIBTIFF -ltiff
428#endif /* not defined LIBTIFF */
429#else /* not HAVE_TIFF */
430#define LIBTIFF
431#endif /* not HAVE_TIFF */
432
433#if HAVE_GIF
434#ifndef LIBGIF
435#define LIBGIF -lungif
436#endif /* not defined LIBGIF */
437#else /* not HAVE_GIF */
438#define LIBGIF
439#endif /* not HAVE_GIF */
440
441#ifdef HAVE_X11
442/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
443 options for where to find X libraries, but before those libraries. */
444X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
445LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
446#else /* not HAVE_X11 */
447LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
448#endif /* not HAVE_X11 */
449#endif /* not HAVE_X_WINDOWS */
450
451LIBSOUND= @LIBSOUND@
452
453#ifndef ORDINARY_LINK
454/* Fix linking if compiled with GCC. */
455#ifdef __GNUC__
456
457#if __GNUC__ > 1
458
459#ifdef LINKER
460#define LINKER_WAS_SPECIFIED
461#endif
462
463/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
464 places that are difficult to figure out at make time. Fortunately,
465 these same versions allow you to pass arbitrary flags on to the
466 linker, so there's no reason not to use it as a linker.
467
468 Well, it's not quite perfect. The `-nostdlib' keeps GCC from
469 searching for libraries in its internal directories, so we have to
470 ask GCC explicitly where to find libgcc.a. */
471
472#ifndef LINKER
473#define LINKER $(CC) -nostdlib
474#endif
475
476#ifndef LIB_GCC
477/* Ask GCC where to find libgcc.a. */
478#define LIB_GCC `$(CC) -print-libgcc-file-name`
479#endif /* not LIB_GCC */
480
481GNULIB_VAR = LIB_GCC
482
483#ifndef LINKER_WAS_SPECIFIED
484/* GCC passes any argument prefixed with -Xlinker directly to the
485 linker. See prefix-args.c for an explanation of why we don't do
486 this with the shell's `for' construct.
487 Note that some people don't have '.' in their paths, so we must
488 use ./prefix-args. */
489#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
490#else
491#define YMF_PASS_LDFLAGS(flags) flags
492#endif
493
494#else /* __GNUC__ < 2 */
495
496#ifndef LIB_GCC
497#define LIB_GCC /usr/local/lib/gcc-gnulib
498#endif /* not LIB_GCC */
499GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
500#endif /* __GNUC__ < 2 */
501#else /* not __GNUC__ */
502GNULIB_VAR =
503
504#endif /* not __GNUC__ */
505#endif /* not ORDINARY_LINK */
506
507/* Specify address for ld to start loading at,
508 if requested by configuration. */
509#ifdef LD_TEXT_START_ADDR
510STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
511#endif
512
513#ifdef ORDINARY_LINK
514LD = $(CC)
515#else
516#ifdef COFF_ENCAPSULATE
517LD=$(CC) -nostdlib
518#else /* not ORDINARY_LINK */
519#ifdef LINKER
520LD=LINKER
521#else /* not LINKER */
522LD=ld
523#endif /* not LINKER */
524#endif /* not COFF_ENCAPSULATE */
525#endif /* not ORDINARY_LINK */
526
dfe15ea3 527/* Flags to pass to LD only for temacs. */
afb44cc2
DL
528/* Don't split this line with a backslash. That can cause trouble with
529 some cpps. */
530TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE
a0528984
EZ
531
532/* A macro which other sections of Makefile can redefine to munge the
533 flags before they're passed to LD. This is helpful if you have
534 redefined LD to something odd, like "gcc".
535 (The YMF prefix is a holdover from the old name "ymakefile".)
536 */
537#ifndef YMF_PASS_LDFLAGS
538#define YMF_PASS_LDFLAGS(flags) flags
539#endif
540
541/* Allow config.h to specify a replacement file for unexec.c. */
542#ifndef UNEXEC
543#define UNEXEC unexec.o
544#endif
545#ifndef UNEXEC_SRC
546#define UNEXEC_SRC unexec.c
547#endif
548
549INTERVAL_SRC = intervals.h composite.h
550
551GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
552
553#ifdef MSDOS
554#ifdef HAVE_X_WINDOWS
555MSDOS_OBJ = dosfns.o msdos.o
556#else
557MSDOS_OBJ = dosfns.o msdos.o w16select.o
558#endif
559#endif
560
e0f712ba 561#ifdef HAVE_CARBON
ce0669d4 562mac = $(dot)$(dot)/mac/
e0f712ba
AC
563XMENU_OBJ =
564MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o
ce0669d4
ST
565emacsapp = $(PWD)/$(mac)Emacs.app/
566emacsappsrc = ${srcdir}/../mac/Emacs.app/
e0f712ba
AC
567#else
568XMENU_OBJ = xmenu.o
569#endif
a0528984
EZ
570
571/* lastfile must follow all files
572 whose initialized data areas should be dumped as pure by dump-emacs. */
e0f712ba 573obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
a0528984
EZ
574 charset.o coding.o category.o ccl.o\
575 cm.o term.o xfaces.o $(XOBJ) \
576 emacs.o keyboard.o macros.o keymap.o sysdep.o \
577 buffer.o filelock.o insdel.o marker.o \
578 minibuf.o fileio.o dired.o filemode.o \
579 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
580 alloc.o data.o doc.o editfns.o callint.o \
581 eval.o floatfns.o fns.o print.o lread.o \
44eec525 582 abbrev.o syntax.o UNEXEC bytecode.o \
a0528984
EZ
583 process.o callproc.o \
584 region-cache.o sound.o atimer.o \
585 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
e0f712ba 586 $(MSDOS_OBJ) $(MAC_OBJ)
a0528984
EZ
587
588/* Object files used on some machine or other.
589 These go in the DOC file on all machines
590 in case they are needed there. */
591SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \
e0f712ba 592 xterm.o xfns.o xmenu.o xselect.o xrdb.o \
b113160a 593 mac.o macterm.o macfns.o macmenu.o fontset.o
a0528984
EZ
594
595
596#ifdef TERMINFO
597/* Used to be -ltermcap here. If your machine needs that,
598 define LIBS_TERMCAP in the m/MACHINE.h file. */
599#ifndef LIBS_TERMCAP
600#define LIBS_TERMCAP -lcurses
601#endif /* LIBS_TERMCAP */
602termcapobj = terminfo.o
603#else /* ! defined (TERMINFO) */
604#ifndef LIBS_TERMCAP
605#define LIBS_TERMCAP
606termcapobj = termcap.o tparam.o
607#else /* LIBS_TERMCAP */
608termcapobj = tparam.o
609#endif /* LIBS_TERMCAP */
610#endif /* ! defined (TERMINFO) */
611
612
613#ifndef SYSTEM_MALLOC
614
2fa0eedf
RS
615#ifndef DOUG_LEA_MALLOC
616gmallocobj = gmalloc.o
617#endif
618
a0528984 619#ifdef REL_ALLOC
2fa0eedf
RS
620rallocobj = ralloc.o
621#endif
622
623mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
a0528984
EZ
624
625#endif /* SYSTEM_MALLOC */
626
627
628#ifndef HAVE_ALLOCA
629allocaobj = alloca.o
630#else
631allocaobj =
632#endif
633
634#ifdef USE_X_TOOLKIT
635widgetobj= widget.o
636#else /* not USE_X_TOOLKIT */
637widgetobj=
638#endif /* not USE_X_TOOLKIT */
639
640
641/* define otherobj as list of object files that make-docfile
642 should not be told about. */
643otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) $(LIBOBJS)
644
645#ifdef HAVE_MOUSE
646#define MOUSE_SUPPORT ${lispsource}mouse.elc \
647 ${lispsource}select.elc ${lispsource}scroll-bar.elc
648#else
649#define MOUSE_SUPPORT
650#endif
651
652#ifdef VMS
653#define VMS_SUPPORT ${lispsource}vmsproc.elc ${lispsource}vms-patch.elc
654#else
655#define VMS_SUPPORT
656#endif
657
658#ifdef MSDOS
659#define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
660 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
661 ${lispsource}international/ccl.elc ${lispsource}international/codepage.elc
662
663#else
664#define MSDOS_SUPPORT
665#endif
666
667#ifdef WINDOWSNT
1f1bce0e
JR
668#define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
669 ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \
670 ${lispsource}w32-fns.elc
a0528984
EZ
671#else
672#define WINNT_SUPPORT
673#endif
674
675/* List of Lisp files loaded into the dumped Emacs. It's arranged
676 like this because it's easier to generate it semi-mechanically from
677 loadup.el this way.
678
679 Note that this list should not include lisp files which might not
680 be present, like site-load.el and site-init.el; this makefile
681 expects them all to be either present or buildable.
682
683 Files which are loaded unconditionally should be in shortlisp as well.
684 Files included conditionally here should be included (unconditionally)
685 in SOME_MACHINE_LISP. */
686
687lisp= \
688 ${lispsource}abbrev.elc \
689 ${lispsource}buff-menu.elc \
aae5b722 690 ${lispsource}button.elc \
a0528984 691 ${lispsource}byte-run.elc \
bfcf6dbe 692 ${lispsource}cus-face.elc \
d381a855 693 ${lispsource}cus-start.elc \
a0528984 694 ${lispsource}custom.elc \
6e860d15 695 ${lispsource}emacs-lisp/backquote.elc \
a0528984
EZ
696 ${lispsource}emacs-lisp/lisp-mode.elc \
697 ${lispsource}emacs-lisp/lisp.elc \
698 ${lispsource}env.elc \
699 ${lispsource}faces.elc \
700 ${lispsource}files.elc \
701 ${lispsource}format.elc \
702 ${lispsource}facemenu.elc \
703 MOUSE_SUPPORT \
704 ${lispsource}float-sup.elc \
705 ${lispsource}frame.elc\
706 ${lispsource}help.elc \
707 ${lispsource}indent.elc \
708 ${lispsource}isearch.elc \
709 ${lispsource}loadup.el \
710 ${lispsource}loaddefs.el \
aae5b722 711 ${lispsource}bindings.elc \
a0528984
EZ
712 ${lispsource}map-ynp.elc \
713 ${lispsource}menu-bar.elc \
714 ${lispsource}international/mule.elc \
715 ${lispsource}international/mule-conf.el \
716 ${lispsource}international/mule-cmds.elc \
717 ${lispsource}international/characters.elc \
e4b653e1 718 ${lispsource}international/ucs-tables.elc \
a0528984 719 ${lispsource}international/utf-8.elc \
24778020 720 ${lispsource}international/utf-16.elc \
f7d5d963
EZ
721 ${lispsource}international/latin-1.el \
722 ${lispsource}international/latin-2.el \
723 ${lispsource}international/latin-3.el \
724 ${lispsource}international/latin-4.el \
725 ${lispsource}international/latin-5.el \
726 ${lispsource}international/latin-8.el \
727 ${lispsource}international/latin-9.el \
a0528984
EZ
728 ${lispsource}case-table.elc \
729 ${lispsource}language/chinese.elc \
730 ${lispsource}language/cyrillic.elc \
731 ${lispsource}language/indian.elc \
74fc84af
EZ
732 ${lispsource}language/devanagari.el \
733 ${lispsource}language/english.el \
a0528984
EZ
734 ${lispsource}language/ethiopic.elc \
735 ${lispsource}language/european.elc \
74fc84af
EZ
736 ${lispsource}language/czech.el \
737 ${lispsource}language/slovak.el \
738 ${lispsource}language/romanian.el \
739 ${lispsource}language/greek.el \
740 ${lispsource}language/hebrew.el \
741 ${lispsource}language/japanese.el \
742 ${lispsource}language/korean.el \
743 ${lispsource}language/lao.el \
744 ${lispsource}language/thai.el \
a0528984
EZ
745 ${lispsource}language/tibetan.elc \
746 ${lispsource}language/vietnamese.elc \
74fc84af 747 ${lispsource}language/misc-lang.el \
1e9a6186
DL
748 ${lispsource}language/utf-8-lang.el \
749 ${lispsource}language/georgian.el \
a0528984
EZ
750 ${lispsource}paths.el \
751 ${lispsource}register.elc \
752 ${lispsource}replace.elc \
753 ${lispsource}simple.elc \
754 ${lispsource}startup.elc \
755 ${lispsource}subr.elc \
756 ${lispsource}term/tty-colors.elc \
bfcf6dbe 757 ${lispsource}font-core.elc \
a0528984
EZ
758 ${lispsource}textmodes/fill.elc \
759 ${lispsource}textmodes/page.elc \
760 ${lispsource}textmodes/paragraphs.elc \
761 ${lispsource}textmodes/text-mode.elc \
bfcf6dbe 762 ${lispsource}timer.elc \
a0528984
EZ
763 ${lispsource}vc-hooks.elc \
764 ${lispsource}ediff-hook.elc \
765 VMS_SUPPORT \
766 MSDOS_SUPPORT \
767 WINNT_SUPPORT \
768 ${lispsource}widget.elc \
769 ${lispsource}window.elc \
770 ${lispsource}version.el
771
772/* These are relative file names for the Lisp files
773 that are loaded unconditionally. This is used in make-docfile.
774 It need not contain the files that are loaded conditionally
775 because SOME_MACHINE_LISP has those. */
776shortlisp= \
777 ../lisp/abbrev.elc \
778 ../lisp/buff-menu.elc \
aae5b722 779 ../lisp/button.elc \
a0528984 780 ../lisp/byte-run.elc \
bfcf6dbe 781 ../lisp/cus-face.elc \
d381a855 782 ../lisp/cus-start.elc \
a0528984 783 ../lisp/custom.elc \
f7d5d963 784 ../lisp/emacs-lisp/backquote.elc \
a0528984
EZ
785 ../lisp/emacs-lisp/lisp-mode.elc \
786 ../lisp/emacs-lisp/lisp.elc \
787 ../lisp/facemenu.elc \
788 ../lisp/faces.elc \
789 ../lisp/files.elc \
790 ../lisp/float-sup.elc \
791 ../lisp/format.elc \
792 ../lisp/frame.elc \
793 ../lisp/help.elc \
794 ../lisp/indent.elc \
795 ../lisp/isearch.elc \
796 ../lisp/loadup.el \
797 ../lisp/loaddefs.el \
aae5b722 798 ../lisp/bindings.elc \
a0528984
EZ
799 ../lisp/map-ynp.elc \
800 ../lisp/env.elc \
801 ../lisp/international/mule.elc \
802 ../lisp/international/mule-conf.el \
803 ../lisp/international/mule-cmds.elc \
804 ../lisp/international/characters.elc \
e4b653e1 805 ../lisp/international/ucs-tables.elc \
f7d5d963 806 ../lisp/international/utf-8.elc \
24778020 807 ../lisp/international/utf-16.elc \
f7d5d963
EZ
808 ../lisp/international/latin-1.el \
809 ../lisp/international/latin-2.el \
810 ../lisp/international/latin-3.el \
811 ../lisp/international/latin-4.el \
812 ../lisp/international/latin-5.el \
813 ../lisp/international/latin-8.el \
814 ../lisp/international/latin-9.el \
a0528984
EZ
815 ../lisp/case-table.elc \
816 ../lisp/language/chinese.elc \
817 ../lisp/language/cyrillic.elc \
818 ../lisp/language/indian.elc \
74fc84af
EZ
819 ../lisp/language/devanagari.el \
820 ../lisp/language/english.el \
a0528984
EZ
821 ../lisp/language/ethiopic.elc \
822 ../lisp/language/european.elc \
74fc84af
EZ
823 ../lisp/language/czech.el \
824 ../lisp/language/slovak.el \
825 ../lisp/language/romanian.el \
826 ../lisp/language/greek.el \
827 ../lisp/language/hebrew.el \
828 ../lisp/language/japanese.el \
829 ../lisp/language/korean.el \
830 ../lisp/language/lao.el \
831 ../lisp/language/thai.el \
a0528984
EZ
832 ../lisp/language/tibetan.elc \
833 ../lisp/language/vietnamese.elc \
74fc84af 834 ../lisp/language/misc-lang.el \
1e9a6186
DL
835 ../lisp/language/utf-8-lang.el \
836 ../lisp/language/georgian.el \
f7d5d963 837 ../lisp/menu-bar.elc \
a0528984
EZ
838 ../lisp/paths.el \
839 ../lisp/register.elc \
840 ../lisp/replace.elc \
841 ../lisp/simple.elc \
842 ../lisp/startup.elc \
843 ../lisp/subr.elc \
844 ../lisp/term/tty-colors.elc \
59809627 845 ../lisp/font-core.elc \
a0528984
EZ
846 ../lisp/textmodes/fill.elc \
847 ../lisp/textmodes/page.elc \
848 ../lisp/textmodes/paragraphs.elc \
849 ../lisp/textmodes/text-mode.elc \
bfcf6dbe 850 ../lisp/timer.elc \
a0528984
EZ
851 ../lisp/vc-hooks.elc \
852 ../lisp/ediff-hook.elc \
853 ../lisp/widget.elc \
854 ../lisp/window.elc \
855 ../lisp/version.el
856
857/* Lisp files that may or may not be used.
858 We must unconditionally put them in the DOC file.
859 We use ../lisp/ to start the file names
860 to reduce the size of the argument list for make-docfile
a282cc8c 861 for the sake of systems which can\'t handle large ones. */
f7d5d963 862SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
a0528984
EZ
863 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
864 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
865 ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
866 ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc \
867 ${dotdot}/lisp/disp-table.elc ${dotdot}/lisp/dos-vars.elc \
868 ${dotdot}/lisp/international/ccl.elc \
869 ${dotdot}/lisp/international/codepage.elc
870
871/* Construct full set of libraries to be linked.
872 Note that SunOS needs -lm to come before -lc; otherwise, you get
873 duplicated symbols. If the standard libraries were compiled
874 with GCC, we might need gnulib again after them. */
875LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \
876 LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
877 LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \
878 $(GNULIB_VAR)
879
880/* Enable recompilation of certain other files depending on system type. */
881
882#ifndef OTHER_FILES
883#define OTHER_FILES
884#endif
885
886#ifndef OBJECTS_MACHINE
887#define OBJECTS_MACHINE
888#endif
889
890all: emacs OTHER_FILES
891
892emacs: temacs ${etc}DOC ${lisp}
893#ifdef CANNOT_DUMP
894 rm -f emacs
895 ln temacs emacs
896#else
897#ifdef HAVE_SHM
898 LC_ALL=C ./temacs -nl -batch -l loadup dump
899#else /* ! defined (HAVE_SHM) */
900 LC_ALL=C ./temacs -batch -l loadup dump
901#endif /* ! defined (HAVE_SHM) */
902#endif /* ! defined (CANNOT_DUMP) */
903 -./emacs -q -batch -f list-load-path-shadows
904
905/* We run make-docfile twice because the command line may get too long
906 on some systems. */
907/* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
908 or may not be included in ${obj}, but they are always included in
909 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
910 for the first time, this prevents any variation between configurations
911 in the contents of the DOC file.
912 Likewise for ${SOME_MACHINE_LISP}. */
913${etc}DOC: ${libsrc}make-docfile ${obj} ${shortlisp} ${SOME_MACHINE_LISP}
914 -rm -f ${etc}DOC
915 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
916 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
917
918${libsrc}make-docfile:
919 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
920
921/* Some systems define this to cause parallel Make-ing. */
922#ifndef MAKE_PARALLEL
923#define MAKE_PARALLEL
924#endif
925
926temacs: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args
dfe15ea3 927 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
a0528984
EZ
928 -o temacs ${STARTFILES} ${obj} ${otherobj} \
929 OBJECTS_MACHINE ${LIBES}
930
931/* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
932 often contain options that have to do with using Emacs's crt0,
933 which are only good with temacs. */
934prefix-args: prefix-args.c $(config_h)
935 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
936
937/* Don't lose if this was not defined. */
938#ifndef OLDXMENU_OPTIONS
939#define OLDXMENU_OPTIONS
940#endif
941
942/* Don't lose if this was not defined. */
943#ifndef LWLIB_OPTIONS
944#define LWLIB_OPTIONS
945#endif
946
947#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS)
948
949/* We use stamp-xmenu with these two deps
950 to both ensure that lwlib gets remade based on its dependencies
951 in its own makefile,
952 and remake temacs if lwlib gets changed by this. */
953stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
954 touch stamp-oldxmenu
955/* Supply an ordering for parallel make. */
956../src/$(OLDXMENU): ${OLDXMENU}
957
958#ifdef USE_X_TOOLKIT
959$(OLDXMENU): really-lwlib
960
961/* Encode the values of these two macros in Make variables,
962 so we can use $(...) to substitute their values within "...". */
963C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
964C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
965C_SWITCH_SITE_1 = C_SWITCH_SITE
966C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
967C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
968C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
969really-lwlib:
970 cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \
971 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
972 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
973 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
974 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
975 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
976 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
977 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
978 @true /* make -t should not create really-lwlib. */
979.PHONY: really-lwlib
980#else /* not USE_X_TOOLKIT */
981$(OLDXMENU): really-oldXMenu
982
983/* Encode the values of these two macros in Make variables,
984 so we can use $(...) to substitute their values within "...". */
985C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
986C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
987C_SWITCH_SITE_1 = C_SWITCH_SITE
988C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
989C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
990C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
991really-oldXMenu:
992 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
993 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
994 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
995 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
996 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
997 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
998 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
999 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
1000 @true /* make -t should not create really-oldXMenu. */
1001.PHONY: really-oldXMenu
1002#endif /* not USE_X_TOOLKIT */
1003#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
1004
a282cc8c 1005/* We don\'t really need this, but satisfy the dependency. */
a0528984
EZ
1006stamp-oldxmenu:
1007 touch stamp-oldxmenu
1008#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
1009
1010../config.status:: epaths.in
1011 @echo "The file epaths.h needs to be set up from epaths.in."
1012 @echo "Please run the `configure' script again."
1013 exit 1
1014
1015../config.status:: config.in
1016 @echo "The file config.h needs to be set up from config.in."
1017 @echo "Please run the `configure' script again."
1018 exit 1
1019
1020/* Some machines have alloca built-in.
1021 They should define HAVE_ALLOCA, or may just let alloca.s
1022 be used but generate no code.
1023 Some have it written in assembler in alloca.s.
1024 Some use the C version in alloca.c (these define C_ALLOCA in config.h).
1025 */
1026
1027#ifdef C_ALLOCA
1028/* We could put something in alloca.c to #define free and malloc
1029 whenever emacs was #defined, but that's not appropriate for all
1030 users of alloca in Emacs. Check out ../lib-src/getopt.c. */
1031alloca.o : alloca.c
1032 $(CC) -c $(CPPFLAGS) -DEMACS_FREE=xfree \
1033 $(ALL_CFLAGS) ${srcdir}/alloca.c
1034#else
1035#ifndef HAVE_ALLOCA
1036alloca.o : alloca.s $(config_h)
1037/* $(CPP) is cc -E, which may get confused by filenames
1038 that do not end in .c. So copy file to a safe name. */
1039 -rm -f allocatem.c
1040 cp ${srcdir}/alloca.s allocatem.c
1041/* Remove any ^L, blank lines, and preprocessor comments,
1042 since some assemblers barf on them. Use a different basename for the
1043 output file, since some stupid compilers (Green Hill's) use that
1044 name for the intermediate assembler file. */
1045 $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \
1046 sed -e 's/\f//' -e 's/^#.*//' | \
1047 sed -n -e '/^..*$$/p' > allocax.s
1048 -rm -f alloca.o
1049/* Xenix, in particular, needs to run assembler via cc. */
1050 $(CC) -c allocax.s
1051 mv allocax.o alloca.o
1052 -rm -f allocax.s allocatem.c
1053#endif /* HAVE_ALLOCA */
1054#endif /* ! defined (C_ALLOCA) */
1055
1056/* Nearly all the following files depend on lisp.h,
1057 but it is not included as a dependency because
1058 it is so often changed in ways that do not require any recompilation
1059 and so rarely changed in ways that do require any. */
1060
1061abbrev.o: abbrev.c buffer.h window.h dispextern.h commands.h charset.h \
1062 $(config_h)
1063buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
1064 dispextern.h $(INTERVAL_SRC) blockinput.h atimer.h systime.h charset.h \
1065 $(config_h)
44eec525 1066callint.o: callint.c window.h commands.h buffer.h \
a0528984
EZ
1067 keyboard.h dispextern.h $(config_h)
1068callproc.o: callproc.c epaths.h buffer.h commands.h $(config_h) \
1069 process.h systty.h syssignal.h charset.h coding.h ccl.h msdos.h \
1070 composite.h
1071casefiddle.o: casefiddle.c syntax.h commands.h buffer.h composite.h $(config_h)
1072casetab.o: casetab.c buffer.h $(config_h)
1073category.o: category.c category.h buffer.h charset.h $(config_h)
1074ccl.o: ccl.c ccl.h charset.h coding.h $(config_h)
1075charset.o: charset.c charset.h buffer.h coding.h composite.h disptab.h \
1076 $(config_h)
1077coding.o: coding.c coding.h ccl.h buffer.h charset.h $(config_h)
1078cm.o: cm.c cm.h termhooks.h $(config_h)
1079cmds.o: cmds.c syntax.h buffer.h charset.h commands.h window.h $(config_h) \
1080 msdos.h dispextern.h
1081pre-crt0.o: pre-crt0.c
1082ecrt0.o: ecrt0.c $(config_h)
1083 CRT0_COMPILE ${srcdir}/ecrt0.c
1084dired.o: dired.c commands.h buffer.h $(config_h) charset.h coding.h regex.h \
1085 systime.h
4524691f
RS
1086dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \
1087 window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \
1088 disptab.h \
a0528984
EZ
1089 xterm.h blockinput.h atimer.h charset.h msdos.h composite.h keyboard.h \
1090 $(config_h)
1091doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h charset.h
1092doprnt.o: doprnt.c charset.h $(config_h)
1093dosfns.o: buffer.h termchar.h termhooks.h frame.h msdos.h dosfns.h $(config_h)
1094editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
1095 coding.h dispextern.h $(config_h)
1096emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1097 termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h)
1098fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
1099 coding.h ccl.h msdos.h dispextern.h $(config_h)
1100filelock.o: filelock.c buffer.h systime.h epaths.h $(config_h)
1101filemode.o: filemode.c $(config_h)
1102frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1103 buffer.h charset.h fontset.h msdos.h dosfns.h dispextern.h $(config_h)
c2d0b18a 1104fontset.o: dispextern.h fontset.h fontset.c ccl.h buffer.h charset.h frame.h \
a0528984
EZ
1105 keyboard.h $(config_h)
1106getloadavg.o: getloadavg.c $(config_h)
1107indent.o: indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \
1108 termopts.h disptab.h region-cache.h charset.h composite.h dispextern.h \
1109 keyboard.h
1110insdel.o: insdel.c window.h buffer.h $(INTERVAL_SRC) blockinput.h charset.h\
1111 dispextern.h atimer.h systime.h $(config_h)
1112keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h charset.h \
1113 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
1114 systty.h systime.h dispextern.h syntax.h $(INTERVAL_SRC) blockinput.h \
1115 atimer.h xterm.h puresize.h msdos.h $(config_h)
1116keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
1117 atimer.h systime.h puresize.h charset.h intervals.h $(config_h)
1118lastfile.o: lastfile.c $(config_h)
1119macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
1120 dispextern.h $(config_h)
1121malloc.o: malloc.c $(config_h)
1122gmalloc.o: gmalloc.c $(config_h)
1123ralloc.o: ralloc.c $(config_h)
1124vm-limit.o: vm-limit.c mem-limits.h $(config_h)
1125marker.o: marker.c buffer.h charset.h $(config_h)
1126minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h keyboard.h \
1127 buffer.h commands.h charset.h msdos.h $(config_h)
1128mktime.o: mktime.c $(config_h)
a0528984
EZ
1129msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
1130 termopts.h termchar.h charset.h coding.h ccl.h disptab.h window.h \
1131 keyboard.h $(config_h)
1132process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
1133 commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
1134 blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
1135 keyboard.h $(config_h)
1136regex.o: regex.c syntax.h buffer.h $(config_h) regex.h category.h charset.h
1137region-cache.o: region-cache.c buffer.h region-cache.h
1138scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \
1139 $(config_h)
1140search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
1141 blockinput.h atimer.h systime.h category.h charset.h composite.h $(config_h)
1142strftime.o: strftime.c $(config_h)
1143syntax.o: syntax.c syntax.h buffer.h commands.h category.h charset.h \
1144 composite.h $(config_h)
4524691f
RS
1145sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \
1146 process.h dispextern.h termhooks.h termchar.h termopts.h \
1147 frame.h atimer.h window.h msdos.h dosfns.h keyboard.h $(config_h)
a0528984
EZ
1148term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \
1149 disptab.h dispextern.h keyboard.h charset.h coding.h ccl.h msdos.h
1150termcap.o: termcap.c $(config_h)
1151terminfo.o: terminfo.c $(config_h)
1152tparam.o: tparam.c $(config_h)
1153undo.o: undo.c buffer.h commands.h $(config_h)
1154/* This hack is to discard any space that cpp might put at the beginning
1155 of UNEXEC when substituting it in. */
1156UNEXEC_ALIAS=UNEXEC
1157$(UNEXEC_ALIAS): UNEXEC_SRC $(config_h)
1158w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
1159 msdos.h $(config_h)
1160widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1161 $(srcdir)/../lwlib/lwlib.h $(config_h)
1162window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
1163 termhooks.h disptab.h keyboard.h dispextern.h msdos.h composite.h \
1164 $(config_h)
4524691f 1165xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h coding.h \
a0528984
EZ
1166 termchar.h frame.h window.h disptab.h termhooks.h charset.h $(config_h) \
1167 msdos.h composite.h fontset.h
1168xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1169 window.h charset.h msdos.h dosfns.h composite.h atimer.h systime.h $(config_h)
1170xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \
1171 $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \
488dd4c4 1172 charset.h gtkutil.h $(config_h)
c2d0b18a
RS
1173xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
1174 keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h \
488dd4c4 1175 gtkutil.h msdos.h $(config_h)
c2d0b18a 1176xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
a0528984 1177 dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
d1182bc4 1178 keyboard.h gnu.h charset.h ccl.h fontset.h composite.h \
488dd4c4 1179 coding.h process.h gtkutil.h $(config_h)
4524691f
RS
1180xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
1181 charset.h coding.h ccl.h buffer.h atimer.h systime.h $(config_h)
a0528984 1182xrdb.o: xrdb.c $(config_h) epaths.h
c565f6b9 1183xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h
488dd4c4
JD
1184gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \
1185 blockinput.h window.h atimer.h termhooks.h
1186
a0528984
EZ
1187hftctl.o: hftctl.c $(config_h)
1188sound.o: sound.c dispextern.h $(config_h)
1189atimer.o: atimer.c atimer.h systime.h $(config_h)
1190
1191/* The files of Lisp proper */
1192
4524691f 1193alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
a0528984
EZ
1194 blockinput.h atimer.h systime.h charset.h dispextern.h $(config_h) $(INTERVAL_SRC)
1195bytecode.o: bytecode.c buffer.h syntax.h charset.h $(config_h)
1196data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
1197eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
1198 $(config_h)
1199floatfns.o: floatfns.c $(config_h)
1200fns.o: fns.c commands.h $(config_h) frame.h buffer.h charset.h keyboard.h \
221cf9ce 1201 frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h
a0528984
EZ
1202print.o: print.c process.h frame.h window.h buffer.h keyboard.h charset.h\
1203 $(config_h) dispextern.h msdos.h composite.h
1204lread.o: lread.c commands.h keyboard.h buffer.h epaths.h charset.h $(config_h) \
ad6ccf29 1205 termhooks.h coding.h msdos.h
a0528984
EZ
1206
1207/* Text properties support */
1208textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \
1209 $(config_h)
1210intervals.o: intervals.c buffer.h $(INTERVAL_SRC) keyboard.h puresize.h $(config_h)
1211composite.o: composite.c buffer.h charset.h $(INTERVAL_SRC) $(config_h)
1212
1213/* System-specific programs to be made.
1214 OTHER_FILES and OBJECTS_MACHINE
1215 select which of these should be compiled. */
1216
1217sunfns.o: sunfns.c buffer.h window.h dispextern.h $(config_h)
1218
e0f712ba
AC
1219#ifdef HAVE_CARBON
1220abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
1221 fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
1222 scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
1223 xterm.o xselect.o sound.o: macgui.h
1224mac.o: mac.c process.h sysselect.h systime.h $(config_h)
1225macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \
1226 dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
1227 atimer.h systime.h epaths.h termhooks.h coding.h ccl.h systime.h $(config_h)
1228macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \
1229 keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h)
1230macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \
1231 frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \
1232 termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
1233 process.h coding.h $(config_h)
1234
ce0669d4
ST
1235${emacsapp}Contents/Resources/English.lproj:
1236 mkdir -p $@
1237
1238ifneq (${emacsapp},${emacsappsrc})
1239${emacsapp}Contents/Info.plist: ${emacsappsrc}Contents/Info.plist
1240 cp $< $@
1241${emacsapp}Contents/PkgInfo: ${emacsappsrc}Contents/PkgInfo
1242 cp $< $@
1243${emacsapp}Contents/Resources/Emacs.icns: ${emacsappsrc}Contents/Resources/Emacs.icns
1244 mkdir -p ${emacsapp}Contents/Resources
1245 cp $< $@
1246${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings: ${emacsappsrc}Contents/Resources/English.lproj/InfoPlist.strings
1247 cp $< $@
1248endif
1249
1250macosx-bundle: ${emacsapp}Contents/Resources/English.lproj \
1251 ${emacsapp}Contents/Info.plist ${emacsapp}Contents/PkgInfo\
1252 ${emacsapp}Contents/Resources/Emacs.icns \
1253 ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings
1254macosx-app: macosx-bundle ${emacsapp}Contents/MacOS/Emacs \
e0f712ba 1255 ${emacsapp}Contents/Resources/Emacs.rsrc
e0f712ba 1256${emacsapp}Contents/MacOS/Emacs: emacs
ce0669d4 1257 mkdir -p ${emacsapp}Contents/MacOS/;
e0f712ba 1258 cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs Emacs
e0f712ba 1259${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
ce0669d4
ST
1260 /Developer/Tools/Rez -useDF \
1261 -o ${emacsapp}Contents/Resources/Emacs.rsrc \
1262 /System/Library/Frameworks/Carbon.framework/Headers/Carbon.r $<
e0f712ba
AC
1263#endif
1264
a0528984
EZ
1265${libsrc}emacstool: ${libsrc}emacstool.c
1266 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
a282cc8c
SM
1267bootstrapclean:
1268 rm -f bootstrap-emacs
a0528984
EZ
1269mostlyclean:
1270 rm -f temacs prefix-args core *.core \#* *.o libXMenu11.a liblw.a
1271 rm -f ../etc/DOC
05d6956f 1272 rm -f bootstrap-emacs
a0528984 1273clean: mostlyclean
05d6956f 1274 rm -f emacs-* emacs
a0528984
EZ
1275/**/# This is used in making a distribution.
1276/**/# Do not use it on development directories!
1277distclean: clean
1278 rm -f epaths.h config.h Makefile Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
966bda3a
EZ
1279 mv ./.gdbinit ./.gdbinit.save
1280 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
1281 else mv ./.gdbinit.save ./.gdbinit; fi
a0528984
EZ
1282maintainer-clean: distclean
1283 @echo "This command is intended for maintainers to use;"
1284 @echo "it deletes files that may require special tools to rebuild."
1285 rm -f TAGS
1286versionclean:
1287 -rm -f emacs emacs-* ../etc/DOC*
1288extraclean: distclean
1289 -rm -f *~ \#* m/?*~ s/?*~
1290
1291/* The rule for the [sm] files has to be written a little funny to
1292 avoid looking like a C comment to CPP. */
1293SOURCES = *.[ch] [sm]/?* COPYING Makefile.in \
1294 config.in epaths.in README COPYING ChangeLog vms.pp-trans
1295unlock:
1296 chmod u+w $(SOURCES)
1297
1298relock:
1299 chmod -w $(SOURCES)
1300 chmod +w epaths.h
1301
1302/* Arrange to make a tags table TAGS-LISP for ../lisp,
1303 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1304
1305ctagsfiles1 = [xyzXYZ]*.[hc]
1306ctagsfiles2 = [a-wA-W]*.[hc]
1307
1308TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1309 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1310 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1311 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1312frc:
1313TAGS-LISP: frc
99b7e543 1314 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
a0528984
EZ
1315
1316$(lwlibdir)TAGS:
1317 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
1318
1319tags: TAGS TAGS-LISP $(lwlibdir)TAGS
1320.PHONY: tags
1321
1322
1323/* Bootstrapping. */
1324
1325bootstrap: bootstrap-emacs
1326
a0528984
EZ
1327/* Dump an Emacs executable named bootstrap-emacs containing the
1328 files from loadup.el in source form. */
1329
a282cc8c 1330bootstrap-emacs: temacs
a0528984
EZ
1331#ifdef CANNOT_DUMP
1332 ln temacs bootstrap-emacs
1333#else
1334#ifdef HAVE_SHM
1335 ./temacs -nl -batch -l loadup bootstrap
1336#else /* ! defined (HAVE_SHM) */
1337 ./temacs --batch --load loadup bootstrap
1338#endif /* ! defined (HAVE_SHM) */
1339#endif /* ! defined (CANNOT_DUMP) */
1340 mv -f emacs bootstrap-emacs
a0528984 1341