#
# Makefile for Vim on Unix, using gcc or standard cc
#

#>>>>> choose bsd (Sun, Linux) or system V (Dynix/PTX)
MACHINE=-DBSD -UMSDOS
#MACHINE = -DSYSV

#>>>>> choose one compiler
### standard C compiler, with optimizer or debugger
CC=gcc
#CC=cc -g

### GCC on sun, Dynix
#CC=gcc -g -Wall -traditional

### GCC 2.2.2d on Linux
#CC=gcc -O6 -Wall

#>>>>> choose options:
### -DDIGRAPHS		digraph support
### -DTERMCAP		full termcap file support
### -DWILD_CARDS	wildcard expansion code
### -DDEBUG		output a lot of debugging garbage
### -DNO_BUILTIN_TCAPS	do not include builtin termcap entries
###				(use only with -DTERMCAP)
### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
###				(use only without -DNO_BUILTIN_TCAPS)
### -DALL_BUILTIN_TCAPS	include all builtin termcap entries
###				(use only without -DNO_BUILTIN_TCAPS)
DEFS=-DDIGRAPHS -DTERMCAP -DWILD_CARDS -DSOME_BUILTIN_TCAPS

#>>>>> link with termlib only if TERMCAP is defined
LIBS=-ltermcap /vsta/src/lib/libc_s.a
#LIBS = 

#>>>>> end of choices
###########################################################################

CFLAGS=-g $(MACHINE) $(DEFS)

INCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h unix.h debug.h

OBJ =	alloc.o unix.o buffers.o charset.o cmdline.o csearch.o digraph.o \
	edit.o fileio.o help.o linefunc.o main.o mark.o message.o misccmds.o \
	normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \
	script.o search.o storage.o tag.o term.o undo.o

vim: $(OBJ) version.o
	$(CC) -o vim $(OBJ) version.o $(LIBS)

ctags:
	csh -c ctags *.c *.h

clean:
	-rm -f $(OBJ) mkcmdtab.o version.o core ../vim mkcmdtab

