1# $FreeBSD$ 2 3.PATH: ${.CURDIR}/../ypserv ${.CURDIR}/../../libexec/ypxfr 4 5PROG= rpc.ypupdated 6NO_MAN= 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${.CURDIR}/../ypserv -I. -I${.CURDIR}/../../libexec/ypxfr 13 14DPADD= ${LIBRPCSVC} 15LDADD= -lrpcsvc 16 17CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h 18 19RPCDIR= ${DESTDIR}/usr/include/rpcsvc 20RPCGEN= rpcgen -I -C 21 22# We need to remove the 'static' keyword from _rpcsvcstate so that 23# ypupdated_main.c can see it. 24ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x 25 rm -f ${.TARGET} 26 ${RPCGEN} -m ${RPCDIR}/ypupdate_prot.x | \ 27 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 28 29ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x 30 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypupdate_prot.x 31 32.include <bsd.prog.mk> 33