#
# makefile for xwebster
#
# MIT Project Athena
#
# $Source: /afs/sipb.mit.edu/project/sipbsrc/src/webster/src/xwebster/RCS/Makefile.noImake,v $
# $Header: /afs/sipb.mit.edu/project/sipbsrc/src/webster/src/xwebster/RCS/Makefile.noImake,v 1.16 94/07/06 01:32:25 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 \
		-DSUNRPC -DHESIOD -DXCLIENT $(POSIX)
POSIX=		-DPOSIX

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

OBJS = xweb.o init.o clnt_simple.o defns.o client.o common.o
SRCS = xweb.c init.c ../../lib/clnt_simple.c ../../lib/defns.c\
	../../lib/client.c ../../lib/common.c
all:		xwebster

xwebster:	${OBJS}
	${CC} $(CFLAGS) -o xwebster ${OBJS} -L/usr/athena/lib -lX11 -lhesiod $(LIBS)

xweb.o:	../../include/closed.h ../../include/xwebster.h
xweb.o: ../../include/sunrpcweb.h ../../include/webster.h
init.o:	../../include/xwebster.h

saber: $(SRCS)
	#load $(CFLAGS) $(SRCS) -L/usr/athena/lib -lX11 -lhesiod

defns.o:	../../lib/defns.c
	${CC} $(CFLAGS) -c ../../lib/defns.c

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

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

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

install:	xwebster man_install
	install -c -s xwebster $(DESTDIR)${BINDIR}/xwebster

man_install: xwebster.man
	install -c -m 444 xwebster.man $(DESTDIR)$(MANDIR)/man$(MANSECT)/xwebster.$(MANSECT)

lint:
	lint -phbxac *.c -lX11

clean:
	/bin/rm -f xwebster core *~ *.o lint.out
