-# Makefile 4.3 85/09/07
-
-DESTDIR=
-CFILES= done.c init.c io.c main.c save.c subr.c vocab.c wizard.c
-OBJS= done.o init.o io.o main.o save.o subr.o vocab.o wizard.o
-HFILES = hdr.h
-SRCS = $(CFILES) $(HFILES) glorkz
+#
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved. The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+# @(#)Makefile 4.7 (Berkeley) 9/21/87
+#
CFLAGS= -O
-LDFLAGS=-n # should be -i on small machines, -n on a vax
+LIBC= /lib/libc.a
+SRCS= done.c init.c io.c main.c save.c subr.c vocab.c wizard.c
+OBJS= done.o init.o io.o main.o save.o subr.o vocab.o wizard.o
-advent: a.out
- rm -f advent
+advent: ${OBJS} ${LIBC}
+ ${CC} -n ${CFLAGS} ${OBJS}
+ rm -f $@
echo y | ./a.out
-a.out: ${OBJS}
- ${CC} ${LDFLAGS} ${CFLAGS} ${OBJS}
+save.o: save.c # vax C optimizer bug - infinite loop
+ ${CC} -c save.c
-save.o: save.c # vax C optimizer bug - infinite loop
- cc -c save.c
+clean: FRC
+ rm -f ${OBJS} core advent a.out
-# always recomple okplay
-okplay.o: /tmp
+depend: FRC
+ mkdep ${CFLAGS} ${SRCS}
-install: advent
- install -s advent ${DESTDIR}/usr/games/adventure
-# cp okplay /usr/games/adventure
-# cp advsaver /usr/games/lib
-# dd if=/usr/games/lib/adventure of=/usr/games/lib/advheader bs=1 count=16
-# chmod 711 /usr/games/lib
-# chmod 700 /usr/games/lib/adventure
-# chmod 755 /usr/games/lib/advheader
-# chmod 755 /usr/games/lib/advsaver
-# chmod 4711 /usr/games/adventure
-# chown games /usr/games/adventure /usr/games/lib/adventure /usr/games/lib/advheader /usr/games/lib/advsaver
-# rm advent a.out okplay
+install: FRC
+ install -s -o games -g bin -m 700 advent ${DESTDIR}/usr/games/hide/adventure
+ (cd ${DESTDIR}/usr/games; rm -f adventure; ln -s dm adventure; chown games.bin adventure)
-okplay: okplay.c
- ${CC} ${CFLAGS} -o okplay okplay.c
+lint: FRC
+ lint ${CFLAGS} ${SRCS}
-advsaver: advsaver.s
- ${AS} -o advsaver advsaver.s
+tags: FRC
+ ctags ${SRCS}
-lint:
- lint $(CFILES) >& lint.out
+FRC:
-clean:
- rm -f ${OBJS} a.out advent core errs
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-sources: $(SRCS)
+done.o: done.c hdr.h
+init.o: init.c hdr.h
+io.o: io.c hdr.h /usr/include/stdio.h
+main.o: main.c hdr.h
+save.o: save.c /usr/include/a.out.h /usr/include/sys/exec.h
+subr.o: subr.c hdr.h
+vocab.o: vocab.c hdr.h
+wizard.o: wizard.c hdr.h
-$(SRCS):
- sccs get $@
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY