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