xref: /freebsd/usr.sbin/rpc.ypxfrd/Makefile (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1# $FreeBSD$
2
3.PATH: ${SRCTOP}/usr.sbin/ypserv
4
5PACKAGE=yp
6PROG=	rpc.ypxfrd
7MAN=	rpc.ypxfrd.8
8SRCS=	ypxfrd_svc.c ypxfrd.h ypxfrd_server.c yp_error.c \
9	yp_access.c ypxfrd_main.c
10
11CFLAGS+= -I. -DXFRBLOCKSIZE=65535
12
13WARNS?=	2
14
15LIBADD=	rpcsvc
16
17CLEANFILES= ypxfrd_svc.c ypxfrd.h
18
19RPCDIR=	${SRCTOP}/include/rpcsvc
20RPCGEN= RPCGEN_CPP=${CPP:Q} 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
25	rm -f ${.TARGET}
26	${RPCGEN} -m ${.ALLSRC} | \
27	sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
28
29# ypxfrd_xdr.c: ${RPCDIR}/ypxfrd.x
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} ${.ALLSRC}
36
37.include <bsd.prog.mk>
38