Add nsswitch support.
[dragonfly.git] / usr.bin / passwd / Makefile
CommitLineData
984263bc
MD
1# From: @(#)Makefile 8.3 (Berkeley) 4/2/94
2# $FreeBSD: src/usr.bin/passwd/Makefile,v 1.40.2.3 2002/07/17 19:08:22 ru Exp $
c03f08f3 3# $DragonFly: src/usr.bin/passwd/Makefile,v 1.5 2007/08/27 16:50:57 pavalos Exp $
984263bc
MD
4
5# NOPAM is used by PicoBSD
6
7.if defined(NOPAM)
8
9PROG= passwd
ed5d5720 10SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c
984263bc
MD
11
12GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
13 yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
984263bc
MD
14
15DPADD= ${LIBCRYPT} ${LIBUTIL}
16LDADD= -lcrypt -lutil
17.PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/pwd_mkdb \
18 ${.CURDIR}/../../usr.sbin/vipw \
19 ${.CURDIR}/../rlogin
20
21CFLAGS+= -DLOGIN_CAP -DCRYPT -I. -I${.CURDIR} \
22 -I${.CURDIR}/../../usr.sbin/vipw \
23 -I${.CURDIR}/../../usr.bin/chpass \
24 -I${.CURDIR}/../../usr.sbin/pwd_mkdb \
ed5d5720 25 -I${.CURDIR}/../../lib/libc/gen \
984263bc
MD
26 -Dyp_error=warnx -DLOGGING
27
28.else
29
30PROG= passwd
ed5d5720 31SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c pw_yp.c \
984263bc
MD
32 yp_passwd.c ypxfr_misc.c ${GENSRCS}
33GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
34 yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
984263bc
MD
35
36DPADD= ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
37LDADD= -lcrypt -lrpcsvc -lutil
38.PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/pwd_mkdb \
39 ${.CURDIR}/../../usr.sbin/vipw \
40 ${.CURDIR}/../rlogin ${.CURDIR}/../../libexec/ypxfr \
41 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
42
43CFLAGS+= -DLOGIN_CAP -DCRYPT -DYP -I. -I${.CURDIR} \
44 -I${.CURDIR}/../../usr.sbin/vipw \
45 -I${.CURDIR}/../../usr.bin/chpass \
46 -I${.CURDIR}/../../libexec/ypxfr \
47 -I${.CURDIR}/../../usr.sbin/pwd_mkdb \
48 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd \
ed5d5720 49 -I${.CURDIR}/../../lib/libc/gen \
984263bc
MD
50 -Dyp_error=warnx -DLOGGING
51
52.endif
53
54CLEANFILES= ${GENSRCS}
55
56RPCGEN= rpcgen -C
57RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
58RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
59RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
60
61yp.h: ${RPCSRC}
62 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
63
64yp_clnt.c: ${RPCSRC} yp.h
65 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
66
67yppasswd.h: ${RPCSRC_PW}
68 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
69
70yppasswd_clnt.c: ${RPCSRC_PW}
71 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
72
73yppasswd_private.h: ${RPCSRC_PRIV}
74 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
75
76yppasswd_private_xdr.c: ${RPCSRC_PRIV}
77 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
78
79yppasswd_private_clnt.c: ${RPCSRC_PRIV}
80 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
81
82BINMODE=4555
83LINKS=${BINDIR}/passwd ${BINDIR}/yppasswd
84MLINKS=passwd.1 yppasswd.1
ce0e08e2 85WARNS?= 0
984263bc 86
984263bc
MD
87beforeinstall:
88.for i in passwd yppasswd
89 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
90 chflags noschg ${DESTDIR}${BINDIR}/$i || true
91.endfor
92
5e6263df 93.if !defined(NOFSCHG)
984263bc
MD
94afterinstall:
95 -chflags schg ${DESTDIR}${BINDIR}/passwd
5e6263df 96.endif
984263bc
MD
97
98.include <bsd.prog.mk>