Mercurial > hg > early-roguelike
annotate srogue/Makefile.in @ 223:0e99eade579c
Generate text documentation from the troff source files.
This is done by make, in the 'docs' target, which is now part of the
normal build process.
Unfortunately, not all the games include troff sources. Getting decent
HTML output from groff is still a difficult process which will not be
attempted at this time. There are a few bugs in the 'install' and
'uninstall' rules.
Not to mention that the documentation is sometimes inaccurate.
author | John "Elwin" Edwards |
---|---|
date | Sun, 21 Feb 2016 20:47:12 -0500 |
parents | a666e4a034ed |
children | 4d0f53998e8a |
rev | line source |
---|---|
101 | 1 # Makefile for rogue |
2 # %W% (Berkeley) %G% | |
3 # | |
4 # Super-Rogue | |
5 # Copyright (C) 1984 Robert D. Kindelberger | |
6 # All rights reserved. | |
7 # | |
8 # Based on "Rogue: Exploring the Dungeons of Doom" | |
9 # Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman | |
10 # All rights reserved. | |
11 # | |
12 # See the file LICENSE.TXT for full copyright and licensing information. | |
13 | |
102
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
14 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
15 PACKAGE_TARNAME=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ |
101 | 16 PROGRAM=@PROGRAM@ |
17 | |
102
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
18 SCOREFILE=@SCOREFILE@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
19 LOGFILE=@LOGFILE@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
20 SAVEDIR=@SAVEDIR@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
21 GROUPOWNER=@GROUPOWNER@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
22 |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
23 DESTDIR= |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
24 prefix=@prefix@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
25 exec_prefix=@exec_prefix@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
26 datarootdir=@datarootdir@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
27 bindir=@bindir@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
28 docdir=@docdir@ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
29 |
104
fbc75509f4cd
Add config.h to the list of headers in the Makefiles.
John "Elwin" Edwards
parents:
102
diff
changeset
|
30 HDRS= bob.h cx.h ncx.h rdk.h rogue.h config.h |
101 | 31 OBJS= vers.o armor.o chase.o command.o daemon.o daemons.o disply.o encumb.o \ |
32 fight.o global.o init.o io.o list.o main.o mdport.o misc.o monsters.o \ | |
33 move.o new_leve.o options.o pack.o passages.o potions.o pstats.o \ | |
34 rings.o rip.o rooms.o save.o scrolls.o state.o sticks.o things.o \ | |
35 trader.o weapons.o wizard.o xcrypt.o | |
36 CFILES= vers.c armor.c chase.c command.c daemon.c daemons.c disply.c encumb.c \ | |
37 fight.c global.c init.c io.c list.c main.c mdport.c misc.c monsters.c \ | |
38 move.c new_leve.c options.c pack.c passages.c potions.c pstats.c \ | |
39 rings.c rip.c rooms.c save.c scrolls.c state.c sticks.c things.c \ | |
40 trader.c weapons.c wizard.c xcrypt.c | |
41 | |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
42 DOCS= $(PROGRAM).doc |
101 | 43 MISC= Makefile LICENSE.TXT rogue.nr |
44 | |
45 CC = gcc | |
116
97f8fdf9595c
Makefiles: don't set defaults for CFLAGS.
John "Elwin" Edwards
parents:
104
diff
changeset
|
46 CFLAGS= |
101 | 47 CPPFLAGS=@DEFS@ |
222 | 48 CRLIB = @LIBS@ |
101 | 49 RM = rm -f |
50 TAR = tar | |
102
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
51 INSTALL=@INSTALL@ |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
52 GROFF=@GROFF@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
53 NROFF=@NROFF@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
54 COLCRT=@COLCRT@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
55 TBL=@TBL@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
56 |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
57 all: $(PROGRAM) docs |
101 | 58 |
59 $(PROGRAM): $(HDRS) $(OBJS) | |
60 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | |
61 | |
62 tags: $(HDRS) $(CFILES) | |
63 ctags -u $? | |
64 ed - tags < :ctfix | |
65 sort tags -o tags | |
66 | |
67 lint: | |
68 lint -hxbc $(CFILES) $(CRLIB) > linterrs | |
69 | |
70 clean: | |
71 rm -f $(OBJS) core | |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
72 rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(DOCS) |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
73 |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
74 docs: $(DOCS) |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
75 |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
76 $(PROGRAM).doc: rogue.nr |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
77 if test "x$(GROFF)" != "x" ; then \ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
78 $(GROFF) -P-c -P-b -P-u -t -mm -Tascii rogue.nr >$(PROGRAM).doc ;\ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
79 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
80 $(TBL) rogue.nr | $(NROFF) -mm | $(COLCRT) - > $(PROGRAM).doc ;\ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
81 fi |
101 | 82 |
102
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
83 install: $(PROGRAM) |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
84 -touch test |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
85 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
86 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
87 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
88 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
89 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
90 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
91 -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
92 -if test "x$(GROUPOWNER)" != "x" ; then \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
93 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
94 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
95 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
96 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
97 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
98 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
99 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
100 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
101 fi |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
102 -if test ! -d $(DESTDIR)$(docdir) ; \ |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
103 then mkdir -p $(DESTDIR)$(docdir) ; fi |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
104 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
105 -$(INSTALL) -m 0644 rogue.nr $(DESTDIR)$(docdir)/$(PROGRAM).nr |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
106 -$(INSTALL) -m 0644 $(PROGRAM).doc $(DESTDIR)$(docdir)/$(PROGRAM).doc |
102
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
107 -$(RM) test |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
108 |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
109 uninstall: |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
110 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
111 -$(RM) $(DESTDIR)$(docdir)/LICENSE.TXT |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
112 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).nr |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
113 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).doc |
102
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
114 -rmdir $(DESTDIR)$(docdir) |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
115 |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
116 reinstall: uninstall install |
1906d183f1f5
srogue: add install and uninstall targets to Makefile
John "Elwin" Edwards
parents:
101
diff
changeset
|
117 |
101 | 118 count: |
119 wc -l $(HDRS) $(CFILES) | |
120 | |
121 realcount: | |
122 cc -E $(CFILES) | ssp - | wc -l | |
123 | |
124 update: | |
125 ar uv .SAVE $(CFILES) $(HDRS) $(MISC) | |
126 | |
127 dist: | |
128 @mkdir dist | |
129 cp $(CFILES) $(HDRS) $(MISC) dist | |
130 | |
131 dist.src: | |
132 make clean | |
133 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) | |
134 gzip -f $(DISTNAME)-src.tar | |
135 | |
136 dist.irix: | |
137 make clean | |
138 make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM) | |
139 tbl rogue.nr | nroff -mm | colcrt - > $(PROGRAM).doc | |
140 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc | |
141 gzip -f $(DISTNAME)-irix.tar | |
142 | |
143 debug.aix: | |
144 make clean | |
145 make CC=xlc CFLAGS="-qmaxmem=16768 -g -DWIZARD -qstrict" $(PROGRAM) | |
146 | |
147 dist.aix: | |
148 make clean | |
149 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM) | |
150 tbl rogue.nr | nroff -mm | colcrt - > $(PROGRAM).doc | |
151 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc | |
152 gzip -f $(DISTNAME)-aix.tar | |
153 | |
154 debug.linux: | |
155 make clean | |
156 make CFLAGS="-g -DWIZARD" $(PROGRAM) | |
157 | |
158 dist.linux: | |
159 make clean | |
160 make $(PROGRAM) | |
161 groff -P-c -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' >$(PROGRAM).doc | |
162 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc | |
163 gzip -f $(DISTNAME)-linux.tar | |
164 | |
165 debug.interix: | |
166 make clean | |
167 make CFLAGS="-g3 -DWIZARD" $(PROGRAM) | |
168 | |
169 dist.interix: | |
170 make clean | |
171 make $(PROGRAM) | |
172 groff -P-b -P-u -t -mm -Tascii rogue.nr > $(PROGRAM).doc | |
173 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc | |
174 gzip -f $(DISTNAME)-interix.tar | |
175 | |
176 debug.cygwin: | |
177 make clean | |
178 make CFLAGS="-g3 -DWIZARD" $(PROGRAM) | |
179 | |
180 dist.cygwin: | |
181 make clean | |
182 make $(PROGRAM) | |
183 groff -P-c -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' >$(PROGRAM).doc | |
184 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(PROGRAM).doc | |
185 gzip -f $(DISTNAME)-cygwin.tar | |
186 | |
187 debug.djgpp: | |
188 make clean | |
189 make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM) | |
190 | |
191 dist.djgpp: | |
192 make clean | |
193 make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM) | |
194 groff -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' > $(PROGRAM).doc | |
195 rm -f $(DISTNAME)-djgpp.zip | |
196 zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(PROGRAM).doc |