summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.ypupdated/Makefile
blob: 5b245758b7f4c114a734c7b69c8bfb0e5e512372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $FreeBSD$

PROG=	rpc.ypupdated
SRCS=	ypupdate_prot_svc.c ypupdate_prot.h ypupdated_main.c \
	yp_error.c update.c ypupdated_server.c \
	yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c

.PATH: ${.CURDIR}/../ypserv ${.CURDIR}/../../libexec/ypxfr

RPCDIR=	${DESTDIR}/usr/include/rpcsvc

NOMAN= yes

CFLAGS+= -I${.CURDIR}/../ypserv -I.
CFLAGS+= -I${.CURDIR}/../../libexec/ypxfr

#CFLAGS+= -DYP

DPADD=	${LIBRPCSVC}
LDADD=	-lrpcsvc

CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h

RPCGEN= rpcgen -I -C

# We need to remove the 'static' keyword from _rpcsvcstate so that
# ypupdated_main.c can see it.
ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x
	rm -f ${.TARGET}
	${RPCGEN} -m ${RPCDIR}/ypupdate_prot.x | \
	sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}

ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x
	${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypupdate_prot.x

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud