-# @(#)Makefile 5.10 (Berkeley) 5/11/90
+# $NetBSD: Makefile,v 1.16 2010/02/06 23:45:25 he Exp $
+# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= robots
-CFLAGS+=-DMAX_PER_UID=5
-SRCS= extern.c init_field.c main.c make_level.c move.c move_robs.c \
+CPPFLAGS+=-DMAX_PER_UID=5
+SRCS= auto.c extern.c init_field.c main.c make_level.c move.c move_robs.c \
play_level.c query.c rnd_pos.c score.c flush_in.c
-MAN6= robots.0
-DPADD= ${LIBCURSES} ${LIBTERM}
-LDADD= -lcurses -ltermlib
-HIDEGAME=hidegame
+MAN= robots.6
-beforeinstall:
- install -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
- ${DESTDIR}/var/games/robots_roll
+all: $(PROG)
-.include <bsd.prog.mk>
+$(PROG): $(SRCS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
+ $(STRIP) $(PROG)
+
+install: $(PROG) $(MAN)
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(LOCALSTATEDIR)/games
+
+clean:
+ rm -f $(CLEANFILES) $(PROG)
+
+.PHONY: all clean install