trimming trailing blanks is too hard; the last revision handles most of the
[unix-history] / usr / src / usr.bin / hexdump / Makefile
CommitLineData
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#
19CFLAGS= -O
20LIBC= /lib/libc.a
21SRCS= bpad.c conv.c display.c hexdump.c parse.c
22OBJS= bpad.o conv.o display.o hexdump.o parse.o
23MAN= hexdump.0
24
25all: hexdump
26
27hexdump: ${LIBC} ${OBJS}
28 ${CC} -o $@ ${CFLAGS} ${OBJS}
29
30hexdump.0: hexdump.1
31 tbl hexdump.1 | nroff -man > hexdump.0
32
33clean:
34 rm -f ${OBJS} core hexdump
35
36cleandir: clean
37 rm -f ${MAN} tags .depend
38
39depend: ${SRCS}
40 mkdep ${CFLAGS} ${SRCS}
41
42install: ${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
50lint: ${SRCS}
51 lint ${CFLAGS} ${SRCS}
52
53tags: ${SRCS}
54 ctags ${SRCS}