1#
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved.  The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6#	@(#)Makefile	5.4 (Berkeley) 01/11/86
7#
8DESTDIR=
9CFLAGS= -O -DV7 -w
10OBJS= allow.o board.o check.o extra.o fancy.o init.o main.o move.o\
11	odds.o one.o save.o subs.o table.o text.o message.o
12TOBJS= allow.o board.o check.o data.o fancy.o init.o odds.o one.o save.o subs.o\
13	table.o teach.o ttext1.o ttext2.o tutor.o
14SRCS= allow.c board.c check.c data.c extra.c fancy.c init.c main.c\
15	move.c odds.c one.c save.c subs.c table.c teach.c text.c ttext1.c\
16	ttext2.c tutor.c message.c
17
18all: backgammon teachgammon backgammon.doc
19
20#	Backgammon program
21backgammon: $(OBJS)
22	-rm -f backgammon
23	cc -o backgammon $(OBJS) -ltermlib
24
25#	Backgammon rules and tutorial
26teachgammon: ${TOBJS}
27	-rm -f teachgammon
28	cc -o teachgammon $(TOBJS) -ltermlib
29
30#	Header files back.h and tutor.h
31allow.o board.o check.o extra.o fancy.o main.o move.o odds.o one.o save.o\
32	subs.o table.o teach.o text.o ttext1.o ttext2.o: back.h
33data.o tutor.o: back.h tutor.h
34
35#	Update message.  /tmp is always changing, so use it to ensure execution
36message.c: /tmp
37	ex - message.c < Mesgfix
38
39#	Documentation
40backgammon.doc: backgammon.src
41	-rm -f backgammon.doc
42	nroff -man -Tcrt backgammon.src > backgammon.doc
43
44#	Installation
45install:
46	install -s backgammon ${DESTDIR}/usr/games/backgammon
47	install -s teachgammon ${DESTDIR}/usr/games/teachgammon
48
49clean:
50	rm -f ${OBJS} ${TOBJS} backgammon teachgammon backgammon.doc errs
51