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