3 RPCDIR= ${DESTDIR}/usr/include/rpcsvc
5 .PATH: ${.CURDIR}/../../usr.sbin/ypserv ${.CURDIR}/../../usr.bin/chpass \
6 ${.CURDIR}/../../libexec/ypxfr ${RPCDIR}
10 SRCS= util.c yp_access.c yp_dblookup.c yp_dbwrite.c \
11 yp_error.c yppasswdd_main.c yppasswdd_server.c ypxfr_misc.c ${GENSRCS}
12 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_private.h yppasswd_private_svc.c \
13 yppasswd_private_xdr.c yppasswd_svc.c
15 CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \
16 -I${.CURDIR}/../../usr.sbin/ypserv \
17 -I${.CURDIR}/../../libexec/ypxfr \
21 DPADD= ${LIBRPCSVC} ${LIBCRYPT} ${LIBUTIL}
22 LDADD= -lrpcsvc -lcrypt -lutil
24 CLEANFILES= ${GENSRCS}
28 # We need to remove the 'static' keyword from _rpcsvcstate so that
29 # yppasswdd_main.c can see it.
30 yppasswd_svc.c: yppasswd.x
32 ${RPCGEN} -m ${RPCDIR}/yppasswd.x | \
33 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
35 yppasswd.h: yppasswd.x
37 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yppasswd.x
41 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x
45 ${RPCGEN} -DYPSERV_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x
47 yppasswd_private.h: yppasswd_private.x
49 ${RPCGEN} -h -o ${.TARGET} ${.CURDIR}/yppasswd_private.x
51 yppasswd_private_xdr.c: yppasswd_private.x
53 ${RPCGEN} -c -o ${.TARGET} ${.CURDIR}/yppasswd_private.x
55 yppasswd_private_svc.c: yppasswd_private.x
57 ${RPCGEN} -m ${.CURDIR}/yppasswd_private.x | \
58 sed s/"static int _rpcsvcstate = _IDLE"/"extern int _rpcsvcstate"/g > ${.TARGET}
61 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
62 ${.CURDIR}/yppwupdate \
63 ${DESTDIR}/usr/libexec/yppwupdate
65 .include <bsd.prog.mk>