xref: /original-bsd/sbin/restore/Makefile (revision ec7df300)
1#
2# Copyright (c) 1983 Regents of the University of California.
3# All rights reserved.  The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6#	@(#)Makefile	5.2 (Berkeley) 06/18/85
7#
8DESTDIR=
9CFLAGS= -O
10FILES=	main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c
11OBJS=	main.o interactive.o restore.o dirs.o symtab.o utilities.o
12
13all: restore rrestore
14
15restore: ${OBJS} tape.o
16	cc ${LDFLAGS} ${CFLAGS} -o restore ${OBJS} tape.o
17
18rrestore: ${OBJS} rtape.o dumprmt.o
19	cc ${LDFLAGS} -o rrestore ${OBJS} rtape.o dumprmt.o
20
21rtape.o: tape.c
22	cp tape.c rtape.c
23	cc ${CFLAGS} -c -DRRESTORE rtape.c
24	rm -f rtape.c
25
26dumprmt.o: ../dump/dumprmt.c
27	cc ${CFLAGS} -c ../dump/dumprmt.c
28
29install: rrestore restore
30	install restore ${DESTDIR}/etc/restore
31	install -m 4755 rrestore ${DESTDIR}/etc/rrestore
32
33clean:
34	rm -f restore rrestore *.o errs a.out core
35
36lint:
37	lint ${FILES}
38
39print:
40	@pr /usr/include/protocols/dumprestore.h restore.h ${FILES}
41
42${OBJS}: restore.h
43