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