1 # Makefile for GNU Emacs.
2 # Copyright (C) 1985, 87, 88, 93, 94, 95 Free Software Foundation, Inc.
4 # This file is part of GNU Emacs.
6 # GNU Emacs is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Emacs is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Emacs; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # Here are the things that we expect ../configure to edit.
28 # Substitute an assignment for the MAKE variable, because
29 # BSD doesn't have it as a default.
32 # On Xenix and the IBM RS6000, double-dot gets screwed up.
35 lispsource
= ${srcdir}/$(dot
)$(dot
)/lisp
/
36 libsrc
= $(dot
)$(dot
)/lib-src
/
37 etc
= $(dot
)$(dot
)/etc
/
38 shortnamesdir
= $(dot
)$(dot
)/shortnames
/
39 cppdir
= $(dot
)$(dot
)/cpp/
40 oldXMenudir
= $(dot
)$(dot
)/oldXMenu
/
41 lwlibdir
= $(dot
)$(dot
)/lwlib
/
43 # Configuration files for .o files to depend on.
44 M_FILE
= ${srcdir}/@machfile@
45 S_FILE
= ${srcdir}/@opsysfile@
46 config_h
= config.h
$(M_FILE
) $(S_FILE
)
48 # ========================== start of cpp stuff =======================
49 /* From here on
, comments must be done in C syntax.
*/
55 /* just to be sure the sh is used
*/
58 #define THIS_IS_MAKEFILE
63 /* We won
't really call alloca;
64 don't let the file name alloca.c
get messed up.
*/
69 /* Don
't let the file name mktime.c get messed up. */
74 /* Use HAVE_X11 as an alias for X11 in this file
75 to avoid problems with X11 as a subdirectory name
76 in -I and other such options which pass through this file. */
83 /* On some machines #define register is done in config;
84 don't let it interfere with this file.
*/
87 /* On some systems we may not be able to use the system make command.
*/
96 /* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
97 Linux is an exception because it uses a funny variant of GNU libc.
*/
98 #ifdef __GNU_LIBRARY__
100 #define ORDINARY_LINK
104 /* Some machines don
't find the standard C libraries in the usual place. */
105 #ifndef ORDINARY_LINK
107 #define LIB_STANDARD -lc
115 /* Unless inhibited or changed, use -lg to link for debugging. */
117 #define LIBS_DEBUG -lg
120 /* Some s/SYSTEM.h files define this to request special libraries. */
125 /* Some m/MACHINE.h files define this to request special libraries. */
131 # ifdef LISP_FLOAT_TYPE
132 # define LIB_MATH -lm
133 # else /* ! defined (LISP_FLOAT_TYPE) */
135 # endif /* ! defined (LISP_FLOAT_TYPE) */
136 #endif /* LIB_MATH */
138 /* Some s/SYSTEM.h files define this to request special switches in ld. */
139 #ifndef LD_SWITCH_SYSTEM
140 #if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)))
141 #define LD_SWITCH_SYSTEM -X
142 #else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
143 #define LD_SWITCH_SYSTEM
144 #endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
145 #endif /* LD_SWITCH_SYSTEM */
147 /* This holds special options for linking temacs
148 that should be used for linking anything else. */
149 #ifndef LD_SWITCH_SYSTEM_TEMACS
150 #define LD_SWITCH_SYSTEM_TEMACS
153 /* Some m/MACHINE.h files define this to request special switches in ld. */
154 #ifndef LD_SWITCH_MACHINE
155 #define LD_SWITCH_MACHINE
158 /* Some m/MACHINE.h files define this to request special switches in cc. */
159 #ifndef C_SWITCH_MACHINE
160 #define C_SWITCH_MACHINE
163 /* Some s/SYSTEM.h files define this to request special switches in cc. */
164 #ifndef C_SWITCH_SYSTEM
165 #define C_SWITCH_SYSTEM
168 /* These macros are for switches specifically related to X Windows. */
169 #ifndef C_SWITCH_X_MACHINE
170 #define C_SWITCH_X_MACHINE
173 #ifndef C_SWITCH_X_SYSTEM
174 #define C_SWITCH_X_SYSTEM
177 #ifndef C_SWITCH_X_SITE
178 #define C_SWITCH_X_SITE
181 #ifndef LD_SWITCH_X_SITE
182 #define LD_SWITCH_X_SITE
185 #ifndef LD_SWITCH_X_DEFAULT
186 #define LD_SWITCH_X_DEFAULT
189 /* These can be passed in from config.h to define special load and
190 compile switches needed by individual sites */
191 #ifndef LD_SWITCH_SITE
192 #define LD_SWITCH_SITE
195 #ifndef C_SWITCH_SITE
196 #define C_SWITCH_SITE
199 #ifndef ORDINARY_LINK
202 #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
207 #ifdef COFF_ENCAPSULATE
208 #define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
209 #else /* ! defined (COFF_ENCAPSULATE) */
210 #define START_FILES pre-crt0.o /lib/crt0.o
211 #endif /* ! defined (COFF_ENCAPSULATE) */
212 #else /* ! defined (NO_REMAP) */
213 #define START_FILES ecrt0.o
214 #endif /* ! defined (NO_REMAP) */
215 #endif /* START_FILES */
216 STARTFILES = START_FILES
218 #else /* ORDINARY_LINK */
220 /* config.h might want to force START_FILES anyway */
222 STARTFILES = START_FILES
223 #endif /* START_FILES */
225 #endif /* not ORDINARY_LINK */
228 /* cc switches needed to make `asm' keyword work.
229 Nothing special needed on most machines.
*/
234 /* Figure out whether the system
cpp can handle long names.
235 Do it by testing it right now.
236 If it loses
, arrange to use the GNU
cpp.
*/
238 #define LONGNAMEBBBFOOX
239 #ifdef LONGNAMEBBBARFOOX
240 /* Installed
cpp fails to distinguish those names
! */
241 /* Arrange to compile the GNU
cpp later on
*/
243 /* Cause
cc to invoke the
cpp that comes with Emacs
,
244 which will be in a file named localcpp.
*/
246 /* LOCALCPP is the local one or nothing.
247 CPP is the local one or the standard one.
*/
249 #endif /* ! defined (LONGNAMEBBBARFOOX) */
256 #define USE_@X_TOOLKIT_TYPE@
257 TOOLKIT_DEFINES
= -DUSE_@X_TOOLKIT_TYPE@
262 /* DO NOT use
-R. There is a special hack described in lastfile.c
263 which is used instead. Some initialized data areas are modified
264 at initial startup
, then labeled
as part of the text area when
265 Emacs is dumped for the first time
, and never changed again.
*/
267 /* -Demacs is needed to make some files produce the correct version
270 -DHAVE_CONFIG_H is needed for some other files to take advantage of
271 the information in
`config.h'. */
273 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
274 since it may have -I options that should override those two. */
275 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM ${CFLAGS}
277 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
279 #ifndef LIBX10_MACHINE
280 #define LIBX10_MACHINE
283 #ifndef LIBX11_MACHINE
284 #define LIBX11_MACHINE
287 #ifndef LIBX10_SYSTEM
288 #define LIBX10_SYSTEM
291 #ifndef LIBX11_SYSTEM
292 #define LIBX11_SYSTEM
296 #define LIB_X11_LIB -lX11
299 #ifdef HAVE_X_WINDOWS
302 /* Include xmenu.o in the list of X object files. */
303 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o
305 /* The X Menu stuff is present in the X10 distribution, but missing
306 from X11. If we have X10, just use the installed library;
307 otherwise, use our own copy. */
310 OLDXMENU=${lwlibdir}liblw.a
311 LIBXMENU= $(OLDXMENU)
312 #else /* not USE_X_TOOLKIT */
313 OLDXMENU= ${oldXMenudir}libXMenu11.a
314 LIBXMENU= $(OLDXMENU)
315 #endif /* not USE_X_TOOLKIT */
316 #else /* not HAVE_X11 */
318 #endif /* not HAVE_X11 */
320 #else /* not HAVE_MENUS */
322 /* Otherwise, omit xmenu.o from the list of X object files, and
323 don't worry about the menu library at all. */
324 XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o
326 #endif /* not HAVE_MENUS */
329 #define @X_TOOLKIT_TYPE@
330 #if defined (LUCID) || defined (ATHENA)
346 LIBXTR6 = -lSM -lICE -lw
357 /* We assume the config files have defined STATIC_OPTION
358 since that might depend on the operating system.
359 (Don't forget you need different definitions with and without __GNUC__.) */
360 LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION
361 #else /* not LIBXT_STATIC */
362 LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
363 #endif /* not LIBXT_STATIC */
365 #else /* not USE_X_TOOLKIT */
367 #endif /* not USE_X_TOOLKIT */
370 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
371 options for where to find X libraries, but before those libraries. */
372 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
373 LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
374 #else /* not HAVE_X11 */
375 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
376 #endif /* not HAVE_X11 */
377 #endif /* not HAVE_X_WINDOWS */
379 #ifndef ORDINARY_LINK
380 /* Fix linking if compiled with GCC. */
386 #define LINKER_WAS_SPECIFIED
389 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
390 places that are difficult to figure out at make time. Fortunately,
391 these same versions allow you to pass arbitrary flags on to the
392 linker, so there's no reason not to use it as a linker.
394 Well, it's not quite perfect. The `-nostdlib
' keeps GCC from
395 searching for libraries in its internal directories, so we have to
396 ask GCC explicitly where to find libgcc.a. */
399 #define LINKER $(CC) -nostdlib
403 /* Ask GCC where to find libgcc.a. */
404 #define LIB_GCC `$(CC) -print-libgcc-file-name`
405 #endif /* not LIB_GCC */
409 #ifndef LINKER_WAS_SPECIFIED
410 /* GCC passes any argument prefixed with -Xlinker directly to the
411 linker. See prefix-args.c for an explanation of why we don't do
412 this with the
shell's `for' construct.
413 Note that some people don
't have '.
' in their paths, so we must
414 use ./prefix-args. */
415 #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
417 #define YMF_PASS_LDFLAGS(flags) flags
420 #else /* __GNUC__ < 2 */
423 #define LIB_GCC /usr/local/lib/gcc-gnulib
424 #endif /* not LIB_GCC */
425 GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
426 #endif /* __GNUC__ < 2 */
427 #else /* not __GNUC__ */
430 #endif /* not __GNUC__ */
431 #endif /* not ORDINARY_LINK */
433 /* Specify address for ld to start loading at,
434 if requested by configuration. */
435 #ifdef LD_TEXT_START_ADDR
436 STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
442 #ifdef COFF_ENCAPSULATE
444 #else /* not ORDINARY_LINK */
447 #else /* not LINKER */
449 #endif /* not LINKER */
450 #endif /* not COFF_ENCAPSULATE */
451 #endif /* not ORDINARY_LINK */
453 ALL_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE \
454 LD_SWITCH_SITE $(LDFLAGS)
456 /* A macro which other sections of Makefile can redefine to munge the
457 flags before they're passed to LD. This is helpful if you have
458 redefined LD to something odd
, like
"gcc".
459 (The YMF
prefix is a holdover from the old name
"ymakefile".
)
461 #ifndef YMF_PASS_LDFLAGS
462 #define YMF_PASS_LDFLAGS(flags) flags
465 /* Allow config.h to specify a replacement file for unexec.c.
*/
467 #define UNEXEC unexec.o
470 #define UNEXEC_SRC unexec.c
473 #ifdef USE_TEXT_PROPERTIES
474 #define INTERVAL_SRC intervals.h
475 #define INTERVAL_OBJ intervals.o textprop.o
481 #ifdef HAVE_GETLOADAVG
482 #define GETLOADAVG_OBJ
484 #define GETLOADAVG_OBJ getloadavg.o
487 #if HAVE_MKTIME && ! BROKEN_MKTIME
490 #define MKTIME_OBJ mktime.o
494 #ifdef HAVE_X_WINDOWS
495 #define MSDOS_OBJ dosfns.o msdos.o
497 #define MSDOS_OBJ dosfns.o msdos.o w16select.o
504 /* lastfile must follow
all files
505 whose initialized data areas should be dumped
as pure by dump-emacs.
*/
506 obj
= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \
507 charset.o coding.o category.o ccl.o\
508 cm.o term.o xfaces.o
$(XOBJ
) \
509 emacs.o keyboard.o macros.o keymap.o sysdep.o \
510 buffer.o filelock.o insdel.o marker.o INTERVAL_OBJ \
511 minibuf.o fileio.o dired.o filemode.o \
512 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
513 alloc.o data.o doc.o editfns.o callint.o \
514 eval.o floatfns.o fns.o
print.o lread.o \
515 abbrev.o syntax.o UNEXEC mocklisp.o bytecode.o \
516 process.o callproc.o \
518 doprnt.o strftime.o MKTIME_OBJ GETLOADAVG_OBJ MSDOS_OBJ
520 /* Object files used on some machine or other.
521 These go in the DOC file on
all machines
522 in case they are needed there.
*/
523 SOME_MACHINE_OBJECTS
= sunfns.o dosfns.o msdos.o intervals.o textprop.o \
524 xterm.o xfns.o xmenu.o xselect.o xrdb.o
528 /* Used to be
-ltermcap here. If your machine needs that
,
529 define LIBS_TERMCAP in the m
/MACHINE.h file.
*/
531 #define LIBS_TERMCAP -lcurses
532 #endif /* LIBS_TERMCAP */
533 termcapobj
= terminfo.o
534 #else /* ! defined (TERMINFO) */
537 termcapobj
= termcap.o tparam.o
538 #else /* LIBS_TERMCAP */
539 termcapobj
= tparam.o
540 #endif /* LIBS_TERMCAP */
541 #endif /* ! defined (TERMINFO) */
544 #ifndef SYSTEM_MALLOC
546 #ifdef DOUG_LEA_MALLOC
548 mallocobj
= ralloc.o vm-limit.o
549 #else /* ! defined (REL_ALLOC) */
550 mallocobj
= vm-limit.o
551 #endif /* ! defined (REL_ALLOC) */
552 #else /* ! defined (DOUG_LEA_MALLOC) */
554 mallocobj
= gmalloc.o ralloc.o vm-limit.o
555 #else /* ! defined (REL_ALLOC) */
556 mallocobj
= gmalloc.o vm-limit.o
557 #endif /* ! defined (REL_ALLOC) */
558 #endif /* ! defined (DOUG_LEA_MALLOC) */
560 #endif /* SYSTEM_MALLOC */
571 #else /* not USE_X_TOOLKIT */
573 #endif /* not USE_X_TOOLKIT */
576 /* define otherobj
as list of object files that make-docfile
577 should not be told about.
*/
578 otherobj
= $(termcapobj
) lastfile.o
$(mallocobj
) $(allocaobj
) $(widgetobj
)
581 #define FACE_SUPPORT ${lispsource}facemenu.elc
586 #ifdef LISP_FLOAT_TYPE
587 #define FLOAT_SUPPORT ${lispsource}float-sup.elc
589 #define FLOAT_SUPPORT
593 #define MOUSE_SUPPORT ${lispsource}mouse.elc \
594 ${lispsource}select.elc
${lispsource}scroll-bar.elc
596 #define MOUSE_SUPPORT
599 #ifdef HAVE_X_WINDOWS
600 #define X_WINDOWS_SUPPORT
602 #define X_WINDOWS_SUPPORT
606 #define VMS_SUPPORT ${lispsource}vmsproc.elc ${lispsource}vms-patch.elc
612 #define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
613 ${lispsource}dos-fns.elc
${lispsource}dos-w32.elc
615 #define MSDOS_SUPPORT
619 #define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}w32-fns.elc \
620 ${lispsource}dos-w32.elc
622 #define WINNT_SUPPORT
625 /* List of Lisp files loaded into the dumped Emacs. It
's arranged
626 like this because it's easier to generate it semi-mechanically from
629 Note that this list should not
include lisp files which might not
630 be present
, like site-load.el and site-init.el
; this makefile
631 expects them
all to be either present or buildable.
633 Files which are loaded unconditionally should be in shortlisp
as well.
634 Files included conditionally here should be included
(unconditionally
)
635 in SOME_MACHINE_LISP.
*/
638 ${lispsource}abbrev.elc \
639 ${lispsource}buff-menu.elc \
640 ${lispsource}byte-run.elc \
641 ${lispsource}cus-start.el \
642 ${lispsource}custom.elc \
643 ${lispsource}emacs-lisp
/lisp-mode.elc \
644 ${lispsource}emacs-lisp
/lisp.elc \
645 ${lispsource}faces.elc \
646 ${lispsource}files.elc \
647 ${lispsource}format.elc \
651 ${lispsource}frame.elc\
653 ${lispsource}help.elc \
654 ${lispsource}indent.elc \
655 ${lispsource}isearch.elc \
656 ${lispsource}loadup.el \
657 ${lispsource}loaddefs.el \
658 ${lispsource}map-ynp.elc \
659 ${lispsource}menu-bar.elc \
660 ${lispsource}international
/mule.elc \
661 ${lispsource}international
/mule-conf.el \
662 ${lispsource}international
/mule-cmds.elc \
663 ${lispsource}international
/characters.elc \
664 ${lispsource}language
/chinese.elc \
665 ${lispsource}language
/cyrillic.elc \
666 ${lispsource}language
/devanagari.elc \
667 ${lispsource}language
/english.elc \
668 ${lispsource}language
/ethiopic.elc \
669 ${lispsource}language
/european.elc \
670 ${lispsource}language
/greek.elc \
671 ${lispsource}language
/hebrew.elc \
672 ${lispsource}language
/indian.elc \
673 ${lispsource}language
/japanese.elc \
674 ${lispsource}language
/korean.elc \
675 ${lispsource}language
/lao.elc \
676 ${lispsource}language
/thai.elc \
677 ${lispsource}language
/tibetan.elc \
678 ${lispsource}language
/vietnamese.elc \
679 ${lispsource}language
/misc-lang.elc \
680 ${lispsource}paths.el \
681 ${lispsource}register.elc \
682 ${lispsource}replace.elc \
683 ${lispsource}simple.elc \
684 ${lispsource}startup.elc \
685 ${lispsource}subr.elc \
686 ${lispsource}textmodes
/fill.elc \
687 ${lispsource}textmodes
/page.elc \
688 ${lispsource}textmodes
/paragraphs.elc \
689 ${lispsource}textmodes
/text-mode.elc \
690 ${lispsource}vc-hooks.elc \
691 ${lispsource}ediff-hook.elc \
695 ${lispsource}widget.elc \
696 ${lispsource}window.elc \
697 ${lispsource}version.el
699 /* These are relative file names for the Lisp files
700 that are loaded unconditionally. This is used in make-docfile.
701 It need not contain the files that are loaded conditionally
702 because SOME_MACHINE_LISP has those.
*/
705 ..
/lisp
/buff-menu.elc \
706 ..
/lisp
/byte-run.elc \
707 ..
/lisp
/cus-start.el \
709 ..
/lisp
/emacs-lisp
/lisp-mode.elc \
710 ..
/lisp
/emacs-lisp
/lisp.elc \
716 ..
/lisp
/isearch.elc \
718 ..
/lisp
/loaddefs.el \
719 ..
/lisp
/map-ynp.elc \
720 ..
/lisp
/international
/mule.elc \
721 ..
/lisp
/international
/mule-conf.el \
722 ..
/lisp
/international
/mule-cmds.elc \
723 ..
/lisp
/international
/characters.elc \
724 ..
/lisp
/language
/chinese.elc \
725 ..
/lisp
/language
/cyrillic.elc \
726 ..
/lisp
/language
/devanagari.elc \
727 ..
/lisp
/language
/english.elc \
728 ..
/lisp
/language
/ethiopic.elc \
729 ..
/lisp
/language
/european.elc \
730 ..
/lisp
/language
/greek.elc \
731 ..
/lisp
/language
/hebrew.elc \
732 ..
/lisp
/language
/indian.elc \
733 ..
/lisp
/language
/japanese.elc \
734 ..
/lisp
/language
/korean.elc \
735 ..
/lisp
/language
/lao.elc \
736 ..
/lisp
/language
/thai.elc \
737 ..
/lisp
/language
/tibetan.elc \
738 ..
/lisp
/language
/vietnamese.elc \
739 ..
/lisp
/language
/misc-lang.elc \
741 ..
/lisp
/register.elc \
742 ..
/lisp
/replace.elc \
744 ..
/lisp
/startup.elc \
746 ..
/lisp
/textmodes
/fill.elc \
747 ..
/lisp
/textmodes
/page.elc \
748 ..
/lisp
/textmodes
/paragraphs.elc \
749 ..
/lisp
/textmodes
/text-mode.elc \
750 ..
/lisp
/vc-hooks.elc \
751 ..
/lisp
/ediff-hook.elc \
756 /* Lisp files that may or may not be used.
757 We must unconditionally put them in the DOC file.
758 We use ..
/lisp
/ to start the file names
759 to reduce the size of the argument list for make-docfile
760 for the sake of systems which can
't handle large ones. */
761 SOME_MACHINE_LISP = ${dotdot}/lisp/facemenu.elc \
762 ${dotdot}/lisp/float-sup.elc ${dotdot}/lisp/frame.elc \
763 ${dotdot}/lisp/menu-bar.elc ${dotdot}/lisp/mouse.elc \
764 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
765 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
766 ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
767 ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc
769 /* Construct full set of libraries to be linked.
770 Note that SunOS needs -lm to come before -lc; otherwise, you get
771 duplicated symbols. If the standard libraries were compiled
772 with GCC, we might need gnulib again after them. */
773 LIBES = $(LOADLIBES) $(LDLIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
774 LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
776 /* Enable recompilation of certain other files depending on system type. */
782 /* Enable inclusion of object files in temacs depending on system type. */
783 #ifndef OBJECTS_SYSTEM
784 #define OBJECTS_SYSTEM
787 #ifndef OBJECTS_MACHINE
788 #define OBJECTS_MACHINE
791 all: emacs OTHER_FILES
793 emacs: temacs ${etc}DOC ${lisp}
799 ./temacs -nl -batch -l loadup dump
800 #else /* ! defined (HAVE_SHM) */
801 ./temacs -batch -l loadup dump
802 #endif /* ! defined (HAVE_SHM) */
803 #endif /* ! defined (CANNOT_DUMP) */
805 /* We run make-docfile twice because the command line may get too long
807 /* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
808 or may not be included in ${obj}, but they are always included in
809 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
810 for the first time, this prevents any variation between configurations
811 in the contents of the DOC file.
812 Likewise for ${SOME_MACHINE_LISP}. */
813 ${etc}DOC: ${libsrc}make-docfile ${obj} ${lisp}
815 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
816 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
818 ${libsrc}make-docfile:
819 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
821 /* Some systems define this to cause parallel Make-ing. */
822 #ifndef MAKE_PARALLEL
823 #define MAKE_PARALLEL
826 temacs: MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_SYSTEM OBJECTS_MACHINE prefix-args
827 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${ALL_LDFLAGS}) \
828 -o temacs ${STARTFILES} ${obj} ${otherobj} \
829 OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
831 /* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
832 often contain options that have to do with using Emacs
's crt0,
833 which are only good with temacs. */
834 prefix-args: prefix-args.c $(config_h)
835 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
837 /* These are needed for C compilation, on the systems that need them */
841 cd ${cppdir}; ${MAKE} ${MFLAGS} EMACS=-DEMACS
842 ln ${cppdir}cpp localcpp /* Name where ALL_CFLAGS will refer to it */
843 /* cc appears to be cretinous and require all of these to exist
844 if -B is specified -- we can't use one local pass and let the
845 others be the standard ones. What a loser.
846 We can
't even use ln, since they are probably
847 on different disks. */
848 cp /lib/ccom localccom
849 -cp /lib/optim localoptim
852 #else /* ! defined (NEED_CPP) */
854 #endif /* ! defined (NEED_CPP) */
858 cd ${shortnamesdir}; ${MAKE} ${MFLAGS}
861 /* Don't lose if this was not defined.
*/
862 #ifndef OLDXMENU_OPTIONS
863 #define OLDXMENU_OPTIONS
866 /* Don
't lose if this was not defined. */
867 #ifndef LWLIB_OPTIONS
868 #define LWLIB_OPTIONS
871 #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS)
873 /* We use stamp-xmenu with these two deps
874 to both ensure that lwlib gets remade based on its dependencies
876 and remake temacs if lwlib gets changed by this. */
877 stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
881 $(OLDXMENU): really-lwlib
883 /* Encode the values of these two macros in Make variables,
884 so we can use $(...) to substitute their values within "...". */
885 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
886 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
887 C_SWITCH_SITE_1 = C_SWITCH_SITE
888 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
889 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
890 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
892 cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \
893 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
894 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
895 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
896 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
897 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
898 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
899 "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
900 @true /* make -t should not create really-lwlib. */
902 #else /* not USE_X_TOOLKIT */
903 $(OLDXMENU): really-oldXMenu
905 /* Encode the values of these two macros in Make variables,
906 so we can use $(...) to substitute their values within "...". */
907 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
908 C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
909 C_SWITCH_SITE_1 = C_SWITCH_SITE
910 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
911 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
912 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
914 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
915 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
916 "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
917 "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
918 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" \
919 "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
920 "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)" \
921 "C_SWITCH_SYSTEM=$(C_SWITCH_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) */
927 /* We don't really need this
, but satisfy the dependency.
*/
930 #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */
932 ..
/config.status
:: paths.in
933 @echo
"The file paths.h needs to be set up from paths.in."
934 @echo
"Please run the `configure' script again."
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."
942 /* Some machines have alloca built-in.
943 They should
define HAVE_ALLOCA
, or may just let alloca.s
944 be used but generate no code.
945 Some have it written in assembler in alloca.s.
946 Some use the C version in alloca.c
(these
define C_ALLOCA in config.h
).
950 /* We could put something in alloca.c to
#define free and malloc
951 whenever emacs was
#defined, but that's not appropriate for all
952 users of alloca in Emacs. Check out ..
/lib-src
/getopt.c.
*/
954 $(CC
) -c
$(CPPFLAGS
) -Dfree
=xfree
-Dmalloc
=xmalloc \
955 $(ALL_CFLAGS
) ${srcdir}/alloca.c
958 alloca.o
: alloca.s
$(config_h
)
959 /* $(CPP
) is
cc -E
, which may
get confused by filenames
960 that do not end in .c. So copy file to a safe name.
*/
962 cp
${srcdir}/alloca.s allocatem.c
963 /* Remove any ^L
, blank lines
, and preprocessor comments
,
964 since some assemblers barf on them. Use a different
basename for the
965 output file
, since some stupid compilers
(Green Hill
's) use that
966 name for the intermediate assembler file. */
967 $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \
968 sed -e 's
/\f//' -e 's
/^
#.*//' | \
969 sed
-n
-e
'/^..*$$/p' > allocax.s
971 /* Xenix
, in particular
, needs to run assembler via
cc.
*/
973 mv allocax.o alloca.o
974 -rm -f allocax.s allocatem.c
975 #endif /* HAVE_ALLOCA */
976 #endif /* ! defined (C_ALLOCA) */
978 /* Nearly
all the following files depend on lisp.h
,
979 but it is not included
as a dependency because
980 it is so often changed in ways that do not require any recompilation
981 and so rarely changed in ways that do require any.
*/
983 abbrev.o
: abbrev.c buffer.h window.h commands.h
$(config_h
)
984 buffer.o
: buffer.c buffer.h region-cache.h commands.h window.h \
985 INTERVAL_SRC blockinput.h charset.h
$(config_h
)
986 callint.o
: callint.c window.h commands.h buffer.h mocklisp.h \
987 keyboard.h
$(config_h
)
988 callproc.o
: callproc.c paths.h buffer.h commands.h
$(config_h
) \
989 process.h systty.h syssignal.h charset.h coding.h
990 casefiddle.o
: casefiddle.c syntax.h commands.h buffer.h
$(config_h
)
991 casetab.o
: casetab.c buffer.h
$(config_h
)
992 category.o
: category.c category.h buffer.h charset.h
$(config_h
)
993 ccl.o
: ccl.c ccl.h charset.h coding.h
$(config_h
)
994 charset.o
: charset.c charset.h buffer.h coding.h disptab.h
$(config_h
)
995 coding.o
: coding.c coding.h buffer.h charset.h
$(config_h
)
996 cm.o
: cm.c cm.h termhooks.h
$(config_h
)
997 cmds.o
: cmds.c syntax.h buffer.h charset.h commands.h window.h
$(config_h
)
998 pre-crt0.o
: pre-crt0.c
999 ecrt0.o
: ecrt0.c
$(config_h
)
1000 CRT0_COMPILE
${srcdir}/ecrt0.c
1001 dired.o
: dired.c commands.h buffer.h
$(config_h
) regex.h
1002 dispnew.o
: dispnew.c commands.h frame.h window.h buffer.h dispextern.h \
1003 termchar.h termopts.h termhooks.h cm.h disptab.h systty.h systime.h \
1004 xterm.h blockinput.h charset.h
$(config_h
)
1005 doc.o
: doc.c
$(config_h
) paths.h buffer.h keyboard.h
1006 doprnt.o
: doprnt.c charset.h
$(config_h
)
1007 dosfns.o
: buffer.h termchar.h termhooks.h frame.h msdos.h dosfns.h
$(config_h
)
1008 editfns.o
: editfns.c window.h buffer.h systime.h INTERVAL_SRC charset.h \
1010 emacs.o
: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
1011 INTERVAL_SRC
$(config_h
)
1012 fileio.o
: fileio.c window.h buffer.h systime.h INTERVAL_SRC charset.h \
1013 coding.h
$(config_h
)
1014 filelock.o
: filelock.c buffer.h paths.h
$(config_h
)
1015 filemode.o
: filemode.c
$(config_h
)
1016 frame.o
: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1017 buffer.h charset.h fontset.h
$(config_h
)
1018 fontset.o
: fontset.h fontset.c ccl.h charset.h frame.h
$(config_h
)
1019 getloadavg.o
: getloadavg.c
$(config_h
)
1020 indent.o
: indent.c frame.h window.h indent.h buffer.h
$(config_h
) termchar.h \
1021 termopts.h disptab.h region-cache.h charset.h
1022 insdel.o
: insdel.c window.h buffer.h INTERVAL_SRC blockinput.h charset.h\
1024 keyboard.o
: keyboard.c termchar.h termhooks.h termopts.h buffer.h charset.h \
1025 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
1026 systty.h systime.h dispextern.h intervals.h blockinput.h xterm.h
$(config_h
)
1027 keymap.o
: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
1028 puresize.h charset.h
$(config_h
)
1029 lastfile.o
: lastfile.c
$(config_h
)
1030 macros.o
: macros.c window.h buffer.h commands.h macros.h keyboard.h
$(config_h
)
1031 malloc.o
: malloc.c
$(config_h
)
1032 gmalloc.o
: gmalloc.c
$(config_h
)
1033 ralloc.o
: ralloc.c
$(config_h
)
1034 vm-limit.o
: vm-limit.c mem-limits.h
$(config_h
)
1035 marker.o
: marker.c buffer.h
$(config_h
)
1036 minibuf.o
: minibuf.c syntax.h dispextern.h frame.h window.h \
1037 buffer.h commands.h charset.h
$(config_h
)
1038 mktime.o
: mktime.c
$(config_h
)
1039 mocklisp.o
: mocklisp.c buffer.h
$(config_h
)
1040 msdos.o
: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h \
1041 termopts.h frame.h window.h
$(config_h
)
1042 process.o
: process.c process.h buffer.h window.h termhooks.h termopts.h \
1043 commands.h syssignal.h systime.h systty.h syswait.h frame.h \
1044 blockinput.h charset.h coding.h
$(config_h
)
1045 regex.o
: regex.c syntax.h buffer.h
$(config_h
) regex.h category.h charset.h
1046 region-cache.o
: region-cache.c buffer.h region-cache.h
1047 scroll.o
: scroll.c termchar.h dispextern.h frame.h
$(config_h
)
1048 search.o
: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
1049 blockinput.h category.h charset.h
$(config_h
)
1050 strftime.o
: strftime.c
$(config_h
)
1051 $(CC
) -c
$(CPPFLAGS
) $(ALL_CFLAGS
) -Dstrftime
=emacs_strftime
$<
1052 syntax.o
: syntax.c syntax.h buffer.h commands.h category.h charset.h \
1054 sysdep.o
: sysdep.c
$(config_h
) dispextern.h termhooks.h termchar.h termopts.h \
1055 frame.h syssignal.h systty.h systime.h syswait.h blockinput.h window.h
1056 term.o
: term.c termchar.h termhooks.h termopts.h
$(config_h
) cm.h frame.h \
1057 disptab.h keyboard.h charset.h coding.h
1058 termcap.o
: termcap.c
$(config_h
)
1059 terminfo.o
: terminfo.c
$(config_h
)
1060 tparam.o
: tparam.c
$(config_h
)
1061 undo.o
: undo.c buffer.h commands.h
$(config_h
)
1062 /* This hack is to discard any space that
cpp might put at the beginning
1063 of UNEXEC when substituting it in.
*/
1065 $(UNEXEC_ALIAS
): UNEXEC_SRC
$(config_h
)
1066 w16select.o
: w16select.c lisp.h dispextern.h frame.h blockinput.h
1067 widget.o
: widget.c xterm.h frame.h dispextern.h widgetprv.h \
1068 ..
/lwlib
/lwlib.h
$(config_h
)
1069 window.o
: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
1070 termhooks.h disptab.h keyboard.h
$(config_h
)
1071 xdisp.o
: xdisp.c macros.h commands.h indent.h buffer.h dispextern.h coding.h \
1072 termchar.h frame.h window.h disptab.h termhooks.h charset.h
$(config_h
)
1073 xfaces.o
: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1074 window.h charset.h
$(config_h
)
1075 xfns.o
: xfns.c buffer.h frame.h window.h keyboard.h xterm.h\
1076 ..
/lwlib
/lwlib.h blockinput.h paths.h charset.h
$(config_h
)
1077 xmenu.o
: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h keyboard.h \
1078 ..
/lwlib
/lwlib.h blockinput.h puresize.h msdos.h
$(config_h
)
1079 xterm.o
: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h \
1080 dispextern.h frame.h disptab.h blockinput.h systime.h syssignal.h \
1081 keyboard.h gnu.h sink.h sinkmask.h charset.h ccl.h fontset.h
$(config_h
)
1082 xselect.o
: xselect.c dispextern.h frame.h xterm.h blockinput.h charset.h \
1084 xrdb.o
: xrdb.c
$(config_h
)
1085 hftctl.o
: hftctl.c
$(config_h
)
1087 /* The files of Lisp proper
*/
1089 alloc.o
: alloc.c frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
1090 blockinput.h
$(config_h
) INTERVAL_SRC
1091 bytecode.o
: bytecode.c buffer.h syntax.h
$(config_h
)
1092 data.o
: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h
$(config_h
)
1093 eval.o
: eval.c commands.h keyboard.h blockinput.h
$(config_h
)
1094 floatfns.o
: floatfns.c
$(config_h
)
1095 fns.o
: fns.c commands.h
$(config_h
) frame.h buffer.h keyboard.h \
1096 frame.h window.h INTERVAL_SRC
1097 print.o
: print.c process.h frame.h window.h buffer.h keyboard.h charset.h\
1099 lread.o
: lread.c commands.h keyboard.h buffer.h paths.h charset.h
$(config_h
) \
1102 /* Text properties support
*/
1103 textprop.o
: textprop.c buffer.h window.h intervals.h
$(config_h
)
1104 intervals.o
: intervals.c buffer.h intervals.h keyboard.h puresize.h
$(config_h
)
1106 /* System-specific programs to be made.
1107 OTHER_FILES
, OBJECTS_SYSTEM and OBJECTS_MACHINE
1108 select which of these should be compiled.
*/
1110 sunfns.o
: sunfns.c buffer.h window.h
$(config_h
)
1112 ${libsrc}emacstool
: ${libsrc}emacstool.c
1113 cd
${libsrc}; ${MAKE} ${MFLAGS} emacstool
1115 rm -f temacs prefix-args core \
#* *.o libXMenu11.a liblw.a
1119 /**/# This is used in making a distribution.
1120 /**/# Do not use it on development directories!
1122 rm -f paths.h config.h Makefile Makefile.c ..
/etc
/DOC-
*
1123 maintainer-clean
: distclean
1124 @echo
"This command is intended for maintainers to use;"
1125 @echo
"it deletes files that may require special tools to rebuild."
1128 -rm -f emacs emacs-
* ..
/etc
/DOC
*
1129 extraclean
: distclean
1130 -rm -f
*~ \
#* m/?*~ s/?*~
1132 /* The rule for the
[sm
] files has to be written a little funny to
1133 avoid looking like a C comment to CPP.
*/
1134 SOURCES
= *.
[ch
] [sm
]/?
* COPYING Makefile.in \
1135 config.in paths.in README COPYING ChangeLog vms.pp-trans
1137 chmod u
+w
$(SOURCES
)
1143 /* Arrange to make a
tags table in ..
/lisp
, and another in this
dir
1144 which includes ..
/lisp
/TAGS by reference.
*/
1145 ctagsfiles
= [a-zA-Z
]*.
[hc
]
1146 lisptagsfiles
= ..
/lisp
/[a-zA-Z
]*.el
1147 TAGS
: $(srcdir)/$(ctagsfiles
)
1148 export DIR
; DIR
=`pwd`; cd
${srcdir}; \
1149 $$DIR/..
/lib-src
/etags
--include=..
/lisp
/TAGS \
1150 --regex
='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' $(ctagsfiles
)
1151 ${lispsource}TAGS
: ${lispsource}$(lisptagsfiles
)
1152 cd
${lispsource}; $(MAKE
) TAGS
1153 tags: TAGS
${lispsource}TAGS