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