]> git.cameronkatri.com Git - pw-darwin.git/blob - chpass/Makefile
Use CFLAGS, not COPTS, in the Makefile. bsd.prog.mk conveniently adds
[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 ${.CURDIR}/../../lib/libc/gen
15 CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../usr.sbin/vipw -I${.CURDIR}/../../lib/libc/gen
16 LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
17 LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
18 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
19 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
20 LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
21
22 MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
23 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
24
25 CFLAGS+=-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
31 DPADD= ${LIBRPCSVC} ${LIBCRYPT} ${LIBMD}
32 LDADD+= -lrpcsvc -lcrypt -lmd
33
34 CLEANFILES= ${GENSRCS}
35
36 RPCGEN= rpcgen -C
37 RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
38 RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x
39 RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x
40
41 yp.h: ${RPCSRC}
42 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
43
44 yp_clnt.c: ${RPCSRC}
45 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC}
46
47 yppasswd.h: ${RPCSRC_PW}
48 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PW}
49
50 yppasswd_clnt.c: ${RPCSRC_PW}
51 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PW}
52
53 yppasswd_private.h: ${RPCSRC_PRIV}
54 ${RPCGEN} -h -o ${.TARGET} ${RPCSRC_PRIV}
55
56 yppasswd_private_xdr.c: ${RPCSRC_PRIV}
57 ${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
58
59 yppasswd_private_clnt.c: ${RPCSRC_PRIV}
60 ${RPCGEN} -l -o ${.TARGET} ${RPCSRC_PRIV}
61
62 beforeinstall:
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
68 afterinstall:
69 -chflags schg ${DESTDIR}${BINDIR}/chpass
70
71 .include <bsd.prog.mk>