xref: /dragonfly/usr.bin/chpass/Makefile (revision 984263bc)
1#	@(#)Makefile	8.2 (Berkeley) 4/2/94
2# $FreeBSD: src/usr.bin/chpass/Makefile,v 1.20.2.3 2001/12/19 04:49:11 dd Exp $
3
4PROG=	chpass
5CFLAGS+=-Wall
6SRCS=	chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
7	table.c util.c ypxfr_misc.c ${GENSRCS}
8GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \
9	yppasswd_private_clnt.c yppasswd_private_xdr.c
10BINMODE=4555
11.PATH:	${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../usr.sbin/vipw \
12	${.CURDIR}/../../libexec/ypxfr \
13	${.CURDIR}/../../usr.sbin/rpc.yppasswdd \
14	${.CURDIR}/../../lib/libc/gen
15CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw -I${.CURDIR}/../../lib/libc/gen
16LINKS=	${BINDIR}/chpass ${BINDIR}/chfn
17LINKS+=	${BINDIR}/chpass ${BINDIR}/chsh
18LINKS+=	${BINDIR}/chpass ${BINDIR}/ypchpass
19LINKS+=	${BINDIR}/chpass ${BINDIR}/ypchfn
20LINKS+=	${BINDIR}/chpass ${BINDIR}/ypchsh
21
22MLINKS=	chpass.1 chfn.1 chpass.1 chsh.1
23MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
24
25CFLAGS+=-DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
26	-I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
27
28#Some people need this, uncomment to activate
29#CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
30
31DPADD=	${LIBRPCSVC} ${LIBCRYPT} ${LIBMD}
32LDADD+=	-lrpcsvc -lcrypt -lmd
33
34CLEANFILES= ${GENSRCS}
35
36RPCGEN= rpcgen -C
37RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
38RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
39RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
40
41yp.h: ${RPCSRC}
42	${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
43
44yp_clnt.c: ${RPCSRC}
45	${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
46
47yppasswd.h: ${RPCSRC_PW}
48	${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
49
50yppasswd_clnt.c: ${RPCSRC_PW}
51	${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
52
53yppasswd_private.h: ${RPCSRC_PRIV}
54	${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
55
56yppasswd_private_xdr.c: ${RPCSRC_PRIV}
57	${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
58
59yppasswd_private_clnt.c: ${RPCSRC_PRIV}
60	${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
61
62beforeinstall:
63.for i in chpass chfn chsh ypchpass ypchfn ypchsh
64	[ ! -e ${DESTDIR}${BINDIR}/$i ] || \
65		chflags noschg ${DESTDIR}${BINDIR}/$i || true
66.endfor
67
68afterinstall:
69	-chflags schg ${DESTDIR}${BINDIR}/chpass
70
71.include <bsd.prog.mk>
72