HAMMER - Stabilize and refactor volume removal
[dragonfly.git] / usr.sbin / ypserv / Makefile
blob1e80cd57be3fa3432bdc04a97d6e332cca1eb777
1 # $FreeBSD: src/usr.sbin/ypserv/Makefile,v 1.24 2004/10/18 21:42:15 ru Exp $
2 # $DragonFly: src/usr.sbin/ypserv/Makefile,v 1.3 2005/07/07 11:49:57 corecode Exp $
4 RPCDIR= ${.CURDIR}/../../include/rpcsvc
5 .PATH: ${RPCDIR}
7 PROG= ypserv
8 MAN= ypserv.8 ypinit.8
9 SRCS= 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 WARNS?= 1
13 CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I.
15 DPADD= ${LIBWRAP}
16 LDADD= -lwrap
18 CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
20 RPCGEN= rpcgen -I -C
22 # We need to remove the 'static' keyword from _rpcsvcstate so that
23 # yp_main.c can see it.
24 yp_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}
29 ypxfr_clnt.c: yp.x
30 ${RPCGEN} -DYPPUSH_ONLY -l -o ${.TARGET} ${RPCDIR}/yp.x
32 yp.h: yp.x
33 ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/yp.x
35 FILES= Makefile.yp
36 FILESNAME= Makefile.dist
37 FILESDIR= /var/yp
38 SCRIPTS= ypinit.sh
40 .if !exists(${DESTDIR}${FILESDIR}/Makefile)
41 SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile
42 .endif
44 .include <bsd.prog.mk>