# Makefile for the 'term' whois

# You MUST set this to the directory where the term source is.  It needs 
# client.h and client.a
TERMDIR = /usr/src/term
CC = gcc
CFLAGS = -O6 -I$(TERMDIR)

# If you want whois to compress the text, then -DTERM_COMPRESS, and if not, 
# take it out.  
DEFINES = -DTERM -DTERM_COMPRESS

BINDIR = /usr/bin
MANDIR = /usr/man

LIBS = $(TERMDIR)/client.a

INSTALL = /usr/bin/install

all: whois

whois: whois.o
	$(CC) $(CFLAGS) $(DEFINES) whois.o -o whois $(LIBS)

whois.o: whois.c
	$(CC) $(CFLAGS) $(DEFINES) -c whois.c

install: all
	$(INSTALL) -m 755 whois $(BINDIR)
	$(INSTALL) -m 644 whois.1 $(MANDIR)/man1

clean:
	-rm -f whois *.o
	