xref: /original-bsd/sbin/dump/Makefile (revision 29d43723)
1#
2# Copyright (c) 1987 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.8 (Berkeley) 03/06/89
18#
19#	dump.h			header file
20#	dumpitime.c		reads /etc/dumpdates
21#	dumpmain.c		driver
22#	dumpoptr.c		operator interface
23#	dumptape.c		handles the mag tape and opening/closing
24#	dumptraverse.c		traverses the file system
25#	unctime.c		undo ctime
26#
27#	DEBUG			use local directory to find ddate and dumpdates
28#	TDEBUG			trace out the process forking
29
30DFLAGS=
31CFLAGS=	-O ${DFLAGS}
32LIBC=	/lib/libc.a
33PSRCS=	/usr/include/protocols/dumprestore.h dump.h dumpmain.c \
34	dumptraverse.c dumptape.c dumpoptr.c dumpitime.c unctime.c
35SRCS=	dump.h dumpitime.c dumpmain.c dumpoptr.c dumprmt.c dumptape.c \
36	dumptraverse.c unctime.c
37OBJS=	dumpitime.o dumpmain.o dumpoptr.o dumptape.o dumptraverse.o \
38	unctime.o
39ROBJS=	dumpitime.o dumprmain.o dumpoptr.o dumprmt.o dumprtape.o \
40	dumptraverse.o unctime.o
41MAN=	dump.0 rdump.0
42
43all: dump rdump
44
45dump: ${OBJS} ${LIBC}
46	${CC} -o $@ ${CFLAGS} ${OBJS}
47
48rdump: ${ROBJS} ${LIBC}
49	${CC} -o $@ ${CFLAGS} ${ROBJS}
50
51dumprmain.o: dumpmain.c
52	${CC} -c -DRDUMP ${CFLAGS} dumpmain.c -o dumprmain.o
53
54dumprtape.o: dumptape.c
55	${CC} -c -DRDUMP ${CFLAGS} dumptape.c -o dumprtape.o
56
57clean:
58	rm -f ${ROBJS} ${OBJS} rdump dump core
59
60cleandir: clean
61	rm -f ${MAN} tags .depend
62
63depend: ${SRCS}
64	mkdep ${CFLAGS} ${SRCS}
65
66install: ${MAN}
67	install -s -o root -g tty -m 6755 rdump ${DESTDIR}/etc/rdump
68	install -s -o bin -g tty -m 2755 dump ${DESTDIR}/etc/dump
69	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
70
71lint: ${SRCS}
72	lint ${CFLAGS} ${SRCS}
73
74tags: ${SRCS}
75	ctags ${SRCS}
76