1# $FreeBSD$ 2 3RPCDIR= ${.CURDIR}/../../include/rpcsvc 4.PATH: ${RPCDIR} \ 5 ${.CURDIR}/common 6 7PROG= ypserv 8MAN= ypserv.8 ypinit.8 9SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \ 10 ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c \ 11 yplib_host.c 12 13CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I. 14 15WARNS?= 0 16 17LIBADD= wrap 18 19CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h 20 21RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C 22 23# We need to remove the 'static' keyword from _rpcsvcstate so that 24# yp_main.c can see it. 25yp_svc.c: yp.x 26 rm -f ${.TARGET} 27 ${RPCGEN} -DYPSERV_ONLY -m ${RPCDIR}/yp.x | \ 28 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 29 30ypxfr_clnt.c: yp.x 31 ${RPCGEN} -DYPPUSH_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x 32 33yp.h: yp.x 34 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x 35 36FILES= Makefile.yp 37FILESNAME= Makefile.dist 38FILESDIR= /var/yp 39SCRIPTS= ypinit.sh 40 41.if !exists(${DESTDIR}${FILESDIR}/Makefile) 42SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile 43.endif 44 45.include <bsd.prog.mk> 46