remove subshell command
[unix-history] / usr / src / games / trek / Makefile
index 13ac9fb..f87b861 100644 (file)
@@ -1,8 +1,23 @@
-#      Makefile        4.5     83/07/04
 #
 #
-DESTDIR=
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.
+#
+# 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.
+#
+#      @(#)Makefile    5.7 (Berkeley) %G%
+#
 CFLAGS=        -O
 CFLAGS=        -O
-LFLAGS=        
+LIBC=  /lib/libc.a
 SRCS=  abandon.c attack.c autover.c capture.c check_out.c checkcond.c \
        compkl.c computer.c damage.c damaged.c dcrept.c destruct.c \
        dock.c dumpgame.c dumpme.c dumpssradio.c events.c externs.c \
 SRCS=  abandon.c attack.c autover.c capture.c check_out.c checkcond.c \
        compkl.c computer.c damage.c damaged.c dcrept.c destruct.c \
        dock.c dumpgame.c dumpme.c dumpssradio.c events.c externs.c \
@@ -19,158 +34,29 @@ OBJS=      abandon.o attack.o autover.o capture.o check_out.o checkcond.o \
        ranf.o rest.o schedule.o score.o setup.o setwarp.o shell.o \
        shield.o snova.o srscan.o systemname.o torped.o utility.o \
        visual.o warp.o win.o cgetc.o
        ranf.o rest.o schedule.o score.o setup.o setwarp.o shell.o \
        shield.o snova.o srscan.o systemname.o torped.o utility.o \
        visual.o warp.o win.o cgetc.o
-HDRS=  getpar.h trek.h
+MAN=   trek.0
 
 
-trek:  ${OBJS} ${HDRS}
-       cc ${LFLAGS} -o trek ${OBJS} -lm
+all: trek
 
 
-${OBJS}:
-       ${CC} ${CFLAGS} -c $*.c
+trek: ${OBJS} ${LIBC}
+       ${CC} ${CFLAGS} -o $@ ${OBJS} -lm -lcompat
 
 
-tags:  tags $(SRCS)
-       ctags $(SRCS)
+clean:
+       rm -f ${OBJS} core trek
 
 
-install: trek
-       install -s trek ${DESTDIR}/usr/games/trek
+cleandir: clean
+       rm -f ${MAN} tags .depend
 
 
-clean:
-       rm -f a.out core ${OBJS} trek
+depend: ${SRCS}
+       mkdep ${CFLAGS} ${SRCS}
 
 
-depend:
-       cat </dev/null >x.c
-       for i in ${SRCS}; do \
-               (echo `basename $$i .c`.o: $$i >>makedep; \
-               /bin/grep '^#[  ]*include' x.c $$i | sed \
-                       -e 's,<\(.*\)>,"/usr/include/\1",' \
-                       -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
-                       -e 's/\.c/.o/' >>makedep); done
-       echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
-       echo '$$r makedep' >>eddep
-       echo 'w' >>eddep
-       cp Makefile Makefile.bak
-       ed - Makefile < eddep
-       rm eddep makedep x.c
-       echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
-       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
-       echo '# see make depend above' >> Makefile
+install: ${MAN}
+       install -s -o games -g bin -m 700 trek ${DESTDIR}/usr/games/hide
+       (cd ${DESTDIR}/usr/games; rm -f trek; ln -s dm trek; chown games.bin trek)
+       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6
 
 
-# DO NOT DELETE THIS LINE -- make depend uses it
+lint: ${SRCS}
+       lint ${CFLAGS} ${SRCS}
 
 
-abandon.o: abandon.c
-abandon.o: trek.h
-attack.o: attack.c
-attack.o: trek.h
-autover.o: autover.c
-autover.o: trek.h
-capture.o: capture.c
-capture.o: trek.h
-check_out.o: check_out.c
-check_out.o: trek.h
-checkcond.o: checkcond.c
-checkcond.o: trek.h
-compkl.o: compkl.c
-compkl.o: trek.h
-computer.o: computer.c
-computer.o: trek.h
-computer.o: getpar.h
-computer.o: /usr/include/stdio.h
-damage.o: damage.c
-damage.o: trek.h
-damaged.o: damaged.c
-damaged.o: trek.h
-dcrept.o: dcrept.c
-dcrept.o: trek.h
-destruct.o: destruct.c
-destruct.o: trek.h
-dock.o: dock.c
-dock.o: trek.h
-dumpgame.o: dumpgame.c
-dumpgame.o: trek.h
-dumpme.o: dumpme.c
-dumpme.o: trek.h
-dumpssradio.o: dumpssradio.c
-dumpssradio.o: trek.h
-events.o: events.c
-events.o: trek.h
-externs.o: externs.c
-externs.o: trek.h
-getcodi.o: getcodi.c
-getcodi.o: getpar.h
-getpar.o: getpar.c
-getpar.o: /usr/include/stdio.h
-getpar.o: getpar.h
-help.o: help.c
-help.o: trek.h
-impulse.o: impulse.c
-impulse.o: trek.h
-initquad.o: initquad.c
-initquad.o: trek.h
-kill.o: kill.c
-kill.o: trek.h
-klmove.o: klmove.c
-klmove.o: trek.h
-lose.o: lose.c
-lose.o: trek.h
-lrscan.o: lrscan.c
-lrscan.o: trek.h
-main.o: main.c
-main.o: trek.h
-main.o: /usr/include/stdio.h
-main.o: /usr/include/sgtty.h
-move.o: move.c
-move.o: trek.h
-nova.o: nova.c
-nova.o: trek.h
-out.o: out.c
-out.o: trek.h
-phaser.o: phaser.c
-phaser.o: trek.h
-phaser.o: getpar.h
-play.o: play.c
-play.o: trek.h
-play.o: getpar.h
-ram.o: ram.c
-ram.o: trek.h
-ranf.o: ranf.c
-ranf.o: /usr/include/stdio.h
-rest.o: rest.c
-rest.o: trek.h
-rest.o: getpar.h
-schedule.o: schedule.c
-schedule.o: trek.h
-score.o: score.c
-score.o: trek.h
-score.o: getpar.h
-setup.o: setup.c
-setup.o: trek.h
-setup.o: getpar.h
-setwarp.o: setwarp.c
-setwarp.o: trek.h
-setwarp.o: getpar.h
-shell.o: shell.c
-shield.o: shield.c
-shield.o: trek.h
-shield.o: getpar.h
-snova.o: snova.c
-snova.o: trek.h
-srscan.o: srscan.c
-srscan.o: trek.h
-srscan.o: getpar.h
-systemname.o: systemname.c
-systemname.o: trek.h
-torped.o: torped.c
-torped.o: /usr/include/stdio.h
-torped.o: trek.h
-utility.o: utility.c
-visual.o: visual.c
-visual.o: trek.h
-warp.o: warp.c
-warp.o: trek.h
-win.o: win.c
-win.o: trek.h
-win.o: getpar.h
-cgetc.o: cgetc.c
-cgetc.o: /usr/include/stdio.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
+tags: ${SRCS}
+       ctags ${SRCS}