-# $NetBSD: Makefile,v 1.1.1.1 2003/12/26 17:57:02 christos Exp $
-
-WARNS=2
-DPADD+=${LIBSTDCPP} ${LIBCURSES} ${LIBTERMCAP} ${LIBM}
-LDADD+=-lstdc++ -lcurses -ltermcap -lm
+# $NetBSD: Makefile,v 1.7 2010/02/03 15:34:38 roy Exp $
PROG=dab
MAN=dab.6
-SRCS=algor.C board.C main.C human.C box.C player.C gamescreen.C \
- ttyscrn.C random.C
+SRCS=algor.cc board.cc main.cc human.cc box.cc player.cc gamescreen.cc \
+ ttyscrn.cc random.cc
+
+all: $(PROG)
+
+$(PROG): $(SRCS)
+ $(CXX) $(CXXFLAGS) -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)
-.include <bsd.prog.mk>
+.PHONY: all clean install