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