xref: /freebsd/usr.sbin/rpc.ypxfrd/Makefile (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1# $FreeBSD$
2
3.PATH: ${SRCTOP}/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=	${SRCTOP}/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 ${.ALLSRC} | \
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} ${.ALLSRC}
35
36.include <bsd.prog.mk>
37