xref: /freebsd/usr.sbin/rpc.ypxfrd/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1.PATH: ${SRCTOP}/usr.sbin/ypserv
2
3PACKAGE=yp
4PROG=	rpc.ypxfrd
5MAN=	rpc.ypxfrd.8
6SRCS=	ypxfrd_svc.c ypxfrd.h ypxfrd_server.c yp_error.c \
7	yp_access.c ypxfrd_main.c
8
9CFLAGS+= -I. -DXFRBLOCKSIZE=65535
10
11WARNS?=	2
12
13LIBADD=	rpcsvc
14
15CLEANFILES= ypxfrd_svc.c ypxfrd.h
16
17RPCDIR=	${SRCTOP}/include/rpcsvc
18RPCGEN= RPCGEN_CPP=${CPP:Q} 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 ${.ALLSRC} | \
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} ${.ALLSRC}
34
35.include <bsd.prog.mk>
36