Commit | Line | Data |
---|---|---|
25e91706 KB |
1 | # |
2 | # Copyright (c) 1989 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # @(#)Makefile 5.1 (Berkeley) %G% | |
18 | # | |
19 | CFLAGS= -O | |
20 | LIBC= /lib/libc.a | |
21 | SRCS= bpad.c conv.c display.c hexdump.c parse.c | |
22 | OBJS= bpad.o conv.o display.o hexdump.o parse.o | |
23 | MAN= hexdump.0 | |
24 | ||
25 | all: hexdump | |
26 | ||
27 | hexdump: ${LIBC} ${OBJS} | |
28 | ${CC} -o $@ ${CFLAGS} ${OBJS} | |
29 | ||
30 | hexdump.0: hexdump.1 | |
31 | tbl hexdump.1 | nroff -man > hexdump.0 | |
32 | ||
33 | clean: | |
34 | rm -f ${OBJS} core hexdump | |
35 | ||
36 | cleandir: clean | |
37 | rm -f ${MAN} tags .depend | |
38 | ||
39 | depend: ${SRCS} | |
40 | mkdep ${CFLAGS} ${SRCS} | |
41 | ||
42 | install: ${MAN} | |
43 | install -s -o bin -g bin -m 755 hexdump ${DESTDIR}/usr/bin | |
44 | rm -f ${DESTDIR}/usr/bin/od | |
45 | ln ${DESTDIR}/usr/bin/hexdump ${DESTDIR}/usr/bin/od | |
46 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 | |
47 | rm -f ${DESTDIR}/usr/man/cat1/od.0 | |
48 | ln ${DESTDIR}/usr/man/cat1/hexdump.0 ${DESTDIR}/usr/man/cat1/od.0 | |
49 | ||
50 | lint: ${SRCS} | |
51 | lint ${CFLAGS} ${SRCS} | |
52 | ||
53 | tags: ${SRCS} | |
54 | ctags ${SRCS} |