# 
# give -- half of the v6 give-and-take package
# 
# BINDIR is where to put the executable.
# MANDIR is where the manual pages go, and MANEXT is the extension.
# for the man pages, e.g., give.1 or give.l or give.m.

BINDIR = /usr/local
MANDIR = /usr/man/manl
MANEXT = l

# These should all just be right if the above ones are.
DIRNAME = $(BINDIR)/give
DIRNAME_M = $(MANDIR)/give.$(MANEXT)
LDFLAGS = -ldbm
CFLAGS = -Y

give: give.c
	$(CC) $(CFLAGS) -o give give.c $(LDFLAGS) 

$(DIRNAME_M): give.1
	cp give.1 $(DIRNAME_M)
	chmod 644 $(DIRNAME_M)

$(DIRNAME): give
	install -c -m 755 give $(DIRNAME)

install: $(DIRNAME_M) # $(DIRNAME)

use: 
	cp $(DIRNAME) ./give
	chmod 4711 give



lint:
	lint $(CFLAGS) give.c
tags:
	ctags -w give.c
give.shar:
	shar README give.c Makefile give.1 > give.shar
clean:
	rm -f a.out core *.o give
