home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / vim-2.0.lha / Vim-2.0 / src / makefile.unix < prev    next >
Encoding:
Makefile  |  1993-12-10  |  6.9 KB  |  277 lines

  1. #
  2. # Makefile for Vim on Unix, using gcc or standard cc
  3. #
  4.  
  5. #>>>>> choose BSD_UNIX for Sun, Linux, IRIX, NeXT, POSIX and SYSV R4
  6. #       or Apollo DOMAIN (with SYSTYPE = bsd4.3, change CC below)
  7. #       or BSD_UNIX with TERMINFO for HPUX
  8. #       or BSD_UNIX for Convex
  9. #          or SYSV_UNIX for Dynix/PTX, SCO-UNIX, UNICOS and SYSV R3
  10. #          or SOLARIS
  11. #          or UNICOS
  12. #       or AIX (rs6000) (disable termcap below)
  13. #       or UTS2 for Amdahl UTS 2.1.x (disable termcap below)
  14. #       or UTS4 for Amdahl UTS 4.x
  15. #       or USL for Unix Systems Laboratories (SYSV 4.2)
  16. MACHINE = -DBSD_UNIX
  17. #MACHINE = -DBSD_UNIX -DDOMAIN
  18. #MACHINE = -DBSD_UNIX -DTERMINFO
  19. #MACHINE = -DBSD_UNIX -DCONVEX
  20. #
  21. #MACHINE = -DSYSV_UNIX
  22. #MACHINE = -DSYSV_UNIX -DSOLARIS -DTERMINFO
  23. #MACHINE = -DSYSV_UNIX -DUNICOS
  24. #MACHINE = -DSYSV_UNIX -DAIX
  25. #MACHINE = -DSYSV_UNIX -DUTS2
  26. #MACHINE = -DSYSV_UNIX -DUTS4 -Xa
  27. #MACHINE = -DSYSV_UNIX -DUSL
  28.  
  29. #>>>>> choose one compiler
  30. ### standard C compiler, with optimizer, debugger or vanilla
  31. CC=cc -O
  32. #CC=cc -g
  33. #CC=cc
  34.  
  35. ### GCC on sun, Dynix
  36. #CC=gcc -O -Wall -traditional
  37.  
  38. ### GCC 2.2.2d on Linux (works for Sun OS also)
  39. #CC=gcc -O6 -Wall
  40.  
  41. ### GCC on SCO 3.2 and GCC 2.4.5 on NeXT
  42. #CC=gcc -O -Wall
  43.  
  44. ### GCC on another SCO Unix
  45. #CC=gcc -O6 -g -fpcc-struct-return -fwritable-strings
  46.  
  47. ### CenterLine cc
  48. #CC=clcc -O
  49.  
  50. ### Apollo Domain cc
  51. #CC=cc -O -A systype,bsd4.3
  52.  
  53. #>>>>> choose options for install
  54. ### Name of target
  55. TARGET = vim
  56.  
  57. ### Prefix for location of files
  58. PREFIX = /usr/local
  59.  
  60. ### Location of binary
  61. BINLOC = $(PREFIX)/bin
  62.  
  63. ### Location of man page
  64. MANLOC = $(PREFIX)/man/man1
  65.  
  66. ### Location of help file
  67. HELPLOC = $(PREFIX)/lib
  68.  
  69. ### Permissions for vim binary
  70. BINMOD = 755
  71.  
  72. ### Permissions for man page
  73. MANMOD = 644
  74.  
  75. ### Permissions for help file
  76. HELPMOD = 644
  77.  
  78. MANFILE = ../doc/vim.1
  79.  
  80. HELPFILE = ../doc/vim.hlp
  81.  
  82. #>>>>> choose options:
  83. ### -DDIGRAPHS        digraph support
  84. ### -DNO_FREE_NULL    do not call free() with a null pointer
  85. ### -DCOMPATIBLE    start in vi-compatible mode
  86. ### -DNOBACKUP        default is no backup file
  87. ### -DDEBUG        output a lot of debugging garbage
  88. ### -DSTRNCASECMP    use strncasecmp() instead of internal function
  89. ### -DUSE_LOCALE    use setlocale() to change ctype() and others
  90. ### -DTERMCAP        full termcap file support
  91. ### -DTERMINFO        use terminfo entries for builtin termcaps
  92. ### -DNO_BUILTIN_TCAPS    do not include builtin termcap entries
  93. ###                (use only with -DTERMCAP)
  94. ### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
  95. ###                (use only without -DNO_BUILTIN_TCAPS)
  96. ### -DALL_BUILTIN_TCAPS    include all builtin termcap entries
  97. ###                (use only without -DNO_BUILTIN_TCAPS)
  98. ### -DMAXNAMLEN 31    maximum length of a file name (if not defined in sys/dir.h)
  99. ### -Dconst=        for compilers that don't have type const
  100. ### -DVIMRC_FILE    name of the .vimrc file in current dir
  101. ### -DEXRC_FILE        name of the .exrc file in current dir
  102. ### -DSYSVIMRC_FILE    name of the global .vimrc file
  103. ### -DSYSEXRC_FILE    name of the global .exrc file
  104. ### -DDEFVIMRC_FILE    name of the system-wide .vimrc file
  105. ### -DVIM_HLP        name of the help file
  106. ### -DUSE_SYSTEM    use system() instead of fork/exec for starting a shell
  107. ### -DVIM_ISSPACE    use when isspace() can't handle meta chars
  108. ### -DSCO        SCO UNIX
  109. ### -UM_XENIX        needed on SCO UNIX when using gcc
  110. DEFS = -DDIGRAPHS -DTERMCAP -DSOME_BUILTIN_TCAPS -DNO_FREE_NULL \
  111.     -DSYSVIMRC_FILE=\"\$$HOME/.vimrc\" -DSYSEXRC_FILE=\"\$$HOME/.exrc\" \
  112.     -DDEFVIMRC_FILE=\"/etc/vimrc\" -DVIM_HLP=\"$(HELPLOC)/vim.hlp\"
  113.  
  114. #>>>>> link with termlib or termcap only if TERMCAP is defined
  115. ### default
  116. LIBS = -ltermlib
  117.  
  118. ### termcap is for linux, HPUX, NeXT and others
  119. #LIBS = -ltermcap
  120.  
  121. ### for IRIX (Silicon Graphics Indigo, __sgi will be defined)
  122. #LIBS = -ltermlib -lmalloc -lc_s
  123.  
  124. ### UTS 2.1.6a (Amdahl UTS, _UTS will be defined)
  125. #LIBS = -ltermlib -lsocket
  126.  
  127. ### for SCO UNIX 3.2
  128. #LIBS = -ltinfo
  129.  
  130. ### for some SCO UNIX with gcc
  131. #LIBS = -ltermlib -lmalloc
  132.  
  133. ### without TERMCAP defined
  134. #LIBS = 
  135.  
  136. #>>>>> end of choices
  137. ###########################################################################
  138.  
  139. CFLAGS = -c $(MACHINE) $(DEFS)
  140.  
  141. INCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h unix.h debug.h
  142.  
  143. OBJ =    alloc.o unix.o buffers.o charset.o cmdline.o csearch.o digraph.o \
  144.     edit.o fileio.o help.o linefunc.o main.o mark.o message.o misccmds.o \
  145.     normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \
  146.     script.o search.o storage.o tag.o term.o undo.o
  147.  
  148. $(TARGET): $(OBJ) version.c
  149.     $(CC) $(CFLAGS) version.c
  150.     $(CC) -o $(TARGET) $(OBJ) version.o $(LIBS)
  151.  
  152. debug: $(OBJ) version.c
  153.     $(CC) $(CFLAGS) version.c
  154.     $(CC) -o $(TARGET) -g $(OBJ) version.o $(LIBS)
  155.  
  156. ctags:
  157.     csh -c ctags *.c *.h
  158.  
  159. install: $(TARGET)
  160.     chmod $(BINMOD) $(TARGET)
  161.     cp $(TARGET) $(BINLOC)
  162.     chmod $(MANMOD) $(MANFILE)
  163.     cp $(MANFILE) $(MANLOC)
  164.     chmod $(HELPMOD) $(HELPFILE)
  165.     cp $(HELPFILE) $(HELPLOC)
  166.  
  167. clean:
  168.     -rm -f $(OBJ) mkcmdtab.o version.o core $(TARGET) mkcmdtab
  169.     -rm -f *.bak
  170.  
  171. #use this in case the files have been transported via an MSDOS system
  172.  
  173. FILES = *.c *.h makefile makefile.* cmdtab.tab proto/*.pro tags
  174.  
  175. dos2unix:
  176.     -mv arp_prot.h arp_proto.h
  177.     -mv ptx_stdl.h ptx_stdlib.h
  178.     -mv sun_stdl.h sun_stdlib.h
  179.     -mv makefile.dic makefile.dice
  180.     -mv makefile.uni makefile.unix
  181.     -mv makefile.man makefile.manx
  182.     -mv makefile.6sa makefile.6sas
  183.     -mv makefile.5sa makefile.5sas
  184.     for i in $(FILES); do tr -d '\r\032' < $$i > ~tmp~; mv ~tmp~ $$i; echo $$i; done
  185.  
  186. ###########################################################################
  187.  
  188. alloc.o:    alloc.c  $(INCL)
  189.     $(CC) $(CFLAGS) alloc.c
  190.  
  191. unix.o:    unix.c  $(INCL) unix.h
  192.     $(CC) $(CFLAGS) unix.c
  193.  
  194. buffers.o:    buffers.c  $(INCL)
  195.     $(CC) $(CFLAGS) buffers.c
  196.  
  197. charset.o:    charset.c  $(INCL)
  198.     $(CC) $(CFLAGS) charset.c
  199.  
  200. cmdline.o:    cmdline.c  $(INCL) cmdtab.h
  201.     $(CC) $(CFLAGS) cmdline.c
  202.  
  203. csearch.o:    csearch.c  $(INCL)
  204.     $(CC) $(CFLAGS) csearch.c
  205.  
  206. digraph.o:    digraph.c  $(INCL)
  207.     $(CC) $(CFLAGS) digraph.c
  208.  
  209. edit.o:    edit.c  $(INCL)
  210.     $(CC) $(CFLAGS) edit.c
  211.  
  212. fileio.o:    fileio.c  $(INCL)
  213.     $(CC) $(CFLAGS) fileio.c
  214.  
  215. help.o:    help.c  $(INCL)
  216.     $(CC) $(CFLAGS) help.c
  217.  
  218. linefunc.o:    linefunc.c  $(INCL)
  219.     $(CC) $(CFLAGS) linefunc.c
  220.  
  221. main.o:    main.c  $(INCL)
  222.     $(CC) $(CFLAGS) main.c
  223.  
  224. mark.o:    mark.c  $(INCL)
  225.     $(CC) $(CFLAGS) mark.c
  226.  
  227. message.o:    message.c  $(INCL)
  228.     $(CC) $(CFLAGS) message.c
  229.  
  230. misccmds.o:    misccmds.c  $(INCL)
  231.     $(CC) $(CFLAGS) misccmds.c
  232.  
  233. normal.o:    normal.c  $(INCL) ops.h
  234.     $(CC) $(CFLAGS) normal.c
  235.  
  236. ops.o:    ops.c  $(INCL) ops.h
  237.     $(CC) $(CFLAGS) ops.c
  238.  
  239. param.o:    param.c  $(INCL)
  240.     $(CC) $(CFLAGS) param.c
  241.  
  242. quickfix.o:    quickfix.c  $(INCL)
  243.     $(CC) $(CFLAGS) quickfix.c
  244.  
  245. regexp.o:    regexp.c  $(INCL)
  246.     $(CC) $(CFLAGS) regexp.c
  247.  
  248. regsub.o:    regsub.c  $(INCL)
  249.     $(CC) $(CFLAGS) regsub.c
  250.  
  251. screen.o:    screen.c  $(INCL)
  252.     $(CC) $(CFLAGS) screen.c
  253.  
  254. script.o:    script.c  $(INCL)
  255.     $(CC) $(CFLAGS) script.c
  256.  
  257. search.o:    search.c  $(INCL)
  258.     $(CC) $(CFLAGS) search.c
  259.  
  260. storage.o:    storage.c  $(INCL)
  261.     $(CC) $(CFLAGS) storage.c
  262.  
  263. tag.o:    tag.c  $(INCL)
  264.     $(CC) $(CFLAGS) tag.c
  265.  
  266. term.o:    term.c  $(INCL)
  267.     $(CC) $(CFLAGS) term.c
  268.  
  269. undo.o:    undo.c  $(INCL)
  270.     $(CC) $(CFLAGS) undo.c
  271.  
  272. cmdtab.h: cmdtab.tab mkcmdtab
  273.     ./mkcmdtab cmdtab.tab cmdtab.h
  274.  
  275. mkcmdtab: mkcmdtab.o
  276.     $(CC) -o mkcmdtab mkcmdtab.o
  277.