Commit | Line | Data |
---|---|---|
9d035450 | 1 | # |
081f0291 KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
9d035450 | 4 | # |
081f0291 KB |
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 | # | |
435e8dff | 17 | # @(#)Makefile 4.5 (Berkeley) %G% |
11a1624c | 18 | # |
435e8dff | 19 | CFLAGS= -O |
9d035450 | 20 | LIBC= /lib/libc.a |
11a1624c | 21 | SRCS= diff.c diffdir.c diffreg.c |
11a1624c | 22 | OBJS= diff.o diffdir.o diffreg.o |
9d035450 KB |
23 | HSRCS= diffh.c |
24 | HOBJS= diffh.o | |
081f0291 | 25 | MAN= diff.0 |
11a1624c SL |
26 | |
27 | all: diff diffh | |
28 | ||
9d035450 KB |
29 | diff: ${OBJS} ${LIBC} |
30 | ${CC} ${CFLAGS} -o $@ ${OBJS} | |
31 | ||
32 | diffh: ${HOBJS} ${LIBC} | |
33 | ${CC} ${CFLAGS} -o $@ ${HOBJS} | |
34 | ||
081f0291 | 35 | clean: |
9d035450 KB |
36 | rm -f ${HOBJS} ${OBJS} core diff diffh |
37 | ||
081f0291 KB |
38 | cleandir: clean |
39 | rm -f ${MAN} tags .depend | |
40 | ||
41 | depend: ${SRCS} | |
9d035450 KB |
42 | mkdep ${CFLAGS} ${HSRCS} ${SRCS} |
43 | ||
081f0291 | 44 | install: ${MAN} |
435e8dff KB |
45 | install -s -o bin -g bin -m 755 diff ${DESTDIR}/usr/bin/diff |
46 | install -s -o bin -g bin -m 755 diffh ${DESTDIR}/usr/bin/diffh | |
081f0291 KB |
47 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
48 | rm -f ${DESTDIR}/usr/man/cat1/diffh.0 | |
49 | ln ${DESTDIR}/usr/man/cat1/diff.0 ${DESTDIR}/usr/man/cat1/diffh.0 | |
9d035450 | 50 | |
081f0291 | 51 | lint: ${SRCS} |
9d035450 KB |
52 | lint ${CFLAGS} ${SRCS} |
53 | lint ${CFLAGS} ${HSRCS} | |
54 | ||
081f0291 | 55 | tags: ${SRCS} |
9d035450 KB |
56 | ctags ${SRCS} |
57 | ctags ${HSRCS} | |
58 | sort -o tags tags |