xref: /freebsd/usr.sbin/rpc.ypxfrd/Makefile (revision 9a14aa017b21c292740c00ee098195cd46642730)
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
14DPADD=	${LIBRPCSVC}
15LDADD=	-lrpcsvc
16
17CLEANFILES= ypxfrd_svc.c ypxfrd.h
18
19RPCDIR=	${.CURDIR}/../../include/rpcsvc
20RPCGEN= 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 ${RPCDIR}/ypxfrd.x | \
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} ${RPCDIR}/ypxfrd.x
36
37.include <bsd.prog.mk>
38