-# $NetBSD: Makefile,v 1.5 2006/05/11 23:16:28 mrg Exp $
+# $NetBSD: Makefile,v 1.7 2010/02/03 15:34:38 roy Exp $
-WARNS=3
-DPADD+=${LIBCURSES} ${LIBTERMCAP} ${LIBM}
-LDADD+=-lcurses -ltermcap -lm
-
-PROG_CXX=dab
+PROG=dab
MAN=dab.6
SRCS=algor.cc board.cc main.cc human.cc box.cc player.cc gamescreen.cc \
ttyscrn.cc random.cc
-.include <bsd.own.mk>
-
-.if ${HAVE_GCC} == 4
-NOGCCERROR=1
-.endif
+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