xref: /original-bsd/games/snake/snake/Makefile (revision 648cab2a)
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.7 (Berkeley) 06/18/88
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21LIBS=	-lm -ltermcap
22SRCS1=	snake.c move.c
23OBJS1=	snake.o move.o
24SRCS2=	snscore.c
25OBJS2=	snscore.o
26
27all:	snake snscore
28
29snake:	${OBJS1} ${LIBC}
30	${CC} -o $@ ${CFLAGS} ${OBJS1} ${LIBS}
31
32snscore: ${OBJS2} ${LIBC}
33	${CC} -o $@ ${CFLAGS} ${OBJS2}
34
35clean: FRC
36	rm -f ${OBJS1} ${OBJS2} core snake snscore busy
37
38depend: FRC
39	mkdep ${CFLAGS} ${SRCS1} ${SRCS2}
40
41install: FRC
42	install -s -o games -g bin -m 4700 snake ${DESTDIR}/usr/games/hide
43	(cd ${DESTDIR}/usr/games; rm -f snake; ln -s dm snake; chown games.bin snake)
44	install -s -o games -g bin -m 700 snscore ${DESTDIR}/usr/games/hide
45	(cd ${DESTDIR}/usr/games; rm -f snscore; ln -s dm snscore; chown games.bin snscore)
46	-[ -s ${DESTDIR}/usr/games/lib/snakerawscores ] || install -c -o games -g bin -m 600 /dev/null ${DESTDIR}/usr/games/lib/snakerawscores
47
48lint: FRC
49	lint ${CFLAGS} ${SRCS1}
50	lint ${CFLAGS} ${SRCS2}
51
52tags: FRC
53	ctags ${SRCS1} ${SRCS2}
54
55FRC:
56
57# DO NOT DELETE THIS LINE -- mkdep uses it.
58# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
59
60snake.o: snake.c snake.h /usr/include/stdio.h /usr/include/assert.h
61snake.o: /usr/include/sys/types.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
62snake.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
63snake.o: /usr/include/signal.h /usr/include/machine/trap.h /usr/include/math.h
64snake.o: /usr/include/pwd.h
65move.o: move.c snake.h /usr/include/stdio.h /usr/include/assert.h
66move.o: /usr/include/sys/types.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
67move.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
68move.o: /usr/include/signal.h /usr/include/machine/trap.h /usr/include/math.h
69snscore.o: snscore.c /usr/include/stdio.h /usr/include/pwd.h
70
71# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
72