#   Copyright 1992 by Simmule R. Turner
#
#   Permission is granted to make and distribute VERBATIM copies
#   of this software provided the above copyright notice and this
#   permission notice are preserved in all copies.
#
#   ALL other rights are reserved.
#
#   NO WARRANTY is provided with this software. */
#
#
VER=0.95.1

CC=cc
#CC=gcc -ansi -pedantic -Wall

#
#MEMMOVE = memmove.o
#MEMMOVE =

# ANSI_ARROWS         - ansi arrows keys work like there emacs equivalent
# HIST_SIZE           - set number of history entries (16 by default)
# NOSTDLIB            - no <stdlib.h>
# _POSIX_SOURCE       - if machine has POSIX.1 functionality
# -Dmemmove=xmemmove  - if you defined MEMMOVE above
# 
OPTIONS= -DANSI_ARROWS
#OPTIONS= -Dmemmove=xmemmove


#RANLIB=ranlib
#RANLIB=/bin/true      - if your machine has a busy ar.
RANLIB=:


CFLAGS = $(OPTIONS) -O -I..
#
RELS = editline.o history.o complete.o $(MEMMOVE)

#
DOCS = ChangeLog QuickRef
SRCS = Makefile \
       editline.c editline.h \
       history.c history.h \
       complete.c complete.h \
       support.x readline.h \
       memmove.c

libedit.a: $(RELS)
	ar rv $@ $(RELS)
	$(RANLIB) $@

editline.o: editline.c editline.h support.x
history.o: history.c history.h
complete.o: complete.c complete.h

home:
	shar $(SRCS) $(DOCS) | Mail -s "editline.sh $(VER)" simmy@sysgo.UUCP

work:
	shar $(SRCS) $(DOCS) | Mail -s "editline.sh $(VER)" simmy@capitol.com

shar:
	shar $(SRCS) $(DOCS) >editline.sh

clean:
	rm -f $(RELS) libedit.a *~

lint:
	$(CC) $(CFLAGS) -c editline.c history.c complete.c
