#
# Makefile for webster server.
#
# David A. Curry
# Purdue University
# davy@ee.purdue.edu
# April, 1986
#
# Modified for Sun RPC webster server by Jean Marie Diaz (ambar@athena.mit.edu)
#
# $Source: /afs/sipb.mit.edu/project/sipbsrc/src/webster/src/server/RCS/Makefile,v $
# $Header: /afs/sipb.mit.edu/project/sipbsrc/src/webster/src/server/RCS/Makefile,v 1.12 95/10/01 19:23:18 mhpower Exp $
# $Author: mhpower $
#
# $Log:	Makefile,v $
# Revision 1.12  95/10/01  19:23:18  mhpower
# added access.c for IP-address checking
# 
# Revision 1.11  92/03/31  00:52:38  jik
# Just a little something to wile away  the hours.
# 
# Revision 1.10  1992/03/31  00:22:46  jik
# Changes from Ambar.
#
# Revision 1.9  90/10/21  18:43:34  ambar
# changed to use dbm instead of ndbm (for !#$#% lusing 4.2 based ultrix)
# 
# Revision 1.8  90/04/04  12:30:18  jik
# Better install rules and better macro formatting.
# 
# Revision 1.7  89/12/14  18:35:06  jik
# added CDEBUGFLAGS to CFLAGS
# 
# Revision 1.6  89/09/25  16:58:24  jik
# added saber rule; put RPCOBJS in a separate variable for easier manipulation
# 
# Revision 1.5  88/02/29  05:17:35  ambar
# rearranged to use files in ../../lib.
# 
# Revision 1.4  88/02/26  21:57:39  ambar
# changed from -g cflag to -O
# 
# Revision 1.3  88/02/25  22:51:17  ambar
# rearranged & reshuffled.
# 
# Revision 1.2  88/02/20  07:07:11  ambar
# edited for SUNRPC
# 
#
DESTDIR=
SERVERDIR=	/usr/local
MANDIR=		/usr/sipb/man
MANSECT=	8
CFLAGS= 	-I../../include -DSUNRPC $(CDEBUGFLAGS) -DAPRIL_FOOL
RPCOBJS= 	rpcd.o svc_simple.o access.o defns.o common.o
RPCSRCS= 	rpcd.c svc_simple.c access.c defns.c common.c
OBJS=		functions.o search.o printdef.o webster.o main.o $(RPCOBJS)
SRCS=		functions.c search.c printdef.c webster.c main.c $(RPCSRCS)
LIBS=		-ldbm

all:	websterd

websterd: $(OBJS)
	$(CC) $(CFLAGS) -o websterd $(OBJS) $(LIBS)

install: all
	-install -c -s websterd $(SERVERDIR)
	install -c -s websterd.8 \
		$(DESTDIR)$(MANDIR)/man$(MANSECT)/websterd.$(MANSECT)

saber:
	#load $(CFLAGS) $(OBJS) $(LIBS)

lint:
	lint -ha 
clean:
	rm -f websterd core *.o

main.o:		../../include/index.h ../../include/webster.h
main.o:		../../include/wordfiles.h
search.o:	../../include/index.h ../../include/webster.h
search.o:	../../include/sunrpcweb.h
webster.o:	../../include/webster.h
printdef.o:	../../include/index.h ../../include/webster.h
printdef.o:	../../include/sunrpcweb.h
functions.o:	../../include/index.h ../../include/webster.h
functions.o:	../../include/sunrpcweb.h
rpcd.o:		../../include/webster.h ../../include/wordfiles.h
rpcd.o:		../../include/index.h ../../include/sunrpcweb.h

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

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

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

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