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