date and time created 88/10/19 15:33:10 by bostic
[unix-history] / usr / src / games / sail / Makefile
index f16c73d..0ddf70b 100644 (file)
@@ -1,74 +1,54 @@
 #
 #
-# 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.1 (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.
 #
 #
-
-CTAGS = ctags -w
-CFLAGS = -O
-
-CFILES = main.c pl_main.c pl_1.c pl_2.c pl_3.c pl_4.c pl_5.c pl_6.c pl_7.c \
+#      @(#)Makefile    5.8 (Berkeley) %G%
+#
+CFLAGS=        -O
+LIBC=  /lib/libc.a
+LIBS=  -lcurses -ltermlib
+SRCS=  main.c pl_main.c pl_1.c pl_2.c pl_3.c pl_4.c pl_5.c pl_6.c pl_7.c \
        dr_main.c dr_1.c dr_2.c dr_3.c dr_4.c dr_5.c lo_main.c \
        assorted.c game.c globals.c misc.c parties.c sync.c version.c
        dr_main.c dr_1.c dr_2.c dr_3.c dr_4.c dr_5.c lo_main.c \
        assorted.c game.c globals.c misc.c parties.c sync.c version.c
-OBJS = main.o pl_main.o pl_1.o pl_2.o pl_3.o pl_4.o pl_5.o pl_6.o pl_7.o \
+OBJS main.o pl_main.o pl_1.o pl_2.o pl_3.o pl_4.o pl_5.o pl_6.o pl_7.o \
        dr_main.o dr_1.o dr_2.o dr_3.o dr_4.o dr_5.o lo_main.o \
        assorted.o game.o globals.o misc.o parties.o sync.o version.o
        dr_main.o dr_1.o dr_2.o dr_3.o dr_4.o dr_5.o lo_main.o \
        assorted.o game.o globals.o misc.o parties.o sync.o version.o
-HFILES = externs.h player.h driver.h machdep.h
-OTHERFILES = Makefile sail.6
-JUNKFILES = sail tags make.out
-LIBS = -lcurses -ltermlib
-
-SAILMASTER = daemon
-LOGFILE = lib/saillog
-TARGET = $(DESTDIR)/usr/games
+MAN=   sail.0
 
 all: sail
 
 
 all: sail
 
-sail: $(OBJS)
-       $(CC) -o sail $(OBJS) $(LIBS)
+sail: ${OBJS} ${LIBC}
+       ${CC} -o $@ ${OBJS} ${LIBS}
 
 
-lint:
-       lint -z $(CFILES) -lcurses
-
-tags: $(CFILES) $(HFILES)
-       $(CTAGS) $(CFILES) $(HFILES)
+clean:
+       rm -f ${OBJS} core sail
 
 
-$(CFILES) $(HFILES) $(OTHERFILES):
-       sccs get $@
+cleandir: clean
+       rm -f ${MAN} tags .depend
 
 
-clean:
-       rm -f $(OBJS) $(JUNKFILES)
+depend: ${SRCS}
+       mkdep ${CFLAGS} ${SRCS}
 
 
-install: sail sail.6 $(TARGET)/$(LOGFILE)
-       install -s -m 4755 -o $(SAILMASTER) sail $(TARGET)/sail
-       install -c -m 644 sail.6 $(DESTDIR)/usr/man/man6
+install: ${MAN}
+       install -c -o games -g bin -m 600 /dev/null ${DESTDIR}/usr/games/lib/saillog
+       install -s -o games -g bin -m 4700 sail ${DESTDIR}/usr/games/hide
+       (cd ${DESTDIR}/usr/games; rm -f sail; ln -s dm sail; chown games.bin sail)
+       install -c -o bin -g bin -m 444 sail.0 ${DESTDIR}/usr/man/cat6
 
 
-logfile $(TARGET)/$(LOGFILE):
-       cp /dev/null $(TARGET)/$(LOGFILE)
-       chown $(SAILMASTER) $(TARGET)/$(LOGFILE)
-       chmod 644 $(TARGET)/$(LOGFILE)
+lint: ${SRCS}
+       lint ${CFLAGS} ${SRCS}
 
 
-main.o: externs.h machdep.h
-pl_main.o: player.h externs.h machdep.h
-pl_1.o: player.h externs.h machdep.h
-pl_2.o: player.h externs.h machdep.h
-pl_3.o: player.h externs.h machdep.h
-pl_4.o: player.h externs.h machdep.h
-pl_5.o: player.h externs.h machdep.h
-pl_6.o: player.h externs.h machdep.h
-pl_7.o: player.h externs.h machdep.h
-dr_main.o: driver.h externs.h machdep.h
-dr_1.o: driver.h externs.h machdep.h
-dr_2.o: driver.h externs.h machdep.h
-dr_3.o: driver.h externs.h machdep.h
-dr_4.o: externs.h machdep.h
-dr_5.o: externs.h machdep.h
-lo_main.o: externs.h machdep.h
-assorted.o: externs.h machdep.h
-game.o: externs.h machdep.h
-globals.o: externs.h machdep.h
-misc.o: externs.h machdep.h
-parties.o: externs.h machdep.h
-sync.o: externs.h machdep.h
+tags: ${SRCS}
+       ctags ${SRCS}