#
# Makefile for webster program
#
# David A. Curry
# Purdue University
# davy@ee.purdue.edu
# April, 1986
#
# Modified for Sun RPC webster client by Jean Marie Diaz (ambar@athena.mit.edu)
#
# $Source: /afs/sipb.mit.edu/project/sipbsrc/src/webster/src/ttyclient/RCS/Makefile,v $
# $Header: /afs/sipb.mit.edu/project/sipbsrc/src/webster/src/ttyclient/RCS/Makefile,v 1.7 94/07/06 01:28:35 svalente Exp $
# $Author: svalente $

DESTDIR=
BINDIR=		/afs/.sipb/project/sipb/bin
MANDIR=		/afs/.sipb/project/sipb/man
MANSECT=	1
CFLAGS=		-O -I../../include -I/usr/athena/include \
		-DAPRIL_FOOL -DSUNRPC -DHESIOD -DTTYCLIENT $(POSIX)
POSIX=		-DPOSIX
OBJS = 		webster.o clnt_simple.o client.o common.o

# uncomment this line for Solaris
# LIBS=		-lresolv -lsocket -lnsl athena.o


webster: $(OBJS) 
	$(CC) $(CFLAGS) -o webster $(OBJS) -L/usr/athena/lib -lhesiod $(LIBS)

webster.o:	../../include/webster.h

clnt_simple.o:	../../lib/clnt_simple.c
	$(CC) $(CFLAGS) -c ../../lib/clnt_simple.c

client.o:	../../lib/client.c ../../include/sunrpcweb.h
client.o:	../../include/webster.h
	$(CC) $(CFLAGS) -c ../../lib/client.c

common.o:	../../lib/common.c ../../include/sunrpcweb.h
common.o:	../../include/webster.h
	$(CC) $(CFLAGS) -c ../../lib/common.c

install: webster
	install -c -s webster $(DESTDIR)${BINDIR}
	install -c webster.man \
		${DESTDIR}${MANDIR}/man${MANSECT}/webster.${MANSECT}

clean:
	rm -f webster core *.o
