cbc9c8eff58b80b0f68a0dfcea2cd416c82798de
[dragonfly.git] / usr.sbin / rpc.ypupdated / Makefile
1 # $FreeBSD: src/usr.sbin/rpc.ypupdated/Makefile,v 1.10 2004/12/21 08:47:34 ru Exp $
2 # $DragonFly: src/usr.sbin/rpc.ypupdated/Makefile,v 1.2 2003/06/17 04:30:02 dillon Exp $
3
4 .PATH: ${.CURDIR}/../ypserv ${.CURDIR}/../../libexec/ypxfr
5
6 PROG=   rpc.ypupdated
7 NOMAN=
8 SRCS=   ypupdate_prot_svc.c ypupdate_prot.h ypupdated_main.c \
9         yp_error.c update.c ypupdated_server.c \
10         yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c
11
12 #CFLAGS+= -DYP
13 CFLAGS+= -I${.CURDIR}/../ypserv -I. -I${.CURDIR}/../../libexec/ypxfr
14
15 DPADD=  ${LIBRPCSVC}
16 LDADD=  -lrpcsvc
17
18 CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h
19
20 RPCDIR= ${DESTDIR}/usr/include/rpcsvc
21 RPCGEN= rpcgen -I -C
22
23 # We need to remove the 'static' keyword from _rpcsvcstate so that
24 # ypupdated_main.c can see it.
25 ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x
26         rm -f ${.TARGET}
27         ${RPCGEN} -m ${RPCDIR}/ypupdate_prot.x | \
28         sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
29
30 ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x
31         ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypupdate_prot.x
32
33 .include <bsd.prog.mk>