-# If you don't want to plot, take out the -Dplot and the ref. to plot.a
-PLOT = -lplot -Dplot
-CFLAGS=-O
-prof: prof.o
- $(CC) -o prof prof.o $(PLOT)
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved. The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+# @(#)Makefile 4.3 (Berkeley) %G%
+#
+# If you don't want to plot, take out the -Dplot and the loader
+# reference to plot.a
+CFLAGS= -O -Dplot
+LIBC= /lib/libc.a
+SRCS= prof.c
+OBJS= prof.o
+
+all: prof
+
+prof: ${OBJS} ${LIBC}
+ ${CC} -o $@ ${CFLAGS} ${OBJS} -lplot
+
+clean: FRC
+ rm -f ${OBJS} core prof
+
+depend: FRC
+ mkdep ${CFLAGS} ${SRCS}
+
+install: FRC
+ install -s -o bin -g bin -m 755 prof ${DESTDIR}/usr/bin/prof
+
+lint: FRC
+ lint ${CFLAGS} ${SRCS}
+
+tags: FRC
+ ctags ${SRCS}