home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / ap / vim / makefile < prev    next >
Makefile  |  1995-10-10  |  13KB  |  523 lines

  1. #
  2. # Makefile for Vim on Unix
  3. #
  4.  
  5. # Note: You MUST uncomment three hardware dependend lines!
  6.  
  7. # There are three types of defines:
  8. #
  9. # 1. configuration dependend
  10. #    Used for "make install". Adjust the path names and protections
  11. #    to your desire. Also defines the root for the X11 files (not required).
  12. #
  13. # 2. various choices
  14. #    Can be changed to match your compiler or your preferences (not
  15. #    required).
  16. #
  17. # 3. hardware dependend
  18. #    If you machine is in the list, remove one '#' in front of the defines
  19. #    following it. Otherwise: Find a machine that is similar and change the
  20. #    defines to make it work. Normally you can just try and see what error
  21. #    messages you get. (REQUIRED).
  22.  
  23. # The following systems have entries below. They have been tested and should
  24. # work without modification. But later code changes may cause small problems.
  25. # There are entries for other systems, but these have not been tested recently.
  26.  
  27. #system:        tested configurations:        tested by:
  28.  
  29. #Sun 4.1.x        cc    gcc    X11    no X11    (jw) (mool)
  30. #FreeBSD        cc    gcc    X11    no X11    (mool)
  31. #linux 1.0        cc        X11
  32. #Linux 1.0.9            gcc        no X11    (jw)
  33. #ULTRIX 4.2A on MIPS    cc    gcc        no X11    (mool)
  34. #HPUX            cc    gcc    X11    no X11    (jw) (mool)
  35. #irix 4.0.5H        cc        X11
  36. #IRIX 4.0  SGI        cc        X11        (jw)
  37. #SINIX-L 5.41        cc            no X11
  38. #MOT188            cc            no X11
  39. #Sequent/ptx 1.3    cc            no X11    (jw)
  40. #osf1            cc            no X11    (jw)
  41. #Unisys 6035        cc            no X11
  42. #SCO 3.2        cc    gcc        no X11    jos@oce.nl
  43. #Solaris        cc        X11
  44. #Solaris/Sun OS 5.3    cc            no X11    (jw)
  45. #AIX (rs6000)        cc            no X11    (jw)
  46. #RISCos on MIPS        cc        X11    no X11    (jw)
  47.  
  48. # configurations marked by (jw) have been tested by Juergen Weigert:
  49. #    jnweiger@uni-erlangen.de
  50.  
  51. #
  52. # PART 1: configuration dependend
  53. #
  54.  
  55. ### root directory for X11 files (unless overruled in hardware-dependend part)
  56. ### Unfortunately there is no standard for these, everybody puts them
  57. ### somewhere else
  58. X11LIBDIR = /usr/X11/lib
  59. X11INCDIR = /usr/X11/include/X11
  60. ### for some hpux systems:
  61. #X11LIBDIR = /usr/lib/X11R5
  62. #X11INCDIR = /usr/include/X11R5
  63.  
  64. ### Prefix for location of files
  65. PREFIX = /usr
  66.  
  67. ### Location of binary
  68. BINLOC = $(PREFIX)/bin
  69.  
  70. ### Name of target
  71. TARGET = vim
  72.  
  73. ### Location of man page
  74. MANLOC = $(PREFIX)/man/man1
  75.  
  76. ### Location of help file
  77. HELPLOC = $(PREFIX)/lib
  78.  
  79. ### Program to run on installed binary
  80. STRIP = strip
  81.  
  82. ### Permissions for vim binary
  83. BINMOD = 755
  84.  
  85. ### Permissions for man page
  86. MANMOD = 644
  87.  
  88. ### Permissions for help file
  89. HELPMOD = 644
  90.  
  91. MANFILE = ../doc/vim.1
  92.  
  93. HELPFILE = ../doc/vim.hlp
  94.  
  95. #
  96. # PART 2: various choices
  97. #
  98.  
  99. ### -DDIGRAPHS        digraph support
  100. ### -DNO_FREE_NULL    do not call free() with a null pointer
  101. ### -DCOMPATIBLE    start in vi-compatible mode
  102. ### -DNOBACKUP        default is no backup file
  103. ### -DDEBUG        output a lot of debugging garbage
  104. ### -DSTRNCASECMP    use strncasecmp() instead of internal function
  105. ### -DUSE_LOCALE    use setlocale() to change ctype() and others
  106. ### -DTERMCAP        full termcap/terminfo file support
  107. ### -DTERMINFO        use terminfo instead of termcap entries for builtin terms
  108. ### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  109. ###                (use only with -DTERMCAP)
  110. ### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  111. ###                (use only without -DNO_BUILTIN_TCAPS)
  112. ### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  113. ###                (use only without -DNO_BUILTIN_TCAPS)
  114. ### -DMAXNAMLEN 31    maximum length of a file name (if not defined in sys/dir.h)
  115. ### -Dconst=        for compilers that don't have type const
  116. ### -DVIMRC_FILE=name        name of the .vimrc file in current dir
  117. ### -DEXRC_FILE=name        name of the .exrc file in current dir
  118. ### -DSYSVIMRC_FILE=name    name of the global .vimrc file
  119. ### -DSYSEXRC_FILE=name        name of the global .exrc file
  120. ### -DDEFVIMRC_FILE=name    name of the system-wide .vimrc file
  121. ### -DVIM_HLP=name        name of the help file
  122. ### -DUSE_SYSTEM    use system() instead of fork/exec for starting a shell
  123. ### -DVIM_ISSPACE    use when isspace() can't handle meta chars
  124. ### -DNOLIMITS        limits.h does not exist
  125. ### -DNOSTDLIB        stdlib.h does not exist
  126. ### -DUSE_X11        include code for xterm title saving
  127. ### -DWEBB_COMPLETE    include Webb's code for command line completion
  128. ### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
  129. ### -DNOTITLE        'title' option off by default
  130. DEFS = -DDIGRAPHS -DTERMCAP -DSOME_BUILTIN_TCAPS -DNO_FREE_NULL -DVIM_ISSPACE \
  131.         -DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL -DNOTITLE \
  132.         -DVIM_HLP=\"$(HELPLOC)/vim.hlp\"
  133.  
  134. #
  135. # PART 3: hardware dependend
  136. #
  137.  
  138. ### CC entry:      name and arguments for the compiler (also for linking)
  139. ### MACHINE entry: defines used for compiling (not for linking)
  140. ### LIBS:          defines used for linking
  141.  
  142. # generic for Sun, NeXT, POSIX and SYSV R4 (?) (TESTED for Sun 4.1.x)
  143. # standard cc with optimizer
  144. #
  145. #MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
  146. #CC=cc -O -I$(X11INCDIR)
  147. #LIBS = -ltermlib -L$(X11LIBDIR) -lX11
  148.  
  149. # generic for Sun, FreeBSD, NetBSD, NeXT, POSIX and SYSV R4 (?) without x11 code
  150. #    (TESTED for Sun 4.1.x and FreeBSD)
  151. # standard cc with optimizer
  152. #
  153. #MACHINE = -DBSD_UNIX -DUSE_LOCALE
  154. #CC=cc -O
  155. #LIBS = -ltermlib
  156.  
  157. # FreeBSD and NetBSD with Xfree (TESTED for FreeBSD)
  158. # standard cc with optimizer
  159. #
  160. #MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
  161. #CC=cc -O -L/usr/X386/lib -I/usr/X386/include
  162. #LIBS = -ltermlib -lX11
  163.  
  164. # FreeBSD and NetBSD with Xfree (TESTED for FreeBSD)
  165. # gcc with optimizer
  166. #
  167. #MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
  168. #CC=gcc -O -Wall -traditional -Dconst= -I/usr/X386/include
  169. #LIBS = -ltermlib -L/usr/X386/lib -lX11
  170.  
  171. # like generic, but with termcap, for Linux, NeXT and others (NOT TESTED YET)
  172. # standard cc with optimizer
  173. #
  174. #MACHINE = -DBSD_UNIX
  175. #CC=cc -O
  176. #LIBS = -ltermcap
  177.  
  178. # linux 1.0 with X11 (TESTED)
  179. #
  180. #MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
  181. #CC=cc -O -I/usr/X11/include
  182. #LIBS = -ltermcap -L/usr/X11/lib -lX11
  183.  
  184. # like generic, but with debugging (NOT TESTED YET)
  185. #
  186. #MACHINE = -DBSD_UNIX -g
  187. #CC=cc
  188. #LIBS = -ltermlib
  189.  
  190. # like generic, but with gcc and X11 (TESTED on Sun 4.1.x)
  191. #
  192. #MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
  193. #CC=gcc -O -Wall -traditional -Dconst= -L$(X11LIBDIR) -I$(X11INCDIR)
  194. #LIBS = -ltermlib -lX11
  195.  
  196. # like generic, but with gcc, without X11 (TESTED on ULTRIX 4.2A on MIPS)
  197. #
  198. #MACHINE = -DBSD_UNIX -DUSE_LOCALE
  199. #CC=gcc -O -Wall -traditional -Dconst=
  200. #LIBS = -ltermlib
  201.  
  202. # like generic, but with gcc 2.5.8 (TESTED on Sun 4.1.3_U1)
  203. #
  204. #MACHINE = -DBSD_UNIX -DUSE_LOCALE
  205. #CC=gcc -O1000
  206. #LIBS = -ltermlib
  207.  
  208. # standard cc with optimizer for ULTRIX 4.2A on MIPS (ultrix defined) (TESTED)
  209. #
  210. #MACHINE = -DBSD_UNIX -DUSE_LOCALE
  211. #CC=cc -O -Olimit 1500
  212. #LIBS = -ltermlib
  213.  
  214. # GCC (2.2.2d) on Linux (1.0.9) (TESTED)
  215. #
  216. MACHINE = -DBSD_UNIX -DNOBACKUP
  217. CC=gcc -O6 -Wall
  218. LIBS = -ltermcap
  219.  
  220. # Apollo DOMAIN (with SYSTYPE = bsd4.3) (NOT TESTED YET)
  221. #
  222. #MACHINE = -DBSD_UNIX -DDOMAIN
  223. #CC=cc -O -A systype,bsd4.3
  224. #LIBS = -ltermlib
  225.  
  226. # HPUX with X11 (TESTED) (hpux is defined)
  227. #
  228. #MACHINE = -DBSD_UNIX -DTERMINFO -DUSE_X11
  229. #CC=cc -O -I$(X11INCDIR)
  230. #LIBS = -ltermcap -L$(X11LIBDIR) -lX11
  231.  
  232. # HPUX (TESTED) (hpux is defined)
  233. #
  234. #MACHINE = -DBSD_UNIX -DTERMINFO
  235. #CC=cc -O
  236. #LIBS = -ltermcap
  237.  
  238. # HPUX with gcc (TESTED) (hpux is defined)
  239. #
  240. #MACHINE = -DBSD_UNIX -DTERMINFO
  241. #CC=gcc -O
  242. #LIBS = -ltermcap
  243.  
  244. # hpux 9.01 (with termlib instead of termcap) (TESTED)
  245. # irix 4.0.5H (TESTED)
  246. #
  247. #MACHINE = -DBSD_UNIX -DUSE_LOCALE -DUSE_X11
  248. #CC=cc -O -I$(X11INCDIR)
  249. #LIBS = -ltermlib -L$(X11LIBDIR) -lX11
  250.  
  251. # IRIX 4.0 (Silicon Graphics Indigo, __sgi will be defined) (TESTED)
  252. #
  253. #MACHINE = -DBSD_UNIX -DUSE_X11                         
  254. #CC=cc -O -Olimit 1500
  255. #LIBS = -ltermlib -lX11 -lmalloc -lc_s
  256.  
  257. # Convex (NOT TESTED YET)
  258. #
  259. #MACHINE = -DBSD_UNIX -DCONVEX
  260. #CC=cc -O
  261. #LIBS = -ltermcap
  262.  
  263. # generic SYSV_UNIX for Dynix/PTX and SYSV R3 (and R4?) (TESTED on SINIX-L 5.41)
  264. # (TESTED on MOT188) (TESTED on Sequent/ptx 1.3) (TESTED on osf1)
  265. # First try the line with locale. If this gives error messages try the other one.
  266. #
  267. #MACHINE = -DSYSV_UNIX -DUSE_LOCALE
  268. #MACHINE = -DSYSV_UNIX
  269. #CC=cc -O
  270. #LIBS = -ltermlib
  271.  
  272. # generic SYSV_UNIX with LOCALE (TESTED on Unisys 6035)
  273. #
  274. #MACHINE = -DSYSV_UNIX -DUSE_LOCALE -DUNISYS
  275. #CC=cc -O
  276. #LIBS = -ltermlib
  277.  
  278. # SCO Xenix (NOT TESTED YET)
  279. #
  280. #MACHINE = -DSYSV_UNIX -DSCO
  281. #CC=cc -O
  282. #LIBS = -ltermlib
  283.  
  284. # GCC on SCO 3.2 (TESTED by jos@oce.nl)
  285. # cc works too.
  286. #
  287. #MACHINE = -DSYSV_UNIX -UM_XENIX -DSCO
  288. #CC=gcc -O -Wall
  289. #LIBS = -ltinfo
  290.  
  291. # GCC on another SCO Unix (NOT TESTED YET)
  292. #
  293. #MACHINE = -DSYSV_UNIX -UM_XENIX -DSCO -g
  294. #CC=gcc -O6 -fpcc-struct-return -fwritable-strings
  295. #LIBS = -ltermlib -lmalloc
  296.  
  297. # Dynix with gcc (NOT TESTED YET)
  298. #
  299. #MACHINE = -DSYSV_UNIX
  300. #CC=gcc -O -Wall -traditional
  301. #LIBS = -ltermlib
  302.  
  303. # SOLARIS with X11 anc cc (TESTED)
  304. #
  305. #MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO -DUSE_X11
  306. #CC=cc -O -Xa -v -R$(X11LIBDIR) -L$(X11LIBDIR) -I$(X11INCDIR)
  307. #LIBS = -ltermlib -lX11
  308.  
  309. # SOLARIS with X11 and gcc (TESTED with SOLARIS 2.3 and gcc 2.5.8)
  310. #
  311. #MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO -DUSE_X11
  312. #CC=gcc -O -R$(X11LIBDIR) -L$(X11LIBDIR) -I$(X11INCDIR)
  313. #LIBS = -ltermlib -lX11
  314.  
  315. # SOLARIS (also works for Esix 4.0.3, SYSV R4?) (TESTED on Sun OS 5.3)
  316. #
  317. #MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO
  318. #CC=cc -O -Xa -v
  319. #LIBS = -ltermlib
  320.  
  321. # UNICOS (NOT TESTED YET)
  322. #
  323. #MACHINE = -DSYSV_UNIX -DUNICOS
  324. #CC=cc -O
  325. #LIBS = -ltermlib
  326.  
  327. # AIX (rs6000) (TESTED)
  328. #
  329. #MACHINE = -DSYSV_UNIX -DAIX
  330. #CC=cc -O
  331. #LIBS=-lcur
  332.  
  333. # UTS2 for Amdahl UTS 2.1.x (disable termcap below) (NOT TESTED YET)
  334. #
  335. #MACHINE = -DSYSV_UNIX -DUTS2
  336. #CC=cc -O
  337. #LIBS = -ltermlib -lsocket
  338.  
  339. # UTS4 for Amdahl UTS 4.x (NOT TESTED YET)
  340. #
  341. #MACHINE = -DSYSV_UNIX -DUTS4 -Xa
  342. #CC=cc -O
  343. #LIBS = -ltermlib
  344.  
  345. # USL for Unix Systems Laboratories (SYSV 4.2) (NOT TESTED YET)
  346. #
  347. #MACHINE = -DSYSV_UNIX -DUSL
  348. #CC=cc -O
  349. #LIBS = -ltermlib
  350.  
  351. # RISCos on MIPS without X11 (TESTED)
  352. #
  353. #MACHINE = -DSYSV_UNIX -DMIPS
  354. #CC=cc -O
  355. #LIBS = -ltermlib
  356.  
  357. # RISCos on MIPS with X11 (TESTED)
  358. #
  359. #MACHINE=-DSYSV_UNIX -DUSE_LOCALE -DUSE_X11
  360. #CC=cc -O -I$(X11INCDIR)
  361. #LIBS=-ltermlib -L$(X11LIBDIR) -lX11 -lsun
  362.  
  363. ################################################
  364. ##   no changes required below this line      ##
  365. ################################################
  366.  
  367. CFLAGS = -c $(MACHINE) $(DEFS)
  368.  
  369. INCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h unix.h structs.h proto.h
  370.  
  371. OBJ =    alloc.o unix.o buffer.o charset.o cmdcmds.o cmdline.o \
  372.     csearch.o digraph.o edit.o fileio.o getchar.o help.o \
  373.     linefunc.o main.o mark.o memfile.o memline.o message.o misccmds.o \
  374.     normal.o ops.o param.o quickfix.o regexp.o \
  375.     regsub.o screen.o search.o \
  376.     tag.o term.o undo.o window.o $(TERMLIB)
  377.  
  378. $(TARGET): $(OBJ) version.c
  379.     $(CC) $(CFLAGS) version.c
  380.     $(CC) -o $(TARGET) $(OBJ) version.o $(LIBS)
  381.  
  382. debug: $(OBJ) version.c
  383.     $(CC) $(CFLAGS) version.c
  384.     $(CC) -o $(TARGET) -g $(OBJ) version.o $(LIBS)
  385.  
  386. ctags:
  387.     ctags *.c *.h
  388.  
  389. install: $(TARGET)
  390.     -mkdir $(BINLOC)
  391.     cp $(TARGET) $(BINLOC)
  392.     chmod $(BINMOD) $(BINLOC)/$(TARGET)
  393.     $(STRIP) $(BINLOC)/$(TARGET)
  394.     -mkdir $(MANLOC)
  395.     cp $(MANFILE) $(MANLOC)
  396.     chmod $(MANMOD) $(MANLOC)/vim.1
  397.     -mkdir $(HELPLOC)
  398.     cp $(HELPFILE) $(HELPLOC)
  399.     chmod $(HELPMOD) $(HELPLOC)/vim.hlp
  400.  
  401. clean:
  402.     -rm -f $(OBJ) mkcmdtab.o version.o core $(TARGET) mkcmdtab cmdtab.h
  403.     -rm -f *.bak
  404.  
  405. #use this in case the files have been transported via an MSDOS system
  406.  
  407. FILES = *.c *.h makefile makefile.* cmdtab.tab proto/*.pro tags
  408.  
  409. dos2unix:
  410.     -mv arp_prot.h arp_proto.h
  411.     -mv ptx_stdl.h ptx_stdlib.h
  412.     -mv sun_stdl.h sun_stdlib.h
  413.     -mv makefile.dic makefile.dice
  414.     -mv makefile.uni makefile.unix
  415.     -mv makefile.man makefile.manx
  416.     -mv makefile.6sa makefile.6sas
  417.     -mv makefile.5sa makefile.5sas
  418.     for i in $(FILES); do tr -d '\r\032' < $$i > ~tmp~; mv ~tmp~ $$i; echo $$i; done
  419.  
  420. ###########################################################################
  421.  
  422. alloc.o:    alloc.c  $(INCL)
  423.     $(CC) $(CFLAGS) alloc.c
  424.  
  425. unix.o:    unix.c  $(INCL)
  426.     $(CC) $(CFLAGS) unix.c
  427.  
  428. buffer.o:    buffer.c  $(INCL)
  429.     $(CC) $(CFLAGS) buffer.c
  430.  
  431. charset.o:    charset.c  $(INCL)
  432.     $(CC) $(CFLAGS) charset.c
  433.  
  434. cmdcmds.o:    cmdcmds.c  $(INCL)
  435.     $(CC) $(CFLAGS) cmdcmds.c
  436.  
  437. cmdline.o:    cmdline.c  $(INCL) cmdtab.h ops.h
  438.     $(CC) $(CFLAGS) cmdline.c
  439.  
  440. csearch.o:    csearch.c  $(INCL)
  441.     $(CC) $(CFLAGS) csearch.c
  442.  
  443. digraph.o:    digraph.c  $(INCL)
  444.     $(CC) $(CFLAGS) digraph.c
  445.  
  446. edit.o:    edit.c  $(INCL) ops.h
  447.     $(CC) $(CFLAGS) edit.c
  448.  
  449. fileio.o:    fileio.c  $(INCL)
  450.     $(CC) $(CFLAGS) fileio.c
  451.  
  452. getchar.o:    getchar.c  $(INCL)
  453.     $(CC) $(CFLAGS) getchar.c
  454.  
  455. help.o:    help.c  $(INCL)
  456.     $(CC) $(CFLAGS) help.c
  457.  
  458. linefunc.o:    linefunc.c  $(INCL)
  459.     $(CC) $(CFLAGS) linefunc.c
  460.  
  461. main.o:    main.c  $(INCL)
  462.     $(CC) $(CFLAGS) main.c
  463.  
  464. mark.o:    mark.c  $(INCL)
  465.     $(CC) $(CFLAGS) mark.c
  466.  
  467. memfile.o:    memfile.c  $(INCL)
  468.     $(CC) $(CFLAGS) memfile.c
  469.  
  470. memline.o:    memline.c  $(INCL)
  471.     $(CC) $(CFLAGS) memline.c
  472.  
  473. message.o:    message.c  $(INCL)
  474.     $(CC) $(CFLAGS) message.c
  475.  
  476. misccmds.o:    misccmds.c  $(INCL)
  477.     $(CC) $(CFLAGS) misccmds.c
  478.  
  479. normal.o:    normal.c  $(INCL) ops.h
  480.     $(CC) $(CFLAGS) normal.c
  481.  
  482. ops.o:    ops.c  $(INCL) ops.h
  483.     $(CC) $(CFLAGS) ops.c
  484.  
  485. param.o:    param.c  $(INCL)
  486.     $(CC) $(CFLAGS) param.c
  487.  
  488. quickfix.o:    quickfix.c  $(INCL)
  489.     $(CC) $(CFLAGS) quickfix.c
  490.  
  491. regexp.o:    regexp.c  $(INCL)
  492.     $(CC) $(CFLAGS) regexp.c
  493.  
  494. regsub.o:    regsub.c  $(INCL)
  495.     $(CC) $(CFLAGS) regsub.c
  496.  
  497. screen.o:    screen.c  $(INCL)
  498.     $(CC) $(CFLAGS) screen.c
  499.  
  500. search.o:    search.c  $(INCL) ops.h
  501.     $(CC) $(CFLAGS) search.c
  502.  
  503. tag.o:    tag.c  $(INCL)
  504.     $(CC) $(CFLAGS) tag.c
  505.  
  506. term.o:    term.c  $(INCL)
  507.     $(CC) $(CFLAGS) term.c
  508.  
  509. undo.o:    undo.c  $(INCL)
  510.     $(CC) $(CFLAGS) undo.c
  511.  
  512. window.o:    window.c  $(INCL)
  513.     $(CC) $(CFLAGS) window.c
  514.  
  515. cmdtab.h: cmdtab.tab mkcmdtab
  516.     ./mkcmdtab cmdtab.tab cmdtab.h
  517.  
  518. mkcmdtab: mkcmdtab.o
  519.     $(CC) -o mkcmdtab mkcmdtab.o
  520.  
  521. mkcmdtab.o: mkcmdtab.c
  522.     $(CC) $(CFLAGS) mkcmdtab.c
  523.