1# $FreeBSD$ 2 3RPCDIR= ${DESTDIR}/usr/include/rpcsvc 4 5.PATH: ${.CURDIR}/../../usr.sbin/ypserv ${.CURDIR}/../../usr.bin/chpass \ 6 ${.CURDIR}/../../libexec/ypxfr ${RPCDIR} 7 8PROG= rpc.yppasswdd 9SCRIPTS=yppwupdate 10SCRIPTSDIR= ${LIBEXECDIR} 11MAN= rpc.yppasswdd.8 12SRCS= util.c yp_access.c yp_dblookup.c yp_dbwrite.c \ 13 yp_error.c yppasswdd_main.c yppasswdd_server.c ypxfr_misc.c ${GENSRCS} 14GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_private.h yppasswd_private_svc.c \ 15 yppasswd_private_xdr.c yppasswd_svc.c 16 17WARNS?= 5 18CFLAGS+= -fno-strict-aliasing 19CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \ 20 -I${.CURDIR}/../../usr.sbin/ypserv \ 21 -I${.CURDIR}/../../libexec/ypxfr \ 22 -I${.CURDIR} -I. 23LIBADD= rpcsvc crypt util 24 25CLEANFILES= ${GENSRCS} 26 27RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C 28 29# We need to remove the 'static' keyword from _rpcsvcstate so that 30# yppasswdd_main.c can see it. 31yppasswd_svc.c: yppasswd.x 32 rm -f ${.TARGET} 33 ${RPCGEN} -m ${RPCDIR}/yppasswd.x | \ 34 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 35 36yppasswd.h: yppasswd.x 37 rm -f ${.TARGET} 38 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yppasswd.x 39 40yp.h: yp.x 41 rm -f ${.TARGET} 42 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x 43 44yp_clnt.c: yp.x 45 rm -f ${.TARGET} 46 ${RPCGEN} -DYPSERV_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x 47 48yppasswd_private.h: yppasswd_private.x 49 rm -f ${.TARGET} 50 ${RPCGEN} -h -o ${.TARGET} ${.CURDIR}/yppasswd_private.x 51 52yppasswd_private_xdr.c: yppasswd_private.x 53 rm -f ${.TARGET} 54 ${RPCGEN} -c -o ${.TARGET} ${.CURDIR}/yppasswd_private.x 55 56yppasswd_private_svc.c: yppasswd_private.x 57 rm -f ${.TARGET} 58 ${RPCGEN} -m ${.CURDIR}/yppasswd_private.x | \ 59 sed s/"static int _rpcsvcstate = _IDLE"/"extern int _rpcsvcstate"/g > ${.TARGET} 60 61.include <bsd.prog.mk> 62