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= /usr/libexec 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?= 4 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. 23DPADD= ${LIBRPCSVC} ${LIBCRYPT} ${LIBUTIL} 24LDADD= -lrpcsvc -lcrypt -lutil 25 26CLEANFILES= ${GENSRCS} 27 28RPCGEN= rpcgen -I -C 29 30# We need to remove the 'static' keyword from _rpcsvcstate so that 31# yppasswdd_main.c can see it. 32yppasswd_svc.c: yppasswd.x 33 rm -f ${.TARGET} 34 ${RPCGEN} -m ${RPCDIR}/yppasswd.x | \ 35 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 36 37yppasswd.h: yppasswd.x 38 rm -f ${.TARGET} 39 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yppasswd.x 40 41yp.h: yp.x 42 rm -f ${.TARGET} 43 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x 44 45yp_clnt.c: yp.x 46 rm -f ${.TARGET} 47 ${RPCGEN} -DYPSERV_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x 48 49yppasswd_private.h: yppasswd_private.x 50 rm -f ${.TARGET} 51 ${RPCGEN} -h -o ${.TARGET} ${.CURDIR}/yppasswd_private.x 52 53yppasswd_private_xdr.c: yppasswd_private.x 54 rm -f ${.TARGET} 55 ${RPCGEN} -c -o ${.TARGET} ${.CURDIR}/yppasswd_private.x 56 57yppasswd_private_svc.c: yppasswd_private.x 58 rm -f ${.TARGET} 59 ${RPCGEN} -m ${.CURDIR}/yppasswd_private.x | \ 60 sed s/"static int _rpcsvcstate = _IDLE"/"extern int _rpcsvcstate"/g > ${.TARGET} 61 62.include <bsd.prog.mk> 63