xref: /original-bsd/usr.sbin/chown/Makefile (revision 7323bcb8)
1#
2# Copyright (c) 1988 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, advertising
8# materials, and other materials related to such redistribution and
9# use acknowledge that the software was developed by the University
10# of California, Berkeley.  The name of the University may not be
11# used to endorse or promote products derived from this software
12# without specific prior written permission.  THIS SOFTWARE IS PROVIDED
13# ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
14# WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
15# FITNESS FOR A PARTICULAR PURPOSE.
16#
17# @(#)Makefile	5.1 (Berkeley) 10/18/88
18#
19
20CFLAGS=	-O
21LIBC=	/lib/libc.a
22SRCS=	chown.c
23OBJS=
24MAN=	chown.0 chgrp.0
25
26all: chown
27
28chown: ${LIBC}
29	${CC} -o $@ ${CFLAGS} $@.c
30
31clean:
32	rm -f ${OBJS} core chown
33
34cleandir: clean
35	rm -f ${MAN} tags .depend
36
37depend: ${SRCS}
38	mkdep -p ${CFLAGS} ${SRCS}
39
40install: ${MAN}
41	install -s -o bin -g bin -m 755 chown ${DESTDIR}/etc
42	rm -f ${DESTDIR}/bin/chgrp
43	ln ${DESTDIR}/etc/chown ${DESTDIR}/bin/chgrp
44	install -c -o bin -g bin -m 444 chown.0 ${DESTDIR}/usr/man/cat8
45	install -c -o bin -g bin -m 444 chgrp.0 ${DESTDIR}/usr/man/cat1
46
47lint: ${SRCS}
48	lint ${CFLAGS} ${SRCS}
49
50tags: ${SRCS}
51	ctags ${SRCS}
52