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