-# from: @(#)Makefile 5.1 (Berkeley) 5/11/90
-# $Id: Makefile,v 1.2 1993/08/01 05:44:42 mycroft Exp $
+# $NetBSD: Makefile,v 1.8 2014/10/02 21:36:37 ast Exp $
+# @(#)Makefile 8.1 (Berkeley) 5/31/93
-PROG= primes
-SRCS= pattern.c pr_tbl.c primes.c
-NOMAN= noman
-DPADD= ${LIBM}
-LDADD= -lm
+PROG= primes
+SRCS= pattern.c pr_tbl.c primes.c spsp.c
+MAN= primes.6
-.include <bsd.prog.mk>
+all: $(PROG)
+
+$(PROG): $(SRCS)
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS)
+ $(STRIP) $(PROG)
+
+install: $(PROG) $(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+
+clean:
+ rm -f $(CLEANFILES) $(PROG)
+
+.PHONY: all clean install