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