(no message)
[unix-history] / usr / src / games / sail / Makefile
CommitLineData
3df9ffe3
CL
1#
2# Sail - Wooden Ships And Iron Men
3#
fe0cae24 4# Makefile @(#)Makefile 1.13 83/10/28
3df9ffe3
CL
5#
6CC= cc
1c4e97f4 7CTAGS= ctags -w
a7f6ca95 8CFLAGS= -O
b3a57661
EW
9
10DFILES= driver1.c driver2.c driver3.c grap.c boarders.c
11DOBJS= driver1.o driver2.o driver3.o grap.o boarders.o
fe0cae24
EW
12PFILES= player1.c player2.c player3.c player4.c player5.c player6.c player7.c \
13 version.c
14POBJS= player1.o player2.o player3.o player4.o player5.o player6.o player7.o \
15 version.o
6c17b19a
EW
16COMMONFILES= assorted.c game.c globals.c misc.c parties.c sync.c
17COMMONOBJS= assorted.o game.o globals.o misc.o parties.o sync.o
3df9ffe3
CL
18LFILES= sail.log.c
19LOBJS= sail.log.o
b3a57661
EW
20
21HDRS= externs.h player.h driver.h machdep.h
22OTHERFILES= Makefile sail.6
1c4e97f4 23CTAGFILES= ${DFILES} ${PFILES} ${LFILES} ${COMMONFILES}
6c17b19a
EW
24JUNKFILES= make.out
25PLIBS= -lcurses -ltermlib
3df9ffe3
CL
26DLIBS=
27LLIBS=
1c4e97f4 28SAILMASTER= daemon
6348b8d3 29SAIL= sail
2016bd8e 30DRIVER= lib/saildriver
6348b8d3 31SAIL.LOG= sail.log
b3a57661 32LOGFILE= lib/saillog
f5de169d 33TARGET= /usr/games
3df9ffe3 34
6c17b19a 35all: sail driver sail.log
a7f6ca95 36
b3a57661 37sail: ${POBJS} ${COMMONOBJS}
3df9ffe3
CL
38 cc -O ${COMMONOBJS} ${POBJS} ${PLIBS} -o sail
39
b3a57661 40driver: ${DOBJS} ${COMMONOBJS}
3df9ffe3
CL
41 cc -O ${COMMONOBJS} ${DOBJS} ${DLIBS} -o driver
42
3df9ffe3
CL
43sail.log: ${LOBJS} globals.o
44 cc -O ${LOBJS} globals.o -o sail.log
45
b3a57661
EW
46lint:
47 lint -z $(PFILES) $(COMMONFILES) -lcurses
48 lint -z $(DFILES) $(COMMONFILES)
3df9ffe3 49
1c4e97f4
CL
50tags: ${CTAGFILES}
51 ${CTAGS} ${CTAGFILES}
52
53${HDRS} ${CTAGFILES}:
54 sccs get $@;
55
b3a57661 56profile: sail.prof
3df9ffe3 57
b3a57661
EW
58driver.prof: ${COMMONOBJS} ${DOBJS}
59 cc -i -p ${COMMONOBJS} ${DOBJS} ${CFLAGS} ${DLIBS} -o driver.prof
3df9ffe3 60
b3a57661
EW
61profile: sail.prof
62 cc -i -p ${COMMONOBJS} ${POBJS} ${CFLAGS} ${PLIBS} -o sail.prof
3df9ffe3 63
3df9ffe3
CL
64clean:
65 rm -f ${DOBJS} ${POBJS} ${LOBJS} ${COMMONOBJS} ${JUNKFILES}
66
6c17b19a 67install: sail driver sail.log ${TARGET}/${LOGFILE}
f5de169d
CL
68 install -s -m 4711 -o ${SAILMASTER} sail ${TARGET}/${SAIL}
69 install -s -m 4711 -o ${SAILMASTER} driver ${TARGET}/${DRIVER}
70 install -s -m 711 sail.log ${TARGET}/${SAIL.LOG}
b3a57661 71 install sail.6 /usr/man/man6
1c4e97f4 72
b3a57661
EW
73${TARGET}/${LOGFILE}:
74 cp /dev/null ${TARGET}/${LOGFILE}
75 chown ${SAILMASTER} ${TARGET}/${LOGFILE}
76 chmod 644 ${TARGET}/${LOGFILE}