home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / e20313sr.zip / emacs / 20.3.1 / src / makefile.in < prev    next >
Makefile  |  1999-07-31  |  39KB  |  1,216 lines

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