| 1 | # |
| 2 | # Copyright (c) 1987 Regents of the University of California. |
| 3 | # All rights reserved. |
| 4 | # |
| 5 | # Redistribution and use in source and binary forms are permitted |
| 6 | # provided that the above copyright notice and this paragraph are |
| 7 | # duplicated in all such forms and that any documentation, |
| 8 | # advertising materials, and other materials related to such |
| 9 | # distribution and use acknowledge that the software was developed |
| 10 | # by the University of California, Berkeley. The name of the |
| 11 | # University may not be used to endorse or promote products derived |
| 12 | # from this software without specific prior written permission. |
| 13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 16 | # |
| 17 | # @(#)Makefile 5.5 (Berkeley) %G% |
| 18 | # |
| 19 | CFLAGS= -O -DUNIX -DUNIX_BSD4_2 |
| 20 | LIBC= /lib/libc.a |
| 21 | SRCS= curses.c hit.c init.c inventory.c level.c machdep.c main.c \ |
| 22 | message.c monster.c move.c object.c pack.c play.c random.c ring.c \ |
| 23 | room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c |
| 24 | OBJS= curses.o hit.o init.o inventory.o level.o machdep.o main.o \ |
| 25 | message.o monster.o move.o object.o pack.o play.o random.o ring.o \ |
| 26 | room.o save.o score.o spec_hit.o throw.o trap.o use.o zap.o |
| 27 | MAN= rogue.0 |
| 28 | |
| 29 | all: rogue |
| 30 | |
| 31 | rogue: ${OBJS} ${LIBC} |
| 32 | ${CC} ${OBJS} -o $@ -lcurses -ltermlib |
| 33 | |
| 34 | clean: |
| 35 | rm -f ${OBJS} core rogue |
| 36 | |
| 37 | cleandir: clean |
| 38 | rm -f ${MAN} tags .depend |
| 39 | |
| 40 | depend: ${SRCS} |
| 41 | mkdep ${CFLAGS} ${SRCS} |
| 42 | |
| 43 | install: ${MAN} |
| 44 | install -s -o games -g bin -m 4700 rogue ${DESTDIR}/usr/games/hide |
| 45 | (cd ${DESTDIR}/usr/games; rm -f rogue; ln -s dm rogue; chown games.bin rogue) |
| 46 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6 |
| 47 | |
| 48 | lint: ${SRCS} |
| 49 | lint ${CFLAGS} ${SRCS} |
| 50 | |
| 51 | tags: ${SRCS} |
| 52 | ctags ${SRCS} |