xref: /freebsd/usr.sbin/rpc.ypxfrd/Makefile (revision 952d112864d8008aa87278a30a539d888a8493cd)
1# $Id$
2
3PROG=	rpc.ypxfrd
4SRCS=	ypxfrd_svc.c ypxfrd_server.c yp_error.c \
5	yp_access.c ypxfrd_main.c
6
7RPCDIR=	${.CURDIR}/../../include/rpcsvc
8
9.PATH:	${.CURDIR}/../../usr.sbin/ypserv
10
11MAN8=	rpc.ypxfrd.8
12
13CFLAGS+= -I. -DXFRBLOCKSIZE=65535
14
15DPADD=	${LIBRPCSVC}
16LDADD=	-lrpcsvc
17
18CLEANFILES= ypxfrd_svc.c ypxfrd.h
19
20RPCGEN= rpcgen -I -C
21
22# We need to remove the 'static' keyword from _rpcsvcstate so that
23# ypxfrd_main.c can see it.
24ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x ypxfrd.h
25	rm -f ${.TARGET}
26	${RPCGEN} -m ${RPCDIR}/ypxfrd.x | \
27	sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
28
29# ypxfrd_xdr.c: ${RPCDIR}/ypxfrd.x ypxfrd.h
30#	rm -f ${.TARGET}
31#	${RPCGEN} -c -o ${.TARGET} ${RPCDIR}/ypxfrd.x
32
33ypxfrd.h: ${RPCDIR}/ypxfrd.x
34	rm -f ${.TARGET}
35	${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypxfrd.x
36
37.include <bsd.prog.mk>
38