CFLAGS = -O
BINDIR = /usr/ucb		# this is where biff gets installed
ETCDIR = /usr/etc		# this is comsat's directory.
MANDIR = /usr/man

all: comsat biff

comsat: comsat.c config.h
	$(CC) $(CFLAGS) comsat.c -o $@

# Biff has to be setuid root, because it has to grab a secure internet port.
# There are no calls to gets() or insecure strcpy() or bcopy() calls.
biff: biff.c config.h
	$(CC) $(CFLAGS) biff.c -o $@

installprogs: all
	install -m 4755 -o root biff $(BINDIR)
	install -m 755 -o root comsat $(ETCDIR)

installman:
	install -m 644 -o root biff.1 $(MANDIR)/man1
	install -m 644 -o root comsat.8c $(MANDIR)/man8

install: installprogs installman

clean:
	/bin/rm -f biff comsat core
