]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - dm/Makefile
Use PREFIX now
[bsdgames-darwin.git] / dm / Makefile
index c1f4a03cb1e472e2099667be2ea937dfff0ae8ff..ea7c949e50630ab68ede52cffbc9efa448b34862 100644 (file)
@@ -1,15 +1,23 @@
-#      $NetBSD: Makefile,v 1.10 2002/09/18 02:51:46 lukem Exp $
+#      $NetBSD: Makefile,v 1.11 2002/09/18 03:23:00 lukem Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
-# -DLOG                log games
 PROG=  dm
 SRCS=  dm.c utmpentry.c
-MAN=   dm.8 dm.conf.5
-# shouldn't be necessary; just in case.
-BINGRP= games
-BINMODE=2555
+MAN8=  dm.8
+MAN5=  dm.conf.5
 
-.PATH.c: ${NETBSDSRCDIR}/usr.bin/who
-CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/who -DSUPPORT_UTMPX -DSUPPORT_UTMP
+all: $(PROG)
 
-.include <bsd.prog.mk>
+$(PROG): $(SRCS)
+       $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -DSUPPORT_UTMPX -I$(ROOT)
+       $(STRIP) $(PROG)
+
+install: $(PROG) $(MAN)
+       $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+       $(GINSTALL) -Dm644 $(MAN8) $(DESTDIR)/$(PREFIX)/share/man/man8/$(MAN8)
+       $(GINSTALL) -Dm644 $(MAN5) $(DESTDIR)/$(PREFIX)/share/man/man5/$(MAN5)
+
+clean:
+       rm -f $(CLEANFILES) $(PROG)
+
+.PHONY: all clean install