#
#	Makefile	1.1	04-Apr-91	EHK
#	Makefile	1.2	12-Jun-91	EHK	Also install man page
#

BINDIR	= /usr/local/bin
MANDIR	= /usr/local/man/man1
CC	= cc
CFLAGS	= -O
LDFLAGS	= -s
SHELL	= /bin/sh

OBJFILES	= nestor.o support.o report.o scan.o
SRCFILES	= defs.h nestor.h nestor.c support.c report.c scan.c
DISTFILES	= README Changes COPYING nestor.1 Makefile defs.h.dist \
		  patchlevel.h nestor.h nestor.c report.c scan.c support.c

nestor		: $(OBJFILES)
		$(CC) $(OBJFILES) -o $@ $(LDFLAGS)

$(OBJFILES)	: defs.h nestor.h

install		: inst_prg inst_man

inst_prg	: nestor
		cp $? $(BINDIR)
		-chmod 711 $(BINDIR)/$?

inst_man	: nestor.1
		cp $? $(MANDIR)
		-chmod 644 $(MANDIR)/$?

tags		:
		ctags -t -w $(SRCFILES)

clean		:
		rm -f nestor $(OBJFILES) core tags

spotless	: clean
		rm -f nestor.arc nestor.shar nestor.tar nestor.tar.Z defs.h

draft		:
		a2ps -nr $(SRCFILES) | laser -T

distrib		: arc shar tar

arc		:
		arc a nestor.arc $(DISTFILES)

shar		:
		shar -x -c -n nestor -a $(DISTFILES) > nestor.shar

tar		:
		tar cvf nestor.tar $(DISTFILES)
		compress -v nestor.tar
