xref: /freebsd/usr.sbin/rpc.ypupdated/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
2
3PACKAGE=yp
4PROG=	rpc.ypupdated
5MAN=
6SRCS=	ypupdate_prot_svc.c ypupdate_prot.h ypupdated_main.c \
7	yp_error.c update.c ypupdated_server.c \
8	yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c
9
10#CFLAGS+= -DYP
11CFLAGS+= -I${SRCTOP}/usr.sbin/ypserv -I. -I${SRCTOP}/libexec/ypxfr
12
13WARNS?=	1
14
15LIBADD=	rpcsvc
16
17CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h
18
19RPCDIR=	${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc
20RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C
21
22# We need to remove the 'static' keyword from _rpcsvcstate so that
23# ypupdated_main.c can see it.
24ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x
25	rm -f ${.TARGET}
26	${RPCGEN} -m ${.ALLSRC} | \
27	sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
28
29ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x
30	${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
31
32.include <bsd.prog.mk>
33