home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / amiga / vim46src.lha / vim-4.6 / src / Makefile < prev    next >
Encoding:
Makefile  |  1997-03-13  |  46.8 KB  |  1,047 lines

  1. #
  2. # Makefile for Vim on Unix                vim:ts=8:sw=8:tw=78
  3. #
  4. # This Makefile is loosely based on the GNU Makefile conventions found in
  5. # standards.info.
  6. #
  7. # Compiling Vim, summary:
  8. #
  9. #    3. make
  10. #    4. make install
  11. #
  12. # Compiling Vim, details:
  13. #
  14. # Edit this file for adjusting to your system. You should not need to edit any
  15. # other file for machine specific things!
  16. # The name of this file MUST be Makefile (note the uppercase 'M').
  17. #
  18. # 1. Edit this Makefile
  19. #    The defaults for Vim should work on most machines, but you may want to
  20. #    uncomment some lines or make other changes below to tune it to your
  21. #    system, compiler or preferences.
  22. #    - If you want a version of Vim that is small and starts up quickly, you
  23. #      might want to disable the GUI and X11:
  24. #      - Put a # before the lines with --enable-gui if you have Motif and/or
  25. #        Athena but don't want to make gvim (the GUI version of Vim with nice
  26. #        menus and scrollbars, but makes Vim bigger and startup slower).
  27. #      - Remove the # before the line "CONF_OPT_X = --without-x" if you have
  28. #        X11 but want to disable using X11 libraries.  Vim won't set the
  29. #        window titles then.
  30. #    - Uncomment one of CFLAGS and/or CC if you have something very special or
  31. #      want to tune the optimizer.
  32. #    - Search for the name of your system to see if it needs anything special.
  33. #    - A few versions of make use '.include "file"' instead of 'include file'.
  34. #      Adjust the include line below if yours does.
  35. #
  36. # 2. Edit feature.h
  37. #    Only if you do not agree with the default compile features, e.g.:
  38. #       - you want Vim to be as vi compatible as it can be
  39. #       - you want to use Emacs tags files
  40. #       - you want right-to-left editing (Hebrew)
  41. #       - you want 'langmap' support (Greek)
  42. #       - you want to remove features to make Vim smaller
  43. #
  44. # 3. "make"
  45. #    Will first run ./configure with the options in this file. Then it will
  46. #    start make again on this Makefile to do the compiling. You can also do
  47. #    this in two steps with:
  48. #        make config
  49. #        make
  50. #    The configuration phase creates/overwrites config.h and config.mk.
  51. #    Configure is created with autoconf.  It can detect different features of
  52. #    your system and act accordingly.  However, it is not correct for all
  53. #    systems.  Check this:
  54. #    - If you have X windows, but configure could not find it or reported
  55. #      another include/library directory then you wanted to use, you have to
  56. #      set CONF_OPT_X below.  You might also check the installation of xmkmf.
  57. #    - If you have --enable-gui=motif and have Motif on your system, but
  58. #      configure reports "checking for location of gui... <not found>", you
  59. #      have to set GUI_INC_LOC and GUI_LIB_LOC below.
  60. #    If you changed something, do this to run configure again:
  61. #        make distclean
  62. #        make config
  63. #        make
  64. #
  65. #    - If you do not trust the automatic configuration code, then inspect 
  66. #      config.h and config.mk, before starting the actual build phase. If
  67. #      possible edit this Makefile, rather than config.mk -- especially look
  68. #      the definitions of VIM_HLP and SYS_VIMRC_FILE below. Note that the
  69. #      configure phase overwrites config.mk and config.h again.
  70. #    - If you get error messages, find out what is wrong and try to correct it
  71. #      in this Makefile. You may need to do "make distclean" when you
  72. #      change anything that configure uses (e.g. switching from an old C
  73. #      compiler to an ANSI C compiler). Only when ./configure does something
  74. #      wrong you may need to change one of the other files. If you find a
  75. #      clean way to fix the problem, consider sending a note to the author of
  76. #      autoconf (bug-gnu-utils@prep.ai.mit.edu) or Vim (mool@oce.nl). Don't
  77. #      bother to do that when you made a hack solution for a non-standard
  78. #      system.
  79. #
  80. # 4. "make install"
  81. #    If the new Vim seems to be working OK you can install it and the
  82. #    documentation in the appropriate location. The default is "/usr/local".
  83. #    Change "PREFIX" below to change the location. "pathdef.c" will be
  84. #    compiled again after changing this to make the executable know where the
  85. #    help files are located.
  86. #    Note that any existing executable and documentation is removed or
  87. #    overwritten.  If you want to keep it you will have to make a backup copy
  88. #    first.
  89.  
  90. ### This Makefile has been succesfully tested on these systems.
  91. ### Check the (*) column for remarks, listed below.
  92. ### Later code changes may cause small problems, otherwise Vim is supposed to
  93. ### compile and run without problems.
  94.  
  95. #system:              configurations:             version (*) tested by:
  96. #-------------        ------------------------       -------  -  ----------
  97. #AIX 3                cc gcc         +X11 +GUI -GUI     4.0      Stephen Riehm
  98. #AIX 3.2.5          cc (not gcc)   -                  4.5  (M) Will Fiveash
  99. #AIX 4                cc             +X11 -GUI          3.27 (4) Axel Kielhorn
  100. #AIX 4.0              gcc 2.7.2      +X11 -GUI          4.4      Axel Kielhorn
  101. #AIX_4.1              gcc            +X11R6 -GUI        4.6c     Karsten Sievert
  102. #AIX 4.1.4            cc             +X11 +GUI          4.2      Joey Joosten
  103. #AIX 4.1.4            cc             +X11 +GUI          4.5  (5) Nico Bakker
  104. #A/UX 3.1.1           gcc            +X11               4.5  (6) Jim Jagielski
  105. #Alpha OSF1           cc gcc-2.6.3   +X11 +GUI          3.23     Robert Webb
  106. #Alpha OSF1 V3.2      cc             +X11               3.22     Heiko Nardmann
  107. #Alpha OSF1 V4.0      gcc            +GUI_Motif         4.6c     Heiko Nardmann
  108. #Apollo               cc             -X11 -GUI          3.23     Robert Webb
  109. #BSDI 2.1 (x86)       shlicc2 gcc-2.6.3 noX X11R6       4.5  (1) Jos Backus
  110. #BSD/OS 3.0 (x86)     gcc gcc-2.7.2.1 noX X11R6         4.6c (1) Jos Backus
  111. #ConvexOS                cc          +X11 Motif Athena  3.29     Lennart Schultz
  112. #dynix/ptx 1.4.0      cc             -X11 -GUI          3.21     Juergen Weigert
  113. #FreeBSD 2.0.5           gcc-2.6.3   X11R6              3.17     Bram Moolenaar
  114. #FreeBSD 2.1.6           gcc-2.6.3   X11R6 +Moo-Tiff    4.6b     Bram Moolenaar
  115. #FreeBSD 2.1.6           gcc-2.6.3   +X11 -GUI +Athena  4.6b     Bram Moolenaar
  116. #HP-UX 9.00           c89 cc         X11R5 Motif 1.2    3.24 (2) Bram Moolenaar
  117. #HP-UX 9.01 (400)     gcc 2.7.2     +X11 +Athena +Motif 4.4      Axel Kielhorn
  118. #HP-UX 9.01 (400)     cc89           +X11 +Motif 1.2    3.27     Axel Kielhorn
  119. #HP-UX 9.01 (700)     gcc            +X11 +GUI          4.6b     Mun Johl
  120. #HP-UX 9.01 (700)     gcc 2.7.2     +X11 +Athena +Motif 4.4      Axel Kielhorn
  121. #HP-UX 9.01 (700)     cc89          +X11 +Athena +Motif 3.27     Axel Kielhorn
  122. #HP-UX A.09.03U (SPP1000) gcc-2.5.8  +X11 Motif         3.29     Lennart Schultz
  123. #HP-UX 9.04E          cc gcc-2.6.3   X11R5 Motif 1.2    4.3      Kayhan Demirel
  124. #HP-UX 9.05           gcc-2.7.2      +X11R6.1 Athena3d  4.4      L.  Duperval
  125. #HP-UX 9.05 (700)     cc gcc c89     X11R5 Motif 1.2    4.6b (Y) Bram Moolenaar
  126. #HP-UX_9.05           gcc            +X11R6 +GUI Motif  4.6c     Karsten Sievert
  127. #HP-UX 9.07           c89            X11R5 Motif 1.2    3.23 (Y) Nikhil Patel
  128. #HP-UX 10.01A         cc gcc-2.6.3   X11R5 Motif 1.2    4.3      Kayhan Demirel
  129. #HP-UX 10.01          cc             X11R6  -GUI        3.20     Jiwei Wang
  130. #HP-UX 10.01          cc             -X11 -GUI          3.27     Juergen Weigert
  131. #HP-UX 10.10          c89            X11R5 Motif 1.2    3.23 (Z) Nikhil Patel
  132. #HP-UX 10.10          cc             X11R5 Motif 1.2    4.0      Stephen Riehm
  133. #HP-UX_10.20          cc             +X11R6 +GUI Motif  4.6b (Z) Karsten Sievert
  134. #HP-UX_10.20          gcc            +X11R6 +GUI Motif  4.6c     Karsten Sievert
  135. #HP SPP2000 HP-UX B.10.01  cc        -X11               4.6b     Lennart Schultz
  136. #Irix 5.2/5.3         cc gcc-2.6.3   +X11 +GUI          3.22     Robert Webb
  137. #Irix 5.3             cc             -X11 -GUI          3.27     Juergen Weigert
  138. #Irix 5.3             cc gcc-2.7.2   +X11 +Motif        4.4      Ives Aerts
  139. #Irix-5.3 (IP22 mips)    gcc-2.7.2   +X11 Motif Athena  3.29     Lennart Schultz
  140. #Irix 5.3                gcc-2.6.3   +X11 +GUI Motif    4.2      Eric Fischer
  141. #Irix 6.3 (O2)        cc             ?                  4.5  (L) Edouard Poor
  142. #Irix 6.2             cc             +X11 +GUI (Motif)  3.24     Bruce Templeton
  143. #Irix 64 bit                                            4.5  (K) Jon Wright
  144. #KSR OS R1.2.2        cc             -X11 -GUI          3.21     Juergen Weigert
  145. #Linux/LST            gcc            +X11R6 +GUI=Athena 3.27     Juergen Weigert
  146. #Linux 1.2.13 (x86,ELF)  gcc-2.7.2   +X11 +GUI Athena   4.1      Eric Fischer
  147. #Linux 1.2.13-ELF        gcc-2.7.0   X11R6 +GUI         3.29     Tony Nugent
  148. #Linux 1.2.13            gcc-2.7.0   +X11 -GUI X11R6    3.25     Robert Colon
  149. #Linux 1.2.13-ELF        gcc-2.7.0   -X11 -GUI          3.21     Juergen Weigert
  150. #Linux 1.3.3 #2 i586  gcc 2.6.3      +X11R6 +GUI        3.26     Renate Schmidt
  151. #Linux 1.3.73-ELF        gcc-2.7.0   +X11 -GUI          3.22     Paul Slootman
  152. #Linux 1.3.94-ELF        gcc-2.7.0   +X11 +GUI Athena   3.25     Paul Slootman
  153. #Linux 1.3.97-ELF        gcc-2.7.2   +X11 +GUI Athena   3.26     Iva Cabric
  154. #Linux 1.3.98-ELF        gcc-2.7.2   +X11 Athena Motif  3.27     Bill Foster
  155. #Linux 1.3.39         gcc-2.7.2      +X11R6 Athena3d    4.3      L.  Duperval
  156. #Linux 1.99.7            gcc-2.7.0   +X11 Athena        3.29     Lennart Schultz
  157. #Linux 1.99.7            gcc-2.7.0   +X11 +GUI Athena   3.29     Paul Slootman
  158. #Linux 2.0               gcc-2.7.2   Infomagic Motif    4.3  (3) Ronald Rietman
  159. #Linux 2.0.10            gcc-2.7.0   +X11 +GUI Athena   4.4      Paul Slootman
  160. #Linux 2.0.22             gcc-2.7.2.1 +X11 +GUI Athena    4.5     Tony Nugent
  161. #Linux 2.0.28 (Alpha)    gcc-2.7.2   +X11 +GUI Athena   4.6c     Paul Slootman
  162. #Linux 2.0.29            gcc-2.7.0   +X11 +GUI Athena   4.6c     Paul Slootman
  163. #mot88 R32V3          cc             -X11 -GUI          3.21     Juergen Weigert
  164. #NCR Tower 32/450 SVR3   cc          -X11               3.22     Paul Slootman
  165. #NCR Tower 32/450 SVR3   gcc-2.4.3   -X11               3.22     Paul Slootman
  166. #NEC UP4800 UNIX_SV 4.2MP  cc      +X11R6 Motif,Athena  4.6b (Q) Lennart Schultz
  167. #NetBSD 1.0A             gcc-2.4.5   -X11 -GUI          3.21 (X) Juergen Weigert
  168. #NetBSD 1.1A             gcc-2.7.2   +X11 +GUI  Athena  3.27     Bill Foster
  169. #NetBSD 1.2 (i386)       gcc-2.7.2   +X11 -GUI          4.6c     Paul Slootman
  170. #NeXTstep 3.0 (68k)      gcc-2.6.3   +X11 +GUI Athena   4.2      Eric Fischer
  171. #QNX 4.2                 wcc386-10.6 noX                4.2  (D) G.F. Desrochers
  172. #QNX 4.23                Watcom      -X11               4.2  (F) John Oleynick
  173. #SCO Unix 3.2         cc             +X11 +Motif        4.4  (G) Darren Hiebert
  174. #SCO Unix 3.2v4.2     cc             -X11               3.22     Paul Slootman
  175. #SCO Unix v3.2.5      cc             +X11 Motif         3.27 (C) M. Kuperblum
  176. #SCO 4.0 level 3.2.4                 -X11               3.19     Glauber
  177. #SCO Open Server 5                   +X11 +GUI Motif    3.28 (A) J.C. van Winkel
  178. #Sequent/ptx V1.4.0   cc gcc-2.2.2   +X11R5 -GUI        3.27     Juergen Weigert
  179. #Sinix 5.41 (x86 SVR4)   gcc-2.4.3   -X11               4.6c     Paul Slootman
  180. #SNI Targon31 TOS 4.1.11 cc          -X11               3.22     Paul Slootman
  181. #SNI Targon31 TOS 4.1.11 gcc-2.4.5   +X11 -GUI          4.6c (B) Paul Slootman
  182. #Solaris 2.3 (SunOS 5.3) gcc-2.6.3   X openwin          3.18     Aswin Kumar
  183. #Solaris 2.3          gcc            +X11R5 +GUI Athena 4.5      Karsten Sievert
  184. #Solaris 2.4 (x86)       gcc-2.6.0   -X11               3.29     Paul Slootman
  185. #Solaris 2.4 (x86)       gcc-2.6.0   +X11 -GUI          3.25     Paul Slootman
  186. #Solaris 2.4 (x86)       gcc-2.6.0   +X11 +GUI openwin  3.29     Paul Slootman
  187. #Solaris 2.5 (x86)       gcc-2.6.0   +X11 +GUI Motif    4.4      Paul Slootman
  188. #Solaris 2.4 (sun4m)     gcc-2.7.2   +X11 Motif Athena  3.29     Lennart Schultz
  189. #Solaris 2.4 (Sparc)  cc             +X11 +GUI          3.29 (9) Glauber
  190. #Solaris 2.4 sun4m    gcc 2.7.2      +X11R6 Motif       4.4      L.  Duperval
  191. #Solaris 2.4 sun4m    gcc 2.7.2      +X11 -GUI          4.4      L.  Duperval
  192. #Solaris 2.4          gcc-2.7.2      +X11 +GUI Motif    3.26     Iva Cabric
  193. #Solaris 2.4/2.5      clcc           +X11 -GUI  openwin 3.20 (7) Robert Colon
  194. #Solaris 2.4/2.5      cc (SUNWspro)  +X11 -GUI  openwin 3.25     Robert Colon
  195. #Solaris 2.5          cc             -X11 -GUI          3.27     Juergen Weigert
  196. #Solaris 2.5          cc        +X11=openwin +GUI=Motif 3.27     Juergen Weigert
  197. #Solaris 2.5          gcc-2.7.2      +X11 +GUI Motif    3.26     Iva Cabric
  198. #Solaris 2.5.1(sun4m) gcc 2.7.2.2.f.1+X11R6 +GUI        4.6a     Renate Schmidt
  199. #Solaris 2.5 (sun4m)  gcc-2.7.2      +X11R6 +GUI (CDE)  4.6b     Andrew Large
  200. #Solaris 2.5 (sun4m)  cc (SC4.0)     +X11R6 +GUI (CDE)  4.6b (E) Andrew Large
  201. #Solaris 2.5 (sun4u)  gcc-2.7.2      +X11 Motif Athena  3.29     Lennart Schultz
  202. #Solaris 2.5          cc             +X11 +GUI Athena   4.2  (9) Sonia Heimann
  203. #Solaris 2.5.1        gcc            +X11R6 +GUI Motif  4.6c     Karsten Sievert
  204. #Solaris 2.5.1 (sun4m) gcc (2.7.2.1) +GUI_Motif +X11R6  4.6c     J.M. Felderhoff
  205. #Solaris 2.5.1 (x86)  gcc-2.7.2      -X11               4.6c     Paul Slootman
  206. #SunOS 4.1.1          gcc 2.7.2      +X11 -GUI          4.0  (J) L.  Duperval
  207. #SunOS 4.1.1 (sun4c)  cc             -X11               3.29 (J) Lennart Schultz
  208. #SunOS 4.1.2 (sun4c)  cc             -X11               3.29 (J) Lennart Schultz
  209. #SunOS 4.1.2 (sun4)   gcc 2.7.2      +X11R6 -GUI        4.1  (J) Renate Schmidt
  210. #SunOS 4.1.3 (sun4c)  cc             -X11               3.29 (J) Lennart Schultz
  211. #SunOs 4.1.3/4        cc             +X11 -GUI  openwin 3.25 (J) Robert Colon
  212. #SunOS 4.1.3          cc gcc-2.7.0   -X11 -GUI          3.27 (J) Juergen Weigert
  213. #SunOS 4.1.3          cc gcc-2.7.0   +X11R5 +GUI=Athena 3.27 (J) Juergen Weigert
  214. #SunOS 4.1.3 (sun4c)  gcc (2.7.2.1)  +GUI_Motif +X11R6  4.6c     J.M. Felderhoff
  215. #SunOS 4.1.4          cc gcc-2.6.3   +X11 +GUI          3.23 (J) Robert Webb
  216. #SunOS 4.1.4 (sun4c)  gcc-2.7.2      +X11 Athena        3.29 (J) Lennart Schultz
  217. #SunOS 4.1.3/4        gcc            +X11R5 +GUI Athena 4.5  (J) Karsten Sievert
  218. #SunOS_4.1.3          acc            -GUI               4.6b     Karsten Sievert
  219. #SunOS 4.1.3          gcc            +X11R6 +GUI Athena 4.6c     Karsten Sievert
  220. #SUPER-UX 6.2 (NEC SX-4)   cc      +X11R6 Motif,Athena  4.6b (P) Lennart Schultz
  221. #Ultrix               cc             -X11 +X11          4.3      Bram Moolenaar
  222. #Ultrix 4.2           cc             -X11 +X11          4.4  (H) Darren Hiebert
  223. #Unisys 6035          cc              X11 Motif         3.29 (8) Glauber
  224. #UnixWare 4.2         cc gcc-2.6.3    X11               3.19     Robert Webb
  225. #UnixWare             cc             +X11 -GUI          3.23     Robert Webb
  226. #UnixWare             cc             +X11R5 +GUI Motif  3.23     Thanh Ma
  227. #UnixWare             cc             +X11R5 +GUI Athena 3.24     Thanh Ma
  228.  
  229. # (*)  Remarks:
  230. #
  231. # (1)  Uncomment line below for shlicc2
  232. # (2)  Needs c89 on a 400 system, uncomment line below
  233. # (3)  Infomagic Motif needs GUI_LIB_LOC and GUI_INC_LOC set, see below.
  234. #      And add "-lXpm" to GUI_LIBS.
  235. # (4)  For cc the optimizer must be disabled (use CFLAGS= after running
  236. #      configure) (symptom: ":set termcap" output looks weird).
  237. # (5)  Compiler may need -qmaxmem argument, see below.
  238. # (6)  See below for a few lines to uncomment
  239. # (7)  See below for lines which enable the use of clcc
  240. # (8)  Needs some EXTRA_LIBS, search for Unisys below
  241. # (9)  Needs an extra compiler flag to compile gui_at_sb.c, see below.
  242. # (A)  needs EXTRA_LIB, see below
  243. # (B)  Can't compile GUI because there is no waitpid()...  Disable GUI below.
  244. # (C)  Force the use of curses instead of termcap, see below.
  245. # (D)  Uncomment lines below for QNX
  246. # (E)  You might want to use termlib instead of termcap, see below.
  247. # (F)  See below for instructions.
  248. # (G)  See line for GUI_LIBS below.
  249. # (H)  Need to compile normal.c without optimizer, otherwise compiler hangs.
  250. # (J)  If you get undefined symbols, see below for a solution.
  251. # (K)  See lines to uncomment below for machines with 64 bit pointers.
  252. # (L)  For Silicon Graphics O2 workstations remove "-lnsl" from config.mk
  253. # (M)  gcc version cygnus-2.0.1 does NOT work (symptom: "dl" deletes two
  254. #      characters instead of one).
  255. # (P)  For SuperUX 6.2 on NEC SX-4 see a few lines below to uncomment.
  256. # (Q)  For UNIXSVR 4.2MP on NEC UP4800 see below for lines to uncomment.
  257. # (X)  Need to use the .include "config.mk" line below
  258. # (Y)  See line with c89 below
  259. # (Z)  See lines with cc or c89 below
  260.  
  261. #DO NOT CHANGE the next line, we need it for configure to find the compiler
  262. #instead of using the default from the "make" program.
  263. #Use a line further down to change the value for CC.
  264. CC=
  265.  
  266. # Change and use these defines if configure cannot find your Motif stuff.
  267. # Unfortunately there is no "standard" location for Motif.
  268. # These defines can contain a single directory (recommended) or a list of
  269. # directories (for when you are working with several systems). The LAST
  270. # directory that exists is used.
  271. # When changed, run "make distclean" next!
  272. #GUI_INC_LOC = /usr/include/Motif2.0 /usr/include/Motif1.2
  273. #GUI_LIB_LOC = /usr/lib/Motif2.0 /usr/lib/Motif1.2
  274. ### Use these two lines for Infomagic Motif (3)
  275. #GUI_INC_LOC = /usr/X11R6/include
  276. #GUI_LIB_LOC = /usr/X11R6/lib
  277.  
  278. ######################## config.mk ########################
  279. # At this position config.mk is included. When starting from the
  280. # distribution it is almost empty. After running ./configure it contains
  281. # settings that have been discovered for your system. Settings below this
  282. # include override settings in config.mk!
  283.  
  284. # (X) How to include config.mk depends on the version of "make" you have, if
  285. #     the current choice doesn't work, try the other one.
  286.  
  287. include config.mk
  288. #.include "config.mk"
  289.  
  290. # Include the configuration choices first, so we can override everything
  291. # below. As shipped, this file contains a target that causes to run
  292. # configure. Once configure was run, this file contains a list of 
  293. # make variables with predefined values instead. Thus any second invocation
  294. # of make, will buid Vim.
  295.  
  296. # You can give a lot of options to configure. 
  297. # Change this to your desire and do 'make config' afterwards
  298.  
  299. ### For creating Vim with GUI (gvim)
  300. # Comment these all out when you don't want to get the GUI version, although
  301. # you have Motif and/or Athena. (B)
  302. # When using "yes" configure will use Motif if it can be found, otherwise use
  303. # Athena when it can be found.
  304. # If the Motif and Athena files are not found, GUI is disabled automatically
  305. CONF_OPT_GUI = --enable-gui=yes
  306. #CONF_OPT_GUI = --enable-gui=motif
  307. #CONF_OPT_GUI = --enable-gui=athena
  308.  
  309. ### For creating a plain Vim without any X11 related fancies use this one:
  310. ### (otherwise Vim configure will try to include xterm titlebar access)
  311. ### Also disable the GUI above, otherwise it will be included anyway.
  312. ### When both GUI and X11 have been disabled this may save about 15% of the
  313. ### code and make Vim startup quicker.
  314. #CONF_OPT_X = --without-x
  315.  
  316. ### If you have multiple X11 derivates installed, you may wish to specify
  317. ### which one to use. This here selects openwin (as found on sun).
  318. ### Select nothing to let configure choose.
  319. #XROOT = /usr/openwin
  320. #CONF_OPT_X = --x-include=$(XROOT)/include --x-libraries=$(XROOT)/lib
  321.  
  322. ### COMPILER -- the default from configure will mostly be fine, no need to
  323. ### change this, just an example. If a compiler is defined here, configure
  324. ### will use it rather than probing for one. It is dangerous to change this
  325. ### after configure was run. Make will use your choice then -- but beware: 
  326. ### Many things may change with another compiler. It is wise to run 'make
  327. ### distclean' and start all over again.
  328. #CC = cc
  329. #CC = gcc
  330.  
  331. ###
  332. ### COMPILER FLAGS - change as you please. Either before running configure
  333. ### or afterwards. For examples see below.
  334. ### Linux: When using -g, you will probably get a statically linked
  335. ### executable!!
  336. ### When not defined, configure will try to use -O2 -g for gcc and -O for cc.
  337. #CFLAGS = -g
  338. #CFLAGS = -O
  339. #CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
  340.  
  341. ### Often used for GCC: optimizing, lot of optimizing, debugging
  342. #CFLAGS = -O2 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
  343. #CFLAGS = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
  344. #CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
  345.  
  346. #####################################################
  347. ###  Specific systems, check if yours is listed!  ###
  348. #####################################################
  349.  
  350. ### Uncomment things here only if the values chosen by configure are wrong.
  351. ### It's better to adjust configure.in and run autoconf, if you can!
  352. ### Then send the required changes to configure.in to the bugs list.
  353.  
  354. ### (1) BSD/OS 2.0.1, 2.1 or 3.0 using shared libraries
  355. ###
  356. #CC = shlicc2
  357. #CFLAGS = -O2 -g -m486 -Wall -Wshadow -Wmissing-prototypes -fno-builtin
  358.  
  359. ### (2) HP-UX 9.01 on a 400 workstation with a cc that complains about space
  360. ### (Y) HP-UX 9.07 with the ANSI compiler
  361. #CC = c89 -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_POSIX_SOURCE
  362.  
  363. ### (Z) HP-UX 10.10 with the ANSI compiler
  364. ###     Will you gues at HP finally decide which options should be used?!?!
  365. #CC = c89 -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_XOPEN_SOURCE_EXTENDED
  366.  
  367. ### (Z) HP-UX 10.20 with the ANSI compiler
  368. ###    Both of these lines probably work the same.
  369. ###    Maybe this works for all HP-UX 9.xx and 10.xx systems?
  370. #CC = cc -Aa -D_HPUX_SOURCE
  371. #CC = c89 -D_HPUX_SOURCE
  372.  
  373. ###     For HP-UX: Disable the use of a different set of digraphs (when
  374. ###     _INCLUDE_HPUX_SOURCE is defined), or force the use of a different set
  375. ###    of digraphs).  Uncomment ONE of these lines.  After changing this do
  376. ###    "touch digraph.c; make".
  377. #EXTRA_DEFS = -DNO_HPUX_DIGRAPHS
  378. #EXTRA_DEFS = -DHPUX_DIGRAPHS
  379.  
  380. ### (5) AIX 4.1.4 with cc
  381. #CFLAGS = -O -qmaxmem=8092
  382.  
  383. ### (7) Solaris 2.4/2.5 with Centerline compiler
  384. #CC = clcc
  385. #X_LIBS_DIR = -L/usr/openwin/lib -R/usr/openwin/lib
  386. #CFLAGS = -O
  387.  
  388. ### (8) Unisys 6035 (use the first with GUI, the second without)
  389. #EXTRA_LIBS = -lsocket -lgen
  390. #EXTRA_LIBS = -lnsl -lsocket -lgen
  391.  
  392. ### (9) Solaris 2.x with cc (SunPro), using Athena.
  393. ###     Only required for compiling gui_at_sb.c.
  394. ###     Symptom: "identifier redeclared: vim_XawScrollbarSetThumb"
  395. ###    Use one of the lines (either Full ANSI or no ANSI at all)
  396. #CFLAGS = $(CFLAGS) -Xc
  397. #CFLAGS = $(CFLAGS) -Xs
  398.  
  399. ### When builtin functions cause problems with gcc (for Sun 4.1.x)
  400. #CFLAGS = -O2 -Wall -traditional -Wno-implicit
  401.  
  402. ### Apollo DOMAIN (with SYSTYPE = bsd4.3) (TESTED for version 3.0)
  403. #EXTRA_DEFS = -DDOMAIN
  404. #CFLAGS= -O -A systype,bsd4.3
  405.  
  406. ### Irix 4.0 & 5.2 (Silicon Graphics Machines, __sgi will be defined)
  407. # Not needed for Irix 5.3, Ives Aerts reported
  408. #EXTRA_LIBS = -lmalloc -lc_s
  409.  
  410. ### Coherent 4.2.10 on Intel 386 platform
  411. #EXTRA_DEFS = -Dvoid=int
  412. #EXTRA_LIBS = -lterm -lsocket
  413.  
  414. ### SCO 3.2, with different library name for terminfo
  415. #EXTRA_LIBS = -ltinfo
  416.  
  417. ### Solaris 2.3 with X11 and specific cc
  418. #CC=/opt/SUNWspro/bin/cc -O -Xa -v -R/usr/openwin/lib
  419.  
  420. ### UTS2 for Amdahl UTS 2.1.x
  421. #EXTRA_DEFS = -DUTS2
  422. #EXTRA_LIBS = -lsocket
  423.  
  424. ### UTS4 for Amdahl UTS 4.x
  425. #EXTRA_DEFS = -DUTS4 -Xa
  426.  
  427. ### USL for Unix Systems Laboratories (SYSV 4.2)
  428. #EXTRA_DEFS = -DUSL
  429.  
  430. ### RISCos on MIPS without X11
  431. #EXTRA_DEFS = -DMIPS
  432.  
  433. ### RISCos on MIPS with X11
  434. #EXTRA_LIBS = -lsun
  435.  
  436. ### (6)  A/UX 3.1.1 with gcc (Jim Jagielski)
  437. #CC= gcc -D_POSIX_SOURCE
  438. #CFLAGS= -O2
  439. #EXTRA_LIBS = -lposix -lbsd -ltermcap -lX11
  440.  
  441. ### (A)  SCO Open Server 5 (Jan Christiaan van Winkel)
  442. ###      Also use the TERM_LIB below!
  443. #EXTRA_LIBS = -lgen
  444.  
  445. ### (D)  QNX (by G.F. Desrochers)
  446. ###     Also change "STRIP = strip" into "STRIP = echo" below
  447. #CFLAGS = -g -O -mf -4
  448.  
  449. ### (F)  QNX (by John Oleynick)
  450. # 1. If you don't have an X server: Comment out CONF_OPT_GUI and uncomment
  451. #    CONF_OPT_X = --without-x. 
  452. # 2. make config
  453. # 3. edit config.mk and remove -ldir and -ltermcap from LIBS.  It doesn't
  454. #     have -ldir (does config find it somewhere?) and -ltermcap has at
  455. #     least one problem so I use termlib.o instead.  The problem with
  456. #     termcap is that it segfaults if you call it with the name of 
  457. #     a non-existent terminal type.
  458. # 4. edit config.h and add #define USE_TMPNAM
  459. # 5. add termlib.o to OBJ
  460. # 6. make
  461.  
  462. ### (K)  for SGI Irix machines with 64 bit pointers ("uname -s" says IRIX64)
  463. ###      suggested by Jon Wright <jon@gate.sinica.edu.tw>
  464. ###      tested on R8000 IRIX6.1 Power Indigo2
  465. # either (for 64 bit pointers) uncomment the following line
  466. #GUI_LIB_LOC = /usr/lib64
  467. # then
  468. # 1) make config
  469. # 2) edit config.mk and delete the -lelf entry in the LIBS line
  470. # 3) make
  471. #
  472. # or (for 32bit pointers) uncomment the following line
  473. #EXTRA_DEFS = -n32
  474. #GUI_LIB_LOC = /usr/lib32
  475. # then
  476. # 1) make config
  477. # 2) edit config.mk, add -n32 to LDFLAGS
  478. # 3) make
  479. ###
  480.  
  481. ### (P)  SuperUX 6.2 on NEC SX-4 (Lennart Schultz)
  482. #GUI_INC_LOC = /usr/include
  483. #GUI_LIB_LOC = /usr/lib
  484. #EXTRA_LIBS = -lgen
  485.  
  486. ### (Q) UNIXSVR 4.2MP on NEC UP4800 (Lennart Schultz)
  487. #GUI_INC_LOC = /usr/necccs/include
  488. #GUI_LIB_LOC = /usr/necccs/lib/X11R6
  489. #XROOT = /usr/necccs
  490. #CONF_OPT_X = --x-include=$(XROOT)/include --x-libraries=$(XROOT)/lib/X11R6
  491. #EXTRA_LIBS = -lsocket -lgen
  492.  
  493. ### (C)  On SCO Unix v3.2.5 (and probably other versions) the termcap library,
  494. ###      which is found by configure, doesn't work correctly.  Symptom is the
  495. ###     error message "Termcap entry too long".  Uncomment the next line.
  496. ### after changing this, you need to do "make distclean; make".
  497. #TERM_LIB = -lcurses
  498.  
  499. ### (E)  If you want to use termlib library instead of the automatically found
  500. ###      one.  After changing this, you need to do "make distclean; make".
  501. #TERM_LIB = -ltermlib
  502.  
  503. ### If you want to use ncurses library instead of the automatically found one
  504. ### after changing this, you need to do "make distclean; make".
  505. #TERM_LIB = -lncurses
  506.  
  507. ##################### end of system specific lines ###################
  508.  
  509. ### Name of target(s)
  510. TARGET = vim
  511. GTARGET = gvim
  512.  
  513. ### Names of the tools that are also made
  514. TOOLS = ctags/ctags xxd/xxd
  515.  
  516. ### Installation directory. Default from configure is "/usr/local".
  517. ### EXEC_PREFIX is for the executable, PREFIX is for other files (they may be
  518. ### different when using different architectures for the executable and a
  519. ### common directory for the other files).
  520. ###
  521. ### Uncomment the next two lines to install in your home directory.
  522. #PREFIX      = $(HOME)
  523. #EXEC_PREFIX = $(HOME)
  524. ### Uncomment the next line only if the value of PREFIX is different from
  525. ### EXEC_PREFIX
  526. #PREFIX_MKDIR = $(PREFIX)
  527.  
  528. ### Location of executable
  529. BINLOC = $(EXEC_PREFIX)/bin
  530.  
  531. ### Location of man page
  532. MANLOC = $(PREFIX)/man
  533. MANDIR = /man1
  534.  
  535. ### Location of help files and system global vimrc
  536. ### The default for HELPDIR comes from configure: "/share" or "/lib"
  537. #HELPDIR = /lib
  538. HELPSUBDIR = /vim
  539. HELPLOC = $(PREFIX)$(HELPDIR)
  540. HELPSUBLOC = $(HELPLOC)$(HELPSUBDIR)
  541.  
  542. ### These go into pathdef.c
  543. VIM_HLP = $(HELPSUBLOC)/vim_help.txt
  544. SYS_VIMRC_FILE  = $(HELPSUBLOC)/vimrc
  545. SYS_GVIMRC_FILE = $(HELPSUBLOC)/gvimrc
  546.  
  547. ### Program to run on installed binary
  548. STRIP = strip
  549.  
  550. ### Permissions for vim binary
  551. BINMOD = 755
  552.  
  553. ### Permissions for man page
  554. MANMOD = 644
  555.  
  556. ### Permissions for help files
  557. HELPMOD = 644
  558.  
  559. ### Permissions for bin/man/help directories that are created
  560. DIRMOD = 755
  561.  
  562. # Where to copy the man and help files from
  563. HELPSOURCE = ../doc
  564.  
  565. # If you are using Linux, you might want to use this to make vim the
  566. # default vi editor, it will create a link from vi to Vim when doing
  567. # "make install".
  568. #LINKIT = -ln -f -s $(BINLOC)/$(TARGET) /usr/bin/vi
  569.  
  570. ###
  571. ### GRAPHICAL USER INTERFACE (GUI).
  572. ### 'configure --enable-gui' can enable one of these for you if you did set
  573. ### a corresponding CONF_OPT_GUI above and have X11.
  574. ### Override configures choice by uncommenting one of the following lines (The
  575. ### first is an explicit enable, the second is an explicit disable):
  576. # MOTIF_COMMENT =
  577. # MOTIF_COMMENT = ZZZ
  578.  
  579. # Some NeXT system's make cannot handle this, you will get a syntax error.
  580. # Use gmake instead or put a # in front of the lines starting with '$'.
  581.  
  582. ### Motif GUI interface. 
  583. $(MOTIF_COMMENT)GUI_INCL  = gui.h
  584. $(MOTIF_COMMENT)GUI_SRC   = gui.c gui_motif.c gui_x11.c pty.c
  585. $(MOTIF_COMMENT)GUI_OBJ   = gui.o gui_motif.o gui_x11.o pty.o
  586. $(MOTIF_COMMENT)GUI_DEFS  = -DUSE_GUI_MOTIF $(NARROW_PROTO)
  587. $(MOTIF_COMMENT)GUI_IPATH = -I$(GUI_INC_LOC)
  588. $(MOTIF_COMMENT)GUI_LIBS_DIR = -L$(GUI_LIB_LOC)
  589. $(MOTIF_COMMENT)GUI_LIBS  = -lXm -lXt
  590. $(MOTIF_COMMENT)LINKGVIM = -rm -f $(BINLOC)/$(GTARGET); cd $(BINLOC); ln -s $(TARGET) $(GTARGET)
  591.  
  592. #For SunOS (Solaris) you might want to use this line:
  593. #$(MOTIF_COMMENT)GUI_LIBS_DIR = -L$(GUI_LIB_LOC) -R$(GUI_LIB_LOC)
  594.  
  595. # (G) If you get an unreferenced symbol "_XEditResCheckMessages":
  596. #$(MOTIF_COMMENT)GUI_LIBS  = -lXm -lXt -lXmu
  597.  
  598. # ATHENA_COMMENT =
  599. # ATHENA_COMMENT = ZZZ
  600. ### Athena Widget GUI interface.
  601. ### Use Xaw3d if you have it, makes the menus looks nicer
  602. #XAW_LIB = -lXaw3d
  603. XAW_LIB = -lXaw
  604.  
  605. $(ATHENA_COMMENT)GUI_INCL  = gui.h
  606. $(ATHENA_COMMENT)GUI_SRC   = gui.c gui_athena.c gui_x11.c pty.c gui_at_sb.c
  607. $(ATHENA_COMMENT)GUI_OBJ   = gui.o gui_athena.o gui_x11.o pty.o gui_at_sb.o
  608. $(ATHENA_COMMENT)GUI_DEFS  = -DUSE_GUI_ATHENA $(NARROW_PROTO)
  609. $(ATHENA_COMMENT)GUI_IPATH = -I$(GUI_INC_LOC)
  610. $(ATHENA_COMMENT)GUI_LIBS_DIR = -L$(GUI_LIB_LOC)
  611. $(ATHENA_COMMENT)GUI_LIBS  = $(XAW_LIB) -lXt -lXmu
  612. $(ATHENA_COMMENT)LINKGVIM = -rm -f $(BINLOC)/$(GTARGET); cd $(BINLOC); ln -s $(TARGET) $(GTARGET)
  613.  
  614. ### (J)  Sun OpenWindows 3.2 (SunOS 4.1.x) or earlier that produce these ld
  615. #     errors:  ld: Undefined symbol
  616. #              _get_wmShellWidgetClass
  617. #              _get_applicationShellWidgetClass
  618. # then you need to get patches 100512-02 and 100573-03 from Sun.  In the
  619. # meantime, uncomment the following GUI_LIBS definition as a workaround:
  620. #GUI_LIBS = -lXaw -Bstatic -lXmu -Bdynamic -lXt
  621.  
  622. # GUI files used for making ctags
  623. ALL_GUI_INCL = gui.h gui_at_sb.h
  624. ALL_GUI_SRC  = gui.c gui_motif.c gui_x11.c gui_athena.c gui_at_sb.c
  625. ALL_GUI_PRO  = gui.pro gui_motif.pro gui_athena.pro gui_x11.pro
  626.  
  627. ### our grand parent directory should know who we are...
  628. ### only used for "make tar"
  629. VIMVERSION = `eval "basename \`cd ../; pwd\`"`
  630.  
  631. ### Command to create dependencies based on #include "..."
  632. ### prototype headers are ignored due to -DPROTO, system 
  633. ### headers #include <...> are ignored if we use the -MM option, as
  634. ### e.g. provided by gcc-cpp.
  635. ### Include USE_GUI to get gependency on gui.h
  636. CPP_DEPEND = $(CC) -M$(CPP_MM) -DPROTO -DUSE_GUI $(DEFS) $(GUI_DEFS) $(EXTRA_DEFS) $(GUI_IPATH) $(X_CFLAGS)
  637.  
  638. # flags for cproto
  639. #     __inline and __attribute__ are not recognized by cproto
  640. #     maybe the "/usr/bin/cc -E" has to be adjusted for some systems
  641.  
  642. NO_ATTR = -D__inline= -D"__attribute__\\(x\\)="
  643.  
  644. # This is for cproto 3.5 patchlevel 3:
  645. # PROTO_FLAGS = -f4 -m__PARMS -d -E"$(CPP)" $(NO_ATTR)
  646. #
  647. # Use this for cproto 3 patchlevel 6 or below (use "cproto -V" to check):
  648. # PROTO_FLAGS = -f4 -m__PARMS -d -E"$(CPP)" $(NO_ATTR)
  649. # Use this for cproto 3 patchlevel 7 or above (use "cproto -V" to check):
  650. PROTO_FLAGS = -m -M__PARMS -d -E"$(CPP)" $(NO_ATTR)
  651.  
  652.  
  653. ################################################
  654. ##   no changes required below this line      ##
  655. ################################################
  656.  
  657. SHELL = /bin/sh
  658.  
  659. .SUFFIXES:
  660. .SUFFIXES: .c .o .pro
  661.  
  662. ALL_CFLAGS = $(DEFS) $(GUI_DEFS) $(EXTRA_DEFS) $(GUI_IPATH) $(CFLAGS) $(X_CFLAGS)
  663.  
  664. ALL_LIBS = $(GUI_LIBS_DIR) $(X_LIBS_DIR) $(GUI_LIBS) $(X_PRE_LIBS) $(GUI_X_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LIBS)
  665.  
  666. PFLAGS = $(PROTO_FLAGS) -DPROTO $(DEFS) $(GUI_DEFS) $(EXTRA_DEFS) $(GUI_IPATH) $(X_CFLAGS)
  667.  
  668. #     BASIC_INCL and BASIC_SRC: files that are always used
  669. #         GUI_INCL and GUI_SRC: extra GUI files for current configuration
  670. # ALL_GUI_INCL and ALL_GUI_SRC: all GUI files
  671. #
  672. #                 INCL and SRC: files used for current configuration
  673. #                     ALL_INCL: files used for make depend and ctags
  674. #                      ALL_SRC: files used for make depend
  675.  
  676. BASIC_INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h unix.h \
  677.     unixunix.h structs.h proto.h osdef.h config.h
  678.  
  679. INCL =  $(BASIC_INCL) $(GUI_INCL)
  680.  
  681. ALL_INCL = $(BASIC_INCL) $(ALL_GUI_INCL)
  682.  
  683. BASIC_SRC =    alloc.c buffer.c charset.c \
  684.     cmdcmds.c cmdline.c csearch.c \
  685.     digraph.c edit.c fileio.c getchar.c \
  686.     help.c linefunc.c main.c mark.c \
  687.     memfile.c memline.c message.c \
  688.     misccmds.c normal.c ops.c option.c \
  689.     pathdef.c quickfix.c regexp.c regsub.c screen.c \
  690.     search.c tables.c tag.c term.c \
  691.     undo.c unix.c version.c window.c
  692.  
  693. SRC =    $(BASIC_SRC) $(GUI_SRC)
  694.  
  695. ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC)
  696.  
  697. OBJ =    alloc.o unix.o buffer.o charset.o \
  698.     cmdcmds.o cmdline.o csearch.o \
  699.     digraph.o edit.o fileio.o getchar.o \
  700.     help.o linefunc.o main.o mark.o \
  701.     memfile.o memline.o message.o \
  702.     misccmds.o normal.o ops.o option.o \
  703.     pathdef.o quickfix.o regexp.o regsub.o screen.o \
  704.     search.o tables.o tag.o term.o \
  705.     undo.o window.o $(GUI_OBJ)
  706.  
  707. PRO_AUTO = unix.pro $(ALL_GUI_PRO) \
  708.     alloc.pro buffer.pro charset.pro cmdcmds.pro \
  709.     cmdline.pro csearch.pro digraph.pro edit.pro \
  710.     fileio.pro getchar.pro help.pro linefunc.pro \
  711.     main.pro mark.pro memfile.pro memline.pro \
  712.     message.pro misccmds.pro normal.pro ops.pro \
  713.     option.pro quickfix.pro regexp.pro regsub.pro \
  714.     screen.pro search.pro tables.pro tag.pro \
  715.     term.pro termlib.pro undo.pro version.pro window.pro
  716.  
  717. PRO_MANUAL = amiga.pro msdos.pro win32.pro
  718.  
  719. # Default target is making the executable
  720. all: $(TARGET) $(TOOLS)
  721.  
  722. # Run ./configure with all the setting above.
  723. config: configure
  724.     GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
  725.         CC="$(CC)" CFLAGS="$(CFLAGS)" TERM_LIB="$(TERM_LIB)" \
  726.     $(CONF_SHELL) ./configure $(CONF_OPT_GUI) $(CONF_OPT_X)
  727.  
  728. # When configure.in has changed, run autoconf to produce configure
  729. # If you don't have autoconf, use the configure that's there
  730. configure: configure.in
  731.     autoconf
  732. # Fix a bug in autoconf 2.8 and 2.9 (not needed for 2.10, which we use now):
  733. #    mv -f configure configure.wrong
  734. #    sed -e 's+$$ac_cv_lib_dnet+$$ac_cv_lib_$$ac_lib_var+' configure.wrong > configure
  735. #    rm -f configure.wrong
  736.     chmod 755 configure
  737.  
  738. # Re-execute this Makefile to include the new config.mk produced by configure
  739. # Only used when typing "make" with a fresh config.mk.
  740. myself:
  741.     $(MAKE) -f Makefile all
  742.  
  743.  
  744. # Link the target for normal use
  745. $(TARGET): $(OBJ) version.c version.h
  746.     $(CC) -c $(ALL_CFLAGS) version.c
  747.     $(CC) $(LDFLAGS) -o $(TARGET) $(OBJ) version.o $(ALL_LIBS)
  748.  
  749. # Link the target for debugging
  750. debug: $(OBJ) version.c version.h
  751.     $(CC) -c $(ALL_CFLAGS) version.c
  752.     $(CC) $(LDFLAGS) -o $(TARGET) -g $(OBJ) version.o $(ALL_LIBS) 
  753.  
  754. ctags/ctags: ctags/ctags.c
  755.     cd ctags; CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -f Makefile.unix
  756.  
  757. xxd/xxd: xxd/xxd.c
  758.     cd xxd; CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -f Makefile.unix
  759.  
  760. # Generate function prototypes.  This is not needed to compile vim, but if
  761. # you want to use it, cproto is out there on the net somewhere -- Webb
  762. #
  763. # When generating amiga.pro, msdos.pro and win32.pro there will be a few
  764. # include files that can not be found, that's OK.
  765.  
  766. proto: $(PRO_AUTO) $(PRO_MANUAL)
  767.  
  768. ### Would be nice if this would work for "normal" make.
  769. ### Currently it only works for (Free)BSD make.
  770. #$(PRO_AUTO): $$(*F).c
  771. #    cproto $(PFLAGS) -DUSE_GUI $(*F).c > $@
  772.  
  773. # Always define USE_GUI.  This will generate a few warnings if it's also
  774. # defined in config.h, you can ignore that.
  775. .c.pro:
  776.     cproto $(PFLAGS) -DUSE_GUI $< > proto/$@
  777.  
  778. amiga.pro: amiga.c
  779.     cproto $(PFLAGS) -DAMIGA -UHAVE_CONFIG_H -DBPTR=char* amiga.c > proto/amiga.pro
  780.  
  781. msdos.pro: msdos.c
  782.     cproto $(PFLAGS) -DMSDOS -UHAVE_CONFIG_H msdos.c > proto/msdos.pro
  783.  
  784. win32.pro: win32.c
  785.     cproto $(PFLAGS) -DWIN32 -UHAVE_CONFIG_H win32.c > proto/win32.pro
  786.  
  787. notags:
  788.     rm -f tags
  789.  
  790. # Note: tags is made for the currently configured version, can't include both
  791. # Motif and Athena GUI
  792. ctags tags TAGS: notags
  793.     $(CTAGS) $(SRC) $(ALL_INCL)
  794.  
  795. #
  796. # Avoid overwriting an existing executable, somebody might be running it and
  797. # overwriting it could cause it to crash.  Deleting it is OK, it won't be
  798. # really deleted until all running processes for it have exited.  It is
  799. # renamed first, in case the deleting doesn't work.
  800. #
  801. # If you want to keep an older version, rename it before running "make
  802. # install".
  803. #
  804. install: $(TARGET) $(TOOLS) $(EXEC_PREFIX) $(BINLOC) $(PREFIX) $(MANLOC) $(MANLOC)$(MANDIR) $(HELPLOC) $(HELPSUBLOC)
  805.     -mv -f $(BINLOC)/$(TARGET) $(BINLOC)/$(TARGET).old
  806.     -rm -f $(BINLOC)/$(TARGET).old
  807.     cp $(TARGET) $(BINLOC)
  808.     $(STRIP) $(BINLOC)/$(TARGET)
  809.     chmod $(BINMOD) $(BINLOC)/$(TARGET)
  810.     -$(LINKIT)
  811.     -$(LINKGVIM)
  812.     sed -e s+/usr/local/lib/vim+$(HELPSUBLOC)+ $(HELPSOURCE)/vim.1 > $(MANLOC)$(MANDIR)/vim.1
  813.     chmod $(MANMOD) $(MANLOC)$(MANDIR)/vim.1
  814.     cp $(HELPSOURCE)/vim_*.txt $(HELPSUBLOC)
  815.     cp $(HELPSOURCE)/vim_tags $(HELPSUBLOC)
  816.     chmod $(HELPMOD) $(HELPSUBLOC)/vim_*.txt $(HELPSUBLOC)/vim_tags
  817.     cp ctags/ctags $(BINLOC)
  818.     $(STRIP) $(BINLOC)/ctags
  819.     chmod $(BINMOD) $(BINLOC)/ctags
  820.     cp $(HELPSOURCE)/ctags.1 $(MANLOC)$(MANDIR)
  821.     chmod $(MANMOD) $(MANLOC)$(MANDIR)/ctags.1
  822.     cp xxd/xxd $(BINLOC)
  823.     $(STRIP) $(BINLOC)/xxd
  824.     chmod $(BINMOD) $(BINLOC)/xxd
  825.     cp $(HELPSOURCE)/xxd.1 $(MANLOC)$(MANDIR)
  826.     chmod $(MANMOD) $(MANLOC)$(MANDIR)/xxd.1
  827.  
  828. $(EXEC_PREFIX) $(BINLOC) $(PREFIX_MKDIR) $(MANLOC) $(MANLOC)$(MANDIR) $(HELPLOC) $(HELPSUBLOC):
  829.     -mkdir $@
  830.     -chmod $(DIRMOD) $@
  831.  
  832. uninstall:
  833.     rm -f $(BINLOC)/$(TARGET) $(MANLOC)$(MANDIR)/vim.1 
  834.     rm -f $(HELPSUBLOC)/vim_*.txt $(HELPSUBLOC)/vim_tags
  835.  
  836. # Clean up all the files that have been produced, except configure's
  837. # We support common typing mistakes for Juergen! :-)
  838. clean celan:
  839.     -rm -f *.o core vim.core $(TARGET) xxd/*.o ctags/*.o $(TOOLS)
  840.     -rm -f osdef.h pathdef.c mkcmdtab cmdtab.h conftest* *~
  841.  
  842. shadow:    doc
  843.     mkdir shadow
  844.     cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../toolcheck ../proto ../*.tab ../configure .
  845.     cd shadow; rm -f osdef.h config.h cmdtab.h pathdef.c
  846.     cp Makefile shadow
  847.     echo "the first targets to make vim are: scratch config myself" > shadow/config.mk
  848.     mkdir shadow/ctags
  849.     cd shadow/ctags; ln -s ../../ctags/*.[ch] ../../ctags/Make* .
  850.     mkdir shadow/xxd
  851.     cd shadow/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
  852.  
  853. doc:
  854.     ln -s ../doc .
  855.  
  856. # Start configure from scratch
  857. scrub scratch:
  858.     rm -f config.status config.cache config.h config.log
  859.  
  860. distclean: scratch clean
  861.     echo "the first targets to make vim are: scratch config myself" > config.mk
  862.  
  863. tar: clean
  864.     echo packing $(VIMVERSION) ...
  865.     VIMVERSION=$(VIMVERSION); cd ../..; set -x; \
  866.       tar cvf $$VIMVERSION.tar $$VIMVERSION; \
  867.       gzip -nf $$VIMVERSION.tar || gzip -f $$VIMVERSION.tar
  868.  
  869. dist: distclean tar
  870.  
  871. check:
  872.  
  873. mdepend:
  874.     -@rm -f Makefile~
  875.     cp Makefile Makefile~
  876.     sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make
  877.     @for i in $(ALL_SRC) ; do \
  878.       echo "$$i" ; \
  879.       echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\
  880.             $(CPP) $$i |\
  881.             grep '^# .*"\./.*\.h"' |\
  882.             sort -t'"' -u +1 -2 |\
  883.             sed -e 's/.*"\.\/\(.*\)".*/\1/'\
  884.           ` >> tmp_make ; \
  885.     done
  886.     mv tmp_make Makefile
  887.  
  888. depend:
  889.     -@rm -f Makefile~
  890.     cp Makefile Makefile~
  891.     sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make
  892.     -for i in $(ALL_SRC); do echo $$i; \
  893.             $(CPP_DEPEND) $$i >> tmp_make; done
  894.     mv tmp_make Makefile
  895.  
  896. # use this in case the files have been transported via an MSDOS system
  897.  
  898. FILES = *.c *.h Makefile *.in makefile.* *.sh cmdtab.tab proto/*.pro tags configure
  899.  
  900. dos2unix:
  901.     -mv arp_prot.h arp_proto.h
  902.     -mv makefile.arc makefile.arch
  903.     -mv makefile.dic makefile.dice
  904.     -mv makefile.man makefile.manx
  905.     -mv makefile Makefile
  906.     -mv config_h.in config.h.in || mv configxh.in config.h.in || mv configh.in config.h.in
  907.     -mv config_m.in config.mk.in || mv configxm.in config.mk.in || mv configmk.in config.mk.in
  908.     -mv osdef1_h.in osdef1.h.in || mv osdef1xh.in osdef1.h.in || mv osdef1h.in osdef1.h.in
  909.     -mv osdef2_h.in osdef2.h.in || mv osdef2xh.in osdef2.h.in || mv osdef2h.in osdef2.h.in
  910.     -mv configur.in configure.in
  911.     -mv configur configure
  912.     -mv gui_moti.c gui_motif.c
  913.     -mv gui_athe.c gui_athena.c
  914.     -mv gui_at_s.c gui_at_sb.c
  915.     -mv gui_at_s.h gui_at_sb.h
  916.     for i in $(FILES); do tr -d '\r\032' < $$i > ~tmp~; mv ~tmp~ $$i; echo $$i; done
  917.  
  918. ###########################################################################
  919.  
  920. # Used when .o files are in src directory
  921. .c.o:
  922.     $(CC) -c -I$(srcdir) $(ALL_CFLAGS) $<
  923.  
  924. # Used when .o files are in src/objects directory
  925. #$(OBJ): $$(*F).c
  926. #    $(CC) -c -I$(srcdir) $(ALL_CFLAGS) $(*F).c -o $@
  927.  
  928. osdef.h: osdef.sh config.h osdef1.h.in osdef2.h.in
  929.     CC="$(CC) $(ALL_CFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh
  930.  
  931. pathdef.c: Makefile config.mk
  932.     -@echo creating pathdef.c
  933.     -@echo '/* pathdef.c -- DO NOT EDIT! */' > pathdef.c
  934.     -@echo '/* This file is automatically created by Makefile' >> pathdef.c
  935.     -@echo ' * Change the Makefile only. */' >> pathdef.c
  936.     -@echo '#include "vim.h"' >> pathdef.c
  937.     -@echo '#ifndef SYS_VIMRC_FILE' >> pathdef.c
  938.     -@echo 'char_u *sys_vimrc_fname = (char_u *)"$(SYS_VIMRC_FILE)";' >> pathdef.c
  939.     -@echo '#else' >> pathdef.c
  940.     -@echo 'char_u *sys_vimrc_fname = (char_u *)SYS_VIMRC_FILE;' >> pathdef.c
  941.     -@echo '#endif' >> pathdef.c
  942.     -@echo '#ifndef SYS_GVIMRC_FILE' >> pathdef.c
  943.     -@echo 'char_u *sys_gvimrc_fname = (char_u *)"$(SYS_GVIMRC_FILE)";' >> pathdef.c
  944.     -@echo '#else' >> pathdef.c
  945.     -@echo 'char_u *sys_gvimrc_fname = (char_u *)SYS_GVIMRC_FILE;' >> pathdef.c
  946.     -@echo '#endif' >> pathdef.c
  947.     -@echo '#ifndef VIM_HLP' >> pathdef.c
  948.     -@echo 'char_u *help_fname = (char_u *)"$(VIM_HLP)";' >> pathdef.c
  949.     -@echo '#else' >> pathdef.c
  950.     -@echo 'char_u *help_fname = (char_u *)VIM_HLP;' >> pathdef.c
  951.     -@echo '#endif' >> pathdef.c
  952.     -@echo 'char_u *all_cflags = (char_u *)"$(CC) -c -I$(srcdir) $(ALL_CFLAGS)";' >> pathdef.c
  953.  
  954. Makefile:
  955.     @echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
  956.  
  957. cmdtab.h: cmdtab.tab mkcmdtab
  958.     ./mkcmdtab cmdtab.tab cmdtab.h
  959.  
  960. mkcmdtab: mkcmdtab.c osdef.h
  961.     $(CC) -I$(srcdir) $(ALL_CFLAGS) -o mkcmdtab mkcmdtab.c
  962.  
  963. ###############################################################################
  964. ### (automatically generated by 'make depend')
  965. ### Dependencies:
  966. alloc.o: alloc.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  967.   macros.h structs.h gui.h globals.h proto.h regexp.h
  968. buffer.o: buffer.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  969.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  970. charset.o: charset.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  971.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  972. cmdcmds.o: cmdcmds.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  973.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  974. cmdline.o: cmdline.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  975.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h cmdtab.h \
  976.   ops.h
  977. csearch.o: csearch.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  978.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  979. digraph.o: digraph.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  980.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  981. edit.o: edit.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  982.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  983. fileio.o: fileio.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  984.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  985. getchar.o: getchar.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  986.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  987. help.o: help.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  988.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  989. linefunc.o: linefunc.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  990.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h
  991. main.o: main.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  992.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  993. mark.o: mark.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  994.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  995. memfile.o: memfile.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  996.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  997. memline.o: memline.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  998.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  999. message.o: message.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1000.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1001. misccmds.o: misccmds.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1002.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1003. normal.o: normal.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1004.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  1005. ops.o: ops.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1006.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  1007. option.o: option.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1008.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1009. pathdef.o: pathdef.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1010.   term.h macros.h structs.h gui.h
  1011. quickfix.o: quickfix.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1012.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1013. regexp.o: regexp.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1014.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1015. regsub.o: regsub.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1016.   macros.h structs.h gui.h globals.h proto.h regexp.h
  1017. screen.o: screen.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1018.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  1019. search.o: search.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1020.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  1021. tables.o: tables.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1022.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1023. tag.o: tag.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1024.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1025. term.o: term.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1026.   macros.h structs.h gui.h globals.h option.h proto.h regexp.h
  1027. undo.o: undo.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1028.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1029. unix.o: unix.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1030.   macros.h structs.h gui.h globals.h option.h proto.h regexp.h unixunix.h
  1031. version.o: version.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1032.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h version.h
  1033. window.o: window.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1034.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1035. gui.o: gui.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h term.h \
  1036.   macros.h structs.h gui.h globals.h proto.h regexp.h option.h
  1037. gui_motif.o: gui_motif.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1038.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  1039. gui_x11.o: gui_x11.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1040.   term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h ops.h
  1041. gui_athena.o: gui_athena.c vim.h config.h feature.h unix.h osdef.h ascii.h \
  1042.   keymap.h term.h macros.h structs.h gui.h globals.h proto.h regexp.h option.h \
  1043.   ops.h gui_at_sb.h
  1044. gui_at_sb.o: gui_at_sb.c vim.h config.h feature.h unix.h osdef.h ascii.h keymap.h \
  1045.   term.h macros.h structs.h gui.h gui_at_sb.h
  1046.