xref: /original-bsd/usr.bin/chpass/Makefile (revision 4e9331e4)
1#
2# Copyright (c) 1988 The Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley.  The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16#
17#	@(#)Makefile	5.2 (Berkeley) 05/11/89
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21SRCS=	chpass.c field.c util.c
22OBJS=	chpass.o field.o util.o
23MAN=	chpass.0
24
25all: chpass
26
27chpass: ${LIBC} ${OBJS}
28	${CC} ${CFLAGS} -o $@ ${OBJS}
29
30clean:
31	rm -f ${OBJS} core chpass
32
33cleandir: clean
34	rm -f ${MAN} tags .depend
35
36depend: ${SRCS}
37	mkdep ${CFLAGS} ${SRCS}
38
39install: ${MAN}
40	install -s -o root -g bin -m 4755 chpass ${DESTDIR}/usr/bin
41	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
42	rm -f ${DESTDIR}/usr/bin/chfn; ln ${DESTDIR}/usr/bin/chpass \
43	    ${DESTDIR}/usr/bin/chfn
44	rm -f ${DESTDIR}/usr/bin/chsh; ln ${DESTDIR}/usr/bin/chpass \
45	    ${DESTDIR}/usr/bin/chsh
46	rm -f ${DESTDIR}/usr/man/cat1/chfn.0
47	rm -f ${DESTDIR}/usr/man/cat1/chsh.0
48	ln ${DESTDIR}/usr/man/cat1/chpass.0 ${DESTDIR}/usr/man/cat1/chfn.0
49	ln ${DESTDIR}/usr/man/cat1/chpass.0 ${DESTDIR}/usr/man/cat1/chsh.0
50
51lint: ${SRCS}
52	lint ${CFLAGS} ${SRCS}
53
54tags: ${SRCS}
55	ctags ${SRCS}
56