-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
130 lines (106 loc) · 3.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Makefile for rogue
# %W% (Berkeley) %G%
#
# Super-Rogue
# Copyright (C) 1984 Robert D. Kindelberger
# All rights reserved.
#
# Based on "Rogue: Exploring the Dungeons of Doom"
# Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman
# All rights reserved.
#
# See the file LICENSE.TXT for full copyright and licensing information.
DISTNAME=srogue9.0-1
PROGRAM=srogue
HDRS= bob.h cx.h ncx.h rdk.h rogue.h
OBJS= vers.o armor.o chase.o command.o daemon.o daemons.o disply.o encumb.o \
fight.o global.o init.o io.o list.o main.o misc.o monsters.o move.o \
new_leve.o options.o pack.o passages.o potions.o pstats.o rings.o rip.o \
rooms.o save.o scrolls.o state.o sticks.o things.o trader.o weapons.o \
wizard.o xcrypt.o
CFILES= vers.c armor.c chase.c command.c daemon.c daemons.c disply.c encumb.c \
fight.c global.c init.c io.c list.c main.c misc.c monsters.c move.c \
new_leve.c options.c pack.c passages.c potions.c pstats.c rings.c rip.c \
rooms.c save.c scrolls.c state.c sticks.c things.c trader.c weapons.c \
wizard.c xcrypt.c
MISC= Makefile LICENSE.TXT rogue.nr
CC = gcc
CFLAGS= -g
CRLIB = -lcurses
RM = rm -f
TAR = tar
$(PROGRAM): $(HDRS) $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
tags: $(HDRS) $(CFILES)
ctags -u $?
ed - tags < :ctfix
sort tags -o tags
lint:
lint -hxbc $(CFILES) $(CRLIB) > linterrs
clean:
rm -f $(OBJS) core
rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).doc
count:
wc -l $(HDRS) $(CFILES)
realcount:
cc -E $(CFILES) | ssp - | wc -l
update:
ar uv .SAVE $(CFILES) $(HDRS) $(MISC)
dist:
@mkdir dist
cp $(CFILES) $(HDRS) $(MISC) dist
dist.src:
make clean
tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC)
gzip -f $(DISTNAME)-src.tar
dist.irix:
make clean
make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM)
tbl rogue.nr | nroff -mm | colcrt - > $(PROGRAM).doc
tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
gzip -f $(DISTNAME)-irix.tar
debug.aix:
make clean
make CC=xlc CFLAGS="-qmaxmem=16768 -g -DWIZARD -qstrict" $(PROGRAM)
dist.aix:
make clean
make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM)
tbl rogue.nr | nroff -mm | colcrt - > $(PROGRAM).doc
tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
gzip -f $(DISTNAME)-aix.tar
debug.linux:
make clean
make CFLAGS="-g -DWIZARD" $(PROGRAM)
dist.linux:
make clean
make $(PROGRAM)
groff -P-c -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' >$(PROGRAM).doc
tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
gzip -f $(DISTNAME)-linux.tar
debug.interix:
make clean
make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
dist.interix:
make clean
make $(PROGRAM)
groff -P-b -P-u -t -mm -Tascii rogue.nr > $(PROGRAM).doc
tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
gzip -f $(DISTNAME)-interix.tar
debug.cygwin:
make clean
make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
dist.cygwin:
make clean
make $(PROGRAM)
groff -P-c -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' >$(PROGRAM).doc
tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(PROGRAM).doc
gzip -f $(DISTNAME)-cygwin.tar
debug.djgpp:
make clean
make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
dist.djgpp:
make clean
make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
groff -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' > $(PROGRAM).doc
rm -f $(DISTNAME)-djgpp.zip
zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(PROGRAM).doc