xref: /original-bsd/games/cribbage/Makefile (revision 65ba69af)
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=	-lcurses -ltermlib
22HDRS=	cribbage.h deck.h cribcur.h
23SRCS=	extern.c crib.c support.c cards.c score.c io.c
24OBJS=	extern.o crib.o support.o cards.o score.o io.o
25TOBJS=	test.o cards.o score.o io.o extern.o
26
27all: cribbage crib.instr
28
29cribbage: ${OBJS} ${LIBC}
30	${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS}
31
32test: ${TOBJS} ${LIBC}
33	${CC} -o $@ ${CFLAGS} ${TOBJS} ${LIBS}
34
35crib.instr: cribbage.n macro
36	nroff cribbage.n > crib.instr
37
38clean: FRC
39	rm -f ${OBJS} core crib.instr cribbage test
40
41depend: FRC
42	mkdep ${CFLAGS} ${SRCS}
43
44install: FRC
45	install -o games -g bin -m 400 crib.instr ${DESTDIR}/usr/games/lib/crib.instr
46	install -s -o games -g bin -m 4700 cribbage ${DESTDIR}/usr/games/hide
47	(cd ${DESTDIR}/usr/games; rm -f cribbage; ln -s dm cribbage; chown games.bin cribbage)
48
49lint: FRC
50	lint ${CFLAGS} ${SRCS}
51
52tags: FRC
53	ctags ${SRCS}
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
60extern.o: extern.c /usr/include/curses.h /usr/include/stdio.h
61extern.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
62extern.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h deck.h
63extern.o: cribbage.h
64crib.o: crib.c /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h
65crib.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
66crib.o: /usr/include/sys/ttydev.h /usr/include/signal.h deck.h cribbage.h
67crib.o: cribcur.h
68support.o: support.c /usr/include/curses.h /usr/include/stdio.h
69support.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
70support.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h deck.h
71support.o: cribbage.h cribcur.h
72cards.o: cards.c /usr/include/stdio.h deck.h
73score.o: score.c /usr/include/stdio.h deck.h cribbage.h
74io.o: io.c /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h
75io.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
76io.o: /usr/include/sys/ttydev.h /usr/include/ctype.h /usr/include/signal.h
77io.o: deck.h cribbage.h cribcur.h
78
79# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
80