]> git.cameronkatri.com Git - pw-darwin.git/blob - chpass/Makefile
Revert the libcrypt/libmd stuff back to how it was. This should not have
[pw-darwin.git] / chpass / Makefile
1 # @(#)Makefile 8.2 (Berkeley) 4/2/94
2 # $FreeBSD$
3
4 PROG= chpass
5 CFLAGS+=-Wall
6 SRCS= 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}
8 GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \
9 yppasswd_private_clnt.c yppasswd_private_xdr.c
10 BINMODE=4555
11 .PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../usr.sbin/vipw \
12 ${.CURDIR}/../../libexec/ypxfr \
13 ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
14 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw
15 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
16 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
17 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
18 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
19 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
20
21 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
22 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
23
24 COPTS+= -DYP -I. -I${.CURDIR}/../../libexec/ypxfr \
25 -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd -Dyp_error=warnx
26
27 #Some people need this, uncomment to activate
28 #COPTS+= -DRESTRICT_FULLNAME_CHANGE
29
30 DPADD= ${LIBRPCSVC} ${LIBCRYPT}
31 LDADD+= -lrpcsvc -lcrypt
32
33 CLEANFILES= ${GENSRCS}
34
35 RPCGEN= rpcgen -C
36 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
37 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
38 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
39
40 yp.h: ${RPCSRC}
41 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
42
43 yp_clnt.c: ${RPCSRC}
44 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
45
46 yppasswd.h: ${RPCSRC_PW}
47 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
48
49 yppasswd_clnt.c: ${RPCSRC_PW}
50 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
51
52 yppasswd_private.h: ${RPCSRC_PRIV}
53 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
54
55 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
56 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
57
58 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
59 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
60
61 beforeinstall:
62 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
63 [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
64 chflags noschg ${DESTDIR}${BINDIR}/$i || true
65 .endfor
66
67 afterinstall:
68 -chflags schg ${DESTDIR}${BINDIR}/chpass
69
70 .include <bsd.prog.mk>