ANSIfication; bug report 4.3BSD/bin/223
[unix-history] / usr / src / old / boggle / Makefile
index 1dc541d..9fcf800 100644 (file)
@@ -1,31 +1,52 @@
 #
 #
-# Copyright (c) 1980 Regents of the University of California.
-# All rights reserved.  The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.
 #
 #
-#      @(#)Makefile    5.3 (Berkeley) %G%
+# Redistribution and use in source and binary forms are permitted
+# provided that the above copyright notice and this paragraph are
+# duplicated in all such forms and that any documentation,
+# advertising materials, and other materials related to such
+# distribution and use acknowledge that the software was developed
+# by the University of California, Berkeley.  The name of the
+# University may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
 #
-DESTDIR=
-CC = /bin/cc
-CFLAGS = -O
+#      @(#)Makefile    5.10 (Berkeley) %G%
+#
+CFLAGS=        -O
+LIBC=  /lib/libc.a
+SRCS=  comp.c boggle.c
+MAN=   boggle.0
 
 
-all:   boggle bogdict
+all: boggle bogdict
 
 bogdict: comp sfile
 
 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
+       sed -f sfile /usr/dict/words | uniq | ./comp >bogdict
 
 
-install:
-       install -s boggle ${DESTDIR}/usr/games/boggle
-       install bogdict ${DESTDIR}/usr/games/bogdict
+boggle comp: ${LIBC}
+       ${CC} -o $@ ${CFLAGS} $@.c
 
 
-boggle: boggle.c
-       cc -o boggle ${CFLAGS} boggle.c
+clean:
+       rm -f ${OBJS} core comp boggle bogdict
 
 
-comp: comp.c
-       cc -o comp ${CFLAGS} comp.c
+cleandir: clean
+       rm -f ${MAN} tags .depend
 
 
-clean:
-       rm -f bogdict boggle comp
+depend: ${SRCS}
+       mkdep -p ${CFLAGS} ${SRCS}
+
+install: ${MAN}
+       install -s -o games -g bin -m 4700 boggle ${DESTDIR}/usr/games/hide/boggle
+       install -o games -g bin -m 400 bogdict ${DESTDIR}/usr/games/lib/bogdict
+       (cd ${DESTDIR}/usr/games; rm -f boggle; ln -s dm boggle; chown games.bin boggle)
+       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6
+
+lint: ${SRCS}
+       lint ${CFLAGS} comp.c
+       lint ${CFLAGS} boggle.c
+
+tags: ${SRCS}
+       ctags ${SRCS}