#
# $RCSfile: Imakefile,v $
# $Revision: 1.11 $
# $Date: 1995/03/02 23:39:59 $
# $Author: nhall $
#
#
DESTDIR=.

RPCGEN = ../rpcgen/rpcgen
INCLUDE += -I../rpc/include
CPPFLAGS = -I..
AUXFLAGS = -I.. -DUW
LIB = ../rpc/librpclib.a

OBJ.librpcsvc =  mount_xdr.o

HFILES= klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rquota.h rnusers.h\
      rquota.h rstat.h sm_inter.h spray.h yppasswd.h yp.h
XFILES= bootparam_prot.x klm_prot.x mount.x nfs_prot.x nlm_prot.x \
      rex.x rnusers.x rquota.x rstat.x sm_inter.x spray.x yppasswd.x yp.x
SVCBIN= rstat_svc
SRC= rstat.c rstat_proc.c
GEN= rstat_clnt.c rstat_svc.c rstat_xdr.c

SRC.cvs = $(SRC) $(XFILES) 

OBJ = $(SRC:.c=.o)

EXEC = 
DISPOSABLE=$(HFILES) $(BIN) $(EXEC) $(GEN)


ALLTARGETS =mount.h librpcsvc.a

clean_files($(DISPOSABLE) $(OBJ) rstat_svc)

## NB: these aren't ported since we're not using them for Shore 
rstat_svc: rstat_proc.o rstat_svc.o rstat_xdr.o
	$(CC) $(LDFLAGS) -o $@ rstat_proc.o rstat_svc.o rstat_xdr.o $(LIB)

## NB: these aren't ported since we're not using them for Shore 
rstat: rstat.o rstat_clnt.o rstat_xdr.o
	$(CC) $(LDFLAGS) -o $@ rstat.o rstat_clnt.o rstat_xdr.o $(LIB)

## NB: these aren't ported since we're not using them for Shore 
rstat.c rstat_proc.c:	rstat.h

klm_prot.h:	klm_prot.x
	$(RPCGEN) -h klm_prot.x -o $@

mount.h:	mount.x
	$(RPCGEN) -h mount.x -o $@
mount_clnt.c:	mount.x
	$(RPCGEN) -l mount.x -o $@
mount_svc.c:	mount.x
	$(RPCGEN) -s udp rstat.x -o $@
mount_xdr.c:	mount.x
	$(RPCGEN) -c mount.x -o $@

nfs_prot.h:	nfs_prot.x
	$(RPCGEN) -h nfs_prot.x -o $@
nlm_prot.h:	nlm_prot.x
	$(RPCGEN) -h nlm_prot.x -o $@
rex.h:	rex.x
	$(RPCGEN) -h rex.x -o $@
rnusers.h:	rnusers.x
	$(RPCGEN) -h rnusers.x -o $@
rquota.h:	rquota.x
	$(RPCGEN) -h rquota.x -o $@
rstat.h:	rstat.x
	$(RPCGEN) -h rstat.x -o $@
sm_inter.h:	sm_inter.x
	$(RPCGEN) -h sm_inter.x -o $@
spray.h:	spray.x
	$(RPCGEN) -h spray.x -o $@
yp.h:	yp.x
	$(RPCGEN) -h yp.x -o $@
yppasswd.h:	yppasswd.x
	$(RPCGEN) -h yppasswd.x -o $@

rstat_clnt.c:	rstat.x
	$(RPCGEN) -l rstat.x -o $@
rstat_svc.c:	rstat.x
	$(RPCGEN) -s udp rstat.x -o $@
rstat_xdr.c:	rstat.x
	$(RPCGEN) -c rstat.x -o $@

depend_target($(SRC))

SYMLINKS=

build_library(librpcsvc.a, $(OBJ.librpcsvc))
