head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	94.05.23.13.14.19;	author md;	state Exp;
branches;
next	1.1;

1.1
date	89.07.11.19.48.36;	author md;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Change to version compatible with 4.4 obj style.
@
text
@#	@@(#)Makefile	8.1 (Berkeley) 5/31/93

HDRS=	klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rquota.h rnusers.h\
	rquota.h sm_inter.h spray.h yppasswd.h yp.h bootparam_prot.h
XFILES=	${.CURDIR}/bootparam_prot.x ${.CURDIR}/klm_prot.x ${.CURDIR}/mount.x \
	${.CURDIR}/nfs_prot.x ${.CURDIR}/nlm_prot.x ${.CURDIR}/rex.x \
	${.CURDIR}/rnusers.x ${.CURDIR}/rquota.x ${.CURDIR}/sm_inter.x \
	${.CURDIR}/spray.x ${.CURDIR}/yp.x ${.CURDIR}/yppasswd.x
CFLAGS+=-I.

DPADD=  ${LIBRPC}
LDADD=  -lrpc
NOMAN=

SUBDIR=	rstat rstat_svc

RPCCOM = rpcgen

all:	${HDRS}

.SUFFIXES:	.x

.x.h:
	${RPCCOM} -h ${.IMPSRC}  -o ${.TARGET}

klm_prot.h:	klm_prot.x
mount.h:	mount.x
nfs_prot.h:	nfs_prot.x
nlm_prot.h:	nlm_prot.x
rex.h:		rex.x
rnusers.h:	rnusers.x
rquota.h:	rquota.x
sm_inter.h:	sm_inter.x
spray.h:	spray.x
yp.h:		yp.x
yppasswd.h:	yppasswd.x

afterinstall:
	install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
	    ${HDRS} ${DESTDIR}/usr/include/rpcsvc
	install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
	    ${XFILES} ${DESTDIR}/usr/include/rpcsvc

.include <bsd.prog.mk>
@


1.1
log
@Initial revision
@
text
@d1 1
a1 6
#
# @@(#)Makefile	2.3 88/08/11 4.0 RPCSRC
#
#
RPCCOM = rpcgen
LIB = -lrpclib
d3 7
a9 3
DESTDIR=
CFLAGS= -O
LDFLAGS=
d11 3
a13 7
HDRS= 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
BIN= rstat
SVCBIN= rstat_svc
GEN= rstat_clnt.c rstat_svc.c rstat_xdr.c
d15 1
a15 1
all:	$(HDRS) $(BIN) $(SVCBIN)
d17 1
a17 16
install: $(HDRS) $(XFILES)
	@@echo "Creating RPC service headers directory"
	-mkdir ${DESTDIR}/usr/include/rpcsvc && \
		chown bin ${DESTDIR}/usr/include/rpcsvc && \
		chmod 755 ${DESTDIR}/usr/include/rpcsvc
	@@echo "Installing RPC service header and definition files"
	for i in $(HDRS) $(XFILES); do \
		(install -c -m 644 $$i ${DESTDIR}/usr/include/rpcsvc) done
	-mkdir ${DESTDIR}/etc && chown bin ${DESTDIR}/etc && \
		chmod 755 ${DESTDIR}/etc
	@@echo "Installing ${SVCBIN} in ${DESTDIR}/etc"
	@@set -x;for i in ${SVCBIN}; do \
		(install -c -s $$i ${DESTDIR}/etc/$$i); done
	@@echo "Installing ${BIN} in ${DESTDIR}/usr/bin"
	@@set -x;for i in ${BIN}; do \
		(install -c -s $$i ${DESTDIR}/usr/bin/$$i); done
d19 1
a19 2
rstat_svc: rstat_proc.o rstat_svc.o rstat_xdr.o
	$(CC) $(LDFLAGS) -o $@@ rstat_proc.o rstat_svc.o rstat_xdr.o $(LIB)
d21 1
a21 2
rstat: rstat.o rstat_clnt.o rstat_xdr.o
	$(CC) $(LDFLAGS) -o $@@ rstat.o rstat_clnt.o rstat_xdr.o $(LIB)
d23 2
a24 1
rstat.c rstat_proc.c:	rstat.h
a26 1
	$(RPCCOM) -h klm_prot.x -o $@@
a27 1
	$(RPCCOM) -h mount.x -o $@@
a28 1
	$(RPCCOM) -h nfs_prot.x -o $@@
d30 1
a30 3
	$(RPCCOM) -h nlm_prot.x -o $@@
rex.h:	rex.x
	$(RPCCOM) -h rex.x -o $@@
a31 1
	$(RPCCOM) -h rnusers.x -o $@@
a32 3
	$(RPCCOM) -h rquota.x -o $@@
rstat.h:	rstat.x
	$(RPCCOM) -h rstat.x -o $@@
a33 1
	$(RPCCOM) -h sm_inter.x -o $@@
d35 1
a35 3
	$(RPCCOM) -h spray.x -o $@@
yp.h:	yp.x
	$(RPCCOM) -h yp.x -o $@@
a36 1
	$(RPCCOM) -h yppasswd.x -o $@@
d38 5
a42 6
rstat_clnt.c:	rstat.x
	$(RPCCOM) -l rstat.x -o $@@
rstat_svc.c:	rstat.x
	$(RPCCOM) -s udp rstat.x -o $@@
rstat_xdr.c:	rstat.x
	$(RPCCOM) -c rstat.x -o $@@
d44 1
a44 2
clean cleanup:
	rm -f *.o $(GEN) $(BIN) $(SVCBIN)
@
