add checks for immutability and append-only
[unix-history] / usr / src / old / boggle / Makefile
index e9c7038..b4e78c9 100644 (file)
@@ -1,33 +1,23 @@
-#
-# Copyright (c) 1980 Regents of the University of California.
-# All rights reserved.  The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
-#
-#      @(#)Makefile    5.6 (Berkeley) %G%
-#
-DESTDIR=
-CC = /bin/cc
-CFLAGS = -O
+#      @(#)Makefile    5.16 (Berkeley) %G%
 
 
-all:   boggle bogdict
+PROG=  boggle
+MAN6=  boggle.0
+DPADD= ${LIBCOMPAT}
+LDADD= -lcompat
+HIDEGAME=hidegame
+CLEANFILES=comp bogdict
 
 
-bogdict: comp sfile
-       -if [ -f /usr/local/lib/w2a ]; \
-               then dict=/usr/local/lib/w2a; \
-               else dict=/usr/dict/words; fi; \
-       sed -f sfile $$dict | uniq | ./comp >bogdict
+all: ${PROG} ${MAN6}
 
 
-install:
-       install -s boggle ${DESTDIR}/usr/games/boggle
-       install bogdict ${DESTDIR}/usr/games/bogdict
+boggle: bogdict
 
 
-boggle: boggle.c
-       cc -o boggle ${CFLAGS} boggle.c
+bogdict: /usr/share/dict/words comp sfile
+       sed -f ${.CURDIR}/sfile /usr/share/dict/words | uniq | ./comp >bogdict
 
 
-comp: comp.c
-       cc -o comp ${CFLAGS} comp.c
+beforeinstall:
+       install -c -o ${BINOWN} -g ${BINGRP} -m 444 bogdict \
+           ${DESTDIR}/usr/share/games
+comp:
+       ${CC} -O ${.CURDIR}/comp.c -o ${.TARGET}
 
 
-clean:
-       rm -f bogdict boggle comp
-
-depend:
+.include <bsd.prog.mk>