cleanup, reformat
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 7 Mar 1989 00:41:33 +0000 (16:41 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 7 Mar 1989 00:41:33 +0000 (16:41 -0800)
SCCS-vsn: games/phantasia/Makefile 5.6

usr/src/games/phantasia/Makefile

index f605115..58a4635 100644 (file)
@@ -1,52 +1,28 @@
-# Makefile for Phantasia 3.3.2
 #
 #
-# To create game:
+# Copyright (c) 1989 The Regents of the University of California.
+# All rights reserved.
 #
 #
-# 1)  Set up a directory where the game and its support files will live.
-#        (It is suggested that the source be kept somewhere else.)
+# This code is derived from software contributed to Berkeley by
+# Edward Estes.
 #
 #
-# 2)  Set up the variables in Makefile CAREFULLY to reflect your
-#        particular situation.
+# 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.
 #
 #
-# 3)  Check out ok_to_play() at the end of main.c if you want to include
-#        code to restrict access at certain times.
+#      @(#)Makefile    5.6 (Berkeley) %G%
 #
 #
-# 4)  'make install' and sit back and watch.
-#
-# NOTE:  'setup' MUST be executed before trying to run 'phantasia'.
-#       The install procedure does this for you.
-#
-#
-# To convert from 3.3.1 or 3.3.1+ to 3.3.2:
-#
-# 1)   'make convert'  (3.3.1+: 'make PLUS=-DPHANTPLUS convert')
-#
-# 2)   Move 'newcharacs' to 'characs'.
-#
-
-RM =           -rm
-SHAR =         /d2/estes/bin/shar
-# Tell 'make' to use /bin/sh for all commands.
-SHELL =                /bin/sh
-
 # PLOTDEVICE is used for plotting the map.
 # Change as appropriate.
 PLOTDEVICE =   > /dev/tty
 
 # PLOTDEVICE is used for plotting the map.
 # Change as appropriate.
 PLOTDEVICE =   > /dev/tty
 
-# Add '-ljobs' to LDFLAGS if 4.1bsd; add -ltermlib if not SVR2.
-# Need separate i/d space on small machines.
-# May need '-f' on machines without floating point hardware.
-LIBS= -lm -lcurses -ltermlib
-
-# DEST is where the program and its support files reside
-DEST =         /usr/games/lib/phantasia
-DESTR =                /usr/games
-
-MDIR=  /usr/man/cat6
-
-.SUFFIXES: .6 .0
-
-
 # The following are program constants which are implementation dependent.
 #
 # DEST is passed on.  Note that there is no closing quote here.
 # The following are program constants which are implementation dependent.
 #
 # DEST is passed on.  Note that there is no closing quote here.
@@ -58,137 +34,67 @@ MDIR=      /usr/man/cat6
 #      accounts.  The list of logins goes in the file 'enemy'.
 # SHELL is the default shell for shell escapes.  If SHELL is not defined,
 #      shell escapes are not enabled.
 #      accounts.  The list of logins goes in the file 'enemy'.
 # SHELL is the default shell for shell escapes.  If SHELL is not defined,
 #      shell escapes are not enabled.
-# define BSD41 for 4.1bsd
-# define BSD42 for 4.2bsd
-# define SYS3 for System III, or similar (like Version 7)
-# define SYS5 for System V
-# If you don't have 'strchr()', put '-Dstrchr=index' below.
-# May need '-I/usr/include/sys' for 4.2bsd.
-CFLAGS =       -O \
-               -DDEST=\"${DEST} \
-               -DDESTR=\"${DESTR} \
-               -DWIZARD=\"root\" \
-               -DUID=0 \
-               -DENEMY \
-               -DBSD42
 
 
+DEST=  /usr/games/lib/phantasia
+DESTR= /usr/games
+CFLAGS=        -O -DDEST=\"${DEST} -DDESTR=\"${DESTR} -DWIZARD=\"root\" -DUID=0 \
+       -DENEMY -DBSD42
+LIBC=  /lib/libc.a
 SRCS=  main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
 OBJS=  main.o fight.o io.o interplayer.o gamesupport.o misc.o phantglobs.o
 SRCS=  main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
 OBJS=  main.o fight.o io.o interplayer.o gamesupport.o misc.o phantglobs.o
-HFILES =       phantdefs.h phantstruct.h macros.h include.h
-LIBC=  /lib/libc.a
-
-all:           phantasia setup phantasia.0
-
-# Make the game.
-phantasia:     ${OBJS} ${LIBC}
-               ${CC} ${OBJS} -o $@ ${LIBS}
-
-${OBJS}:       ${HFILES}
-
-# Make the initialization program.
-setup:         phantglobs.o setup.o monsters.asc ${LIBC}
-               ${CC} phantglobs.o setup.o -o $@ ${LIBS}
-
-setup.o: ${HFILES}
+MAN=   phantasia.0
 
 # Make documentation.
 # The flags below on tbl and nroff are to make a line printable version.
 .6.0:
        tbl -TX phantasia.6 | /usr/man/manroff > phantasia.0
 
 
 # Make documentation.
 # The flags below on tbl and nroff are to make a line printable version.
 .6.0:
        tbl -TX phantasia.6 | /usr/man/manroff > phantasia.0
 
-# Install game and documentation.  Initialize.
-install: FRC
+all: phantasia setup
+
+phantasia: ${OBJS} ${LIBC}
+       ${CC} ${OBJS} -o $@ -lm -lcurses -ltermlib
+
+# Make the initialization program.
+setup: phantglobs.o setup.o monsters.asc ${LIBC}
+       ${CC} phantglobs.o setup.o -o $@ -lm -lcurses -ltermlib
+
+install: ${MAN}
        -[ -d ${DESTDIR}/usr/games/lib/phantasia ] || mkdir ${DESTDIR}/usr/games/lib/phantasia
        chmod 700 /usr/games/lib/phantasia
        chown games.bin /usr/games/lib/phantasia
        install -s -o games -g bin -m 4700 phantasia ${DESTDIR}/usr/games/hide
        (cd ${DESTDIR}/usr/games; rm -f phantasia; ln -s dm phantasia; chown games.bin phantasia)
        install -c -o games -g bin -m 400 phantasia.0 ${DESTDIR}/usr/games/lib/phantasia/phant.help
        -[ -d ${DESTDIR}/usr/games/lib/phantasia ] || mkdir ${DESTDIR}/usr/games/lib/phantasia
        chmod 700 /usr/games/lib/phantasia
        chown games.bin /usr/games/lib/phantasia
        install -s -o games -g bin -m 4700 phantasia ${DESTDIR}/usr/games/hide
        (cd ${DESTDIR}/usr/games; rm -f phantasia; ln -s dm phantasia; chown games.bin phantasia)
        install -c -o games -g bin -m 400 phantasia.0 ${DESTDIR}/usr/games/lib/phantasia/phant.help
-       install -c -o bin -g bin -m 444 phantasia.0 ${DESTDIR}${MDIR}
+       install -c -o bin -g bin -m 444 phantasia.0 ${DESTDIR}/usr/man/cat6
        ./setup
        chown games.bin /usr/games/lib/phantasia/*
 
 # Make Phantasia map.
 # Change the map commands reflect your installation.
 # Pre-System III installations may use 'plot' instead of 'tplot'.
        ./setup
        chown games.bin /usr/games/lib/phantasia/*
 
 # Make Phantasia map.
 # Change the map commands reflect your installation.
 # Pre-System III installations may use 'plot' instead of 'tplot'.
-map:           map.c
-               cc -O map.c -lplot -o map
-               map | tplot -t4014 ${PLOTDEVICE}
+map: map.c
+       ${CC} -O map.c -lplot -o $@
+       map | tplot ${PLOTDEVICE}
 
 # Convert old character file to new format.
 # 'convert' is meant to be run only once.
 # PLUS = PHANTPLUS for conversion from 3.3.1+.
 
 # Convert old character file to new format.
 # 'convert' is meant to be run only once.
 # PLUS = PHANTPLUS for conversion from 3.3.1+.
-convert:       convert.c oldplayer.h phantstruct.h
-               ${CC} ${CFLAGS} ${PLUS} convert.c ${LDFLAGS} -o convert
-               convert
-               @echo "New data is in newcharacs."
+convert: convert.c oldplayer.h phantstruct.h
+       ${CC} ${CFLAGS} ${PLUS} convert.c ${LDFLAGS} -o convert
+       convert
+       @echo "New data is in newcharacs."
 
 
-# Clean up directory after installation.
 clean:
 clean:
-               ${RM} -f *.o core phantasia phant.help phantasia.0 setup
+       rm -f *.o core phantasia phant.help phantasia.0 setup
 
 
-depend: FRC
+cleandir: clean
+       rm -f ${MAN} tags .depend
+
+depend: ${SRCS}
        mkdep ${CFLAGS} ${SRCS}
 
        mkdep ${CFLAGS} ${SRCS}
 
-lint: FRC
+lint: ${SRCS}
        lint ${CFLAGS} ${SRCS}
 
        lint ${CFLAGS} ${SRCS}
 
-tags: FRC
+tags: ${SRCS}
        ctags ${SRCS}
        ctags ${SRCS}
-
-FRC:
-
-# DO NOT DELETE THIS LINE -- mkdep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-main.o: main.c include.h /usr/include/ctype.h /usr/include/curses.h
-main.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
-main.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydefaults.h
-main.o: /usr/include/sys/ttydev.h /usr/include/math.h /usr/include/pwd.h
-main.o: /usr/include/setjmp.h /usr/include/signal.h /usr/include/machine/trap.h
-main.o: /usr/include/time.h macros.h phantdefs.h phantstruct.h phantglobs.h
-fight.o: fight.c include.h /usr/include/ctype.h /usr/include/curses.h
-fight.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
-fight.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydefaults.h
-fight.o: /usr/include/sys/ttydev.h /usr/include/math.h /usr/include/pwd.h
-fight.o: /usr/include/setjmp.h /usr/include/signal.h
-fight.o: /usr/include/machine/trap.h /usr/include/time.h macros.h phantdefs.h
-fight.o: phantstruct.h phantglobs.h
-io.o: io.c include.h /usr/include/ctype.h /usr/include/curses.h
-io.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
-io.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydefaults.h
-io.o: /usr/include/sys/ttydev.h /usr/include/math.h /usr/include/pwd.h
-io.o: /usr/include/setjmp.h /usr/include/signal.h /usr/include/machine/trap.h
-io.o: /usr/include/time.h macros.h phantdefs.h phantstruct.h phantglobs.h
-interplayer.o: interplayer.c include.h /usr/include/ctype.h
-interplayer.o: /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h
-interplayer.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
-interplayer.o: /usr/include/sys/ttydefaults.h /usr/include/sys/ttydev.h
-interplayer.o: /usr/include/math.h /usr/include/pwd.h /usr/include/setjmp.h
-interplayer.o: /usr/include/signal.h /usr/include/machine/trap.h
-interplayer.o: /usr/include/time.h macros.h phantdefs.h phantstruct.h
-interplayer.o: phantglobs.h
-gamesupport.o: gamesupport.c include.h /usr/include/ctype.h
-gamesupport.o: /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h
-gamesupport.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
-gamesupport.o: /usr/include/sys/ttydefaults.h /usr/include/sys/ttydev.h
-gamesupport.o: /usr/include/math.h /usr/include/pwd.h /usr/include/setjmp.h
-gamesupport.o: /usr/include/signal.h /usr/include/machine/trap.h
-gamesupport.o: /usr/include/time.h macros.h phantdefs.h phantstruct.h
-gamesupport.o: phantglobs.h
-misc.o: misc.c include.h /usr/include/ctype.h /usr/include/curses.h
-misc.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
-misc.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydefaults.h
-misc.o: /usr/include/sys/ttydev.h /usr/include/math.h /usr/include/pwd.h
-misc.o: /usr/include/setjmp.h /usr/include/signal.h /usr/include/machine/trap.h
-misc.o: /usr/include/time.h macros.h phantdefs.h phantstruct.h phantglobs.h
-phantglobs.o: phantglobs.c include.h /usr/include/ctype.h /usr/include/curses.h
-phantglobs.o: /usr/include/stdio.h /usr/include/sgtty.h
-phantglobs.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
-phantglobs.o: /usr/include/sys/ttydefaults.h /usr/include/sys/ttydev.h
-phantglobs.o: /usr/include/math.h /usr/include/pwd.h /usr/include/setjmp.h
-phantglobs.o: /usr/include/signal.h /usr/include/machine/trap.h
-phantglobs.o: /usr/include/time.h macros.h phantdefs.h phantstruct.h
-phantglobs.o: phantglobs.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY