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