-# @(#)Makefile 5.3 (Berkeley) 5/11/90
+# $NetBSD: Makefile,v 1.10 2010/02/06 23:45:26 he Exp $
+# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= worms
-MAN6= worms.0
-DPADD= ${LIBCURSES} ${LIBTERM}
-LDADD= -lcurses -ltermcap
+MAN= worms.6
+SRCS= worms.c
-.include <bsd.prog.mk>
+all: $(PROG)
+
+$(PROG): $(SRCS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(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