Merge from vendor branch LESS:
[dragonfly.git] / usr.bin / passwd / Makefile
blob7b94f9309eec9197f179671b148bbc10f210bd72
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 $
3 # $DragonFly: src/usr.bin/passwd/Makefile,v 1.5 2007/08/27 16:50:57 pavalos Exp $
5 # NOPAM is used by PicoBSD
7 .if defined(NOPAM)
9 PROG= passwd
10 SRCS= local_passwd.c passwd.c pw_copy.c pw_scan.c pw_util.c
12 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
13 yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
15 DPADD= ${LIBCRYPT} ${LIBUTIL}
16 LDADD= -lcrypt -lutil
17 .PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/pwd_mkdb \
18 ${.CURDIR}/../../usr.sbin/vipw \
19 ${.CURDIR}/../rlogin
21 CFLAGS+= -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 \
25 -Dyp_error=warnx -DLOGGING
27 .else
29 PROG= passwd
30 SRCS= local_passwd.c passwd.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
31 yp_passwd.c ypxfr_misc.c ${GENSRCS}
32 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
33 yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
35 DPADD= ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
36 LDADD= -lcrypt -lrpcsvc -lutil
37 .PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/pwd_mkdb \
38 ${.CURDIR}/../../usr.sbin/vipw \
39 ${.CURDIR}/../rlogin ${.CURDIR}/../../libexec/ypxfr \
40 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
42 CFLAGS+= -DLOGIN_CAP -DCRYPT -DYP -I. -I${.CURDIR} \
43 -I${.CURDIR}/../../usr.sbin/vipw \
44 -I${.CURDIR}/../../usr.bin/chpass \
45 -I${.CURDIR}/../../libexec/ypxfr \
46 -I${.CURDIR}/../../usr.sbin/pwd_mkdb \
47 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd \
48 -Dyp_error=warnx -DLOGGING
50 .endif
52 CLEANFILES= ${GENSRCS}
54 RPCGEN= rpcgen -C
55 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
56 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
57 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
59 yp.h: ${RPCSRC}
60 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
62 yp_clnt.c: ${RPCSRC} yp.h
63 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
65 yppasswd.h: ${RPCSRC_PW}
66 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
68 yppasswd_clnt.c: ${RPCSRC_PW}
69 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
71 yppasswd_private.h: ${RPCSRC_PRIV}
72 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
74 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
75 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
77 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
78 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
80 BINMODE=4555
81 LINKS=${BINDIR}/passwd ${BINDIR}/yppasswd
82 MLINKS=passwd.1 yppasswd.1
83 WARNS?= 1
85 beforeinstall:
86 .for i in passwd yppasswd
87 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
88 chflags noschg ${DESTDIR}${BINDIR}/$i || true
89 .endfor
91 .if !defined(NOFSCHG)
92 afterinstall:
93 -chflags schg ${DESTDIR}${BINDIR}/passwd
94 .endif
96 .include <bsd.prog.mk>