1# $FreeBSD$ 2 3.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr 4 5PACKAGE=yp 6PROG= rpc.ypupdated 7MAN= 8SRCS= ypupdate_prot_svc.c ypupdate_prot.h ypupdated_main.c \ 9 yp_error.c update.c ypupdated_server.c \ 10 yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c 11 12#CFLAGS+= -DYP 13CFLAGS+= -I${SRCTOP}/usr.sbin/ypserv -I. -I${SRCTOP}/libexec/ypxfr 14 15WARNS?= 1 16 17LIBADD= rpcsvc 18 19CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h 20 21RPCDIR= ${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc 22RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C 23 24# We need to remove the 'static' keyword from _rpcsvcstate so that 25# ypupdated_main.c can see it. 26ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x 27 rm -f ${.TARGET} 28 ${RPCGEN} -m ${.ALLSRC} | \ 29 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 30 31ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x 32 ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC} 33 34.include <bsd.prog.mk> 35