Bring in a transport-independent RPC (TI-RPC).
[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
10SRCS= local_passwd.c passwd.c pw_copy.c pw_scan.c pw_util.c
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 \
25 -Dyp_error=warnx -DLOGGING
26
27.else
28
29PROG= passwd
30SRCS= 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}
32GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
33 yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
984263bc
MD
34
35DPADD= ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
36LDADD= -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
41
42CFLAGS+= -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
49
50.endif
51
52CLEANFILES= ${GENSRCS}
53
54RPCGEN= rpcgen -C
55RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
56RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
57RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
58
59yp.h: ${RPCSRC}
60 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
61
62yp_clnt.c: ${RPCSRC} yp.h
63 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
64
65yppasswd.h: ${RPCSRC_PW}
66 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
67
68yppasswd_clnt.c: ${RPCSRC_PW}
69 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
70
71yppasswd_private.h: ${RPCSRC_PRIV}
72 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
73
74yppasswd_private_xdr.c: ${RPCSRC_PRIV}
75 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
76
77yppasswd_private_clnt.c: ${RPCSRC_PRIV}
78 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
79
80BINMODE=4555
81LINKS=${BINDIR}/passwd ${BINDIR}/yppasswd
82MLINKS=passwd.1 yppasswd.1
ce0e08e2 83WARNS?= 0
984263bc 84
984263bc
MD
85beforeinstall:
86.for i in passwd yppasswd
87 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
88 chflags noschg ${DESTDIR}${BINDIR}/$i || true
89.endfor
90
5e6263df 91.if !defined(NOFSCHG)
984263bc
MD
92afterinstall:
93 -chflags schg ${DESTDIR}${BINDIR}/passwd
5e6263df 94.endif
984263bc
MD
95
96.include <bsd.prog.mk>