DEST to DESTDIR
[unix-history] / usr / src / games / battlestar / Makefile
CommitLineData
641ba3f8 1# @(#)Makefile 1.3 %G%
589500c0
EW
2
3CFLAGS= -O
4OBJS= battlestar.o com1.o com2.o com3.o com4.o com5.o com6.o com7.o \
5 init.o cypher.o getcom.o parse.o room.o save.o fly.o misc.o \
6 globals.o \
7 wlist.o dayfile.o nightfile.o dayobjs.o nightobjs.o
8CFILES= battlestar.c com1.c com2.c com3.c com4.c com5.c com6.c com7.c \
9 init.c cypher.c getcom.c parse.c room.c save.c fly.c misc.c \
10 globals.c
11LIBS= -lcurses -ltermlib
12LINTFLAGS= -h
13JUNKFILES= battlestar tags mkfile mkwlist mkobjs \
14 wlist.c dayfile.c nightfile.c dayobjs.c nightobjs.c
15DATAFILES= dayfile nightfile battlewords dayobjs nightobjs
641ba3f8 16DIR= $(DESTDIR)/usr/games
589500c0 17LOGFILE= $(DIR)/lib/battlestar.log
641ba3f8 18MAN= $(DESTDIR)/usr/man/man6/battlestar.6
589500c0
EW
19
20battlestar: ${OBJS}
21 cc ${OBJS} ${LIBS} -o battlestar
22
23mkfile: mkfile.c
24 $(CC) $(CFLAGS) -o mkfile mkfile.c
25
6685f011 26dayfile.o: dayfile mkfile
589500c0 27 mkfile dayfile
6685f011
EW
28 $(CC) $(CFLAGS) -c dayfile.c
29 rm dayfile.c
589500c0 30
6685f011 31nightfile.o: nightfile mkfile
589500c0 32 mkfile nightfile
6685f011
EW
33 $(CC) $(CFLAGS) -c nightfile.c
34 rm nightfile.c
589500c0
EW
35
36mkwlist: mkwlist.c
37 $(CC) $(CFLAGS) -o mkwlist mkwlist.c
38
39wlist.c: battlewords mkwlist
40 mkwlist battlewords
41
42mkobjs: mkobjs.c
43 $(CC) $(CFLAGS) -o mkobjs mkobjs.c
44
45dayobjs.c: dayobjs mkobjs
46 mkobjs dayobjs
47
48nightobjs.c: nightobjs mkobjs
49 mkobjs nightobjs
50
51lint: ${CFILES}
52 lint ${LINTFLAGS} ${CFILES} ${LIBS}
53
54install: battlestar $(MAN) $(LOGFILE)
55 install -s -c battlestar $(DIR)/battlestar
56
57logfile $(LOGFILE):
58 cp /dev/null $(LOGFILE)
59 chmod 666 $(LOGFILE)
60
61man $(MAN):
62 install -c battlestar.6 $(MAN)
63
64clean:
65 rm -f ${OBJS} ${JUNKFILES}