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