-# XXX this rule shouldn't be here.
-phantasia.cat6: phantasia.6
- tbl ${.CURDIR}/phantasia.6 | nroff -man > ${.TARGET}
+$(PROG): $(SRCS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(STRIP) $(PROG)
+
+$(ALLFILES): $(FILES)
+
+install: $(PROG) $(MAN) $(ALLFILES)
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)$(FILESDIR)
+ $(GINSTALL) -Dm$(FILESMODE) $(ALLFILES) $(DESTDIR)$(FILESDIR)
+
+clean:
+ rm -f $(CLEANFILES) $(PROG)