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 13WARNS?= 0 14 15DPADD= ${LIBWRAP} 16LDADD= -lwrap 17 18CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h 19 20RPCGEN= rpcgen -I -C 21 22# We need to remove the 'static' keyword from _rpcsvcstate so that 23# yp_main.c can see it. 24yp_svc.c: yp.x 25 rm -f ${.TARGET} 26 ${RPCGEN} -DYPSERV_ONLY -m ${RPCDIR}/yp.x | \ 27 sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} 28 29ypxfr_clnt.c: yp.x 30 ${RPCGEN} -DYPPUSH_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x 31 32yp.h: yp.x 33 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x 34 35FILES= Makefile.yp 36FILESNAME= Makefile.dist 37FILESDIR= /var/yp 38SCRIPTS= ypinit.sh 39 40.if !exists(${DESTDIR}${FILESDIR}/Makefile) 41SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile 42.endif 43 44.include <bsd.prog.mk> 45