Commit | Line | Data |
---|---|---|
cb4ce405 | 1 | # |
1eb8c93a KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
cb4ce405 | 4 | # |
1eb8c93a KB |
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 | # | |
7abf8d65 | 17 | # @(#)Makefile 5.3 (Berkeley) %G% |
cb4ce405 | 18 | # |
7abf8d65 | 19 | CFLAGS= -O -DBSD |
cb4ce405 KB |
20 | YFLAGS= -d |
21 | LIBC= /lib/libc.a | |
22 | LIBS= -ll -lm -lcurses -ltermcap | |
23 | SRCS= extern.c grammar.c graphics.c input.c lex.c list.c log.c \ | |
24 | main.c tunable.c update.c | |
25 | OBJS= extern.o grammar.o input.o lex.o list.o log.o main.o tunable.o \ | |
26 | graphics.o update.o | |
1eb8c93a | 27 | MAN= atc.0 |
cb4ce405 KB |
28 | |
29 | all: atc | |
30 | ||
31 | atc: ${OBJS} ${LIBC} | |
32 | ${CC} ${CFLAGS} ${OBJS} ${LIBS} -o $@ | |
33 | ||
1eb8c93a | 34 | clean: |
cb4ce405 KB |
35 | rm -f ${OBJS} core atc grammar.c y.tab.h y.tab.c lex.yy.c lex.c |
36 | ||
1eb8c93a KB |
37 | cleandir: clean |
38 | rm -f ${MAN} tags .depend | |
39 | ||
40 | depend: ${SRCS} | |
cb4ce405 KB |
41 | mkdep ${CFLAGS} ${SRCS} |
42 | ||
1eb8c93a | 43 | install: ${MAN} |
cb4ce405 KB |
44 | -[ -d ${DESTDIR}/usr/games/lib/atc ] || mkdir ${DESTDIR}/usr/games/lib/atc |
45 | chmod 700 ${DESTDIR}/usr/games/lib/atc | |
46 | chown games.bin ${DESTDIR}/usr/games/lib/atc | |
47 | (cd games; install -c -o games -g bin -m 600 * ${DESTDIR}/usr/games/lib/atc) | |
48 | install -s -o games -g bin -m 4700 atc ${DESTDIR}/usr/games/hide/atc | |
49 | (cd ${DESTDIR}/usr/games; rm -f atc; ln -s dm atc; chown games.bin atc) | |
1eb8c93a | 50 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/games/cat6 |
cb4ce405 | 51 | |
1eb8c93a | 52 | lint: ${SRCS} |
cb4ce405 KB |
53 | lint ${CFLAGS} ${SRCS} |
54 | ||
1eb8c93a | 55 | tags: ${SRCS} |
cb4ce405 | 56 | ctags ${SRCS} |