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