386BSD 0.1 development
[unix-history] / usr / src / sbin / restore / Makefile
index 5e7db6e..4791fa8 100644 (file)
@@ -1,42 +1,23 @@
-#
-# Copyright (c) 1983 Regents of the University of California.
-# All rights reserved.  The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
-#
-#      @(#)Makefile    5.2 (Berkeley) %G%
-#
-DESTDIR=
-CFLAGS= -O
-FILES= main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c
-OBJS=  main.o interactive.o restore.o dirs.o symtab.o utilities.o
+#      @(#)Makefile    5.10 (Berkeley) 5/11/90
 
 
-all: restore rrestore
+PROG=  restore
+SRCS=  main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c
+ROBJS= main.o interactive.o restore.o dirs.o symtab.o rtape.o utilities.o \
+       dumprmt.o
+MAN8=  restore.0 rrestore.0
+.PATH: ${.CURDIR}/../dump
+CLEANFILES+=dumprmt.o rtape.o rrestore
 
 
-restore: ${OBJS} tape.o
-       cc ${LDFLAGS} ${CFLAGS} -o restore ${OBJS} tape.o
+all: rrestore
 
 
-rrestore: ${OBJS} rtape.o dumprmt.o
-       cc ${LDFLAGS} -o rrestore ${OBJS} rtape.o dumprmt.o
+rrestore: ${ROBJS} ${LIBC}
+       ${CC} ${CFLAGS} -o ${.TARGET} ${ROBJS}
 
 
-rtape.o: tape.c
-       cp tape.c rtape.c
-       cc ${CFLAGS} -c -DRRESTORE rtape.c
-       rm -f rtape.c
+rtape.o: tape.c ${LIBC}
+       ${CC} ${CFLAGS} -c -DRRESTORE ${.CURDIR}/tape.c -o ${.TARGET}
 
 
-dumprmt.o: ../dump/dumprmt.c
-       cc ${CFLAGS} -c ../dump/dumprmt.c
+afterinstall:
+       install ${STRIP} -o root -g ${BINGRP} -m 4755 rrestore \
+           ${DESTDIR}${BINDIR}
 
 
-install: rrestore restore
-       install restore ${DESTDIR}/etc/restore
-       install -m 4755 rrestore ${DESTDIR}/etc/rrestore
-
-clean:
-       rm -f restore rrestore *.o errs a.out core
-
-lint:
-       lint ${FILES}
-
-print:
-       @pr /usr/include/protocols/dumprestore.h restore.h ${FILES}
-
-${OBJS}: restore.h
+.include <bsd.prog.mk>