Mercurial > hg > early-roguelike
annotate rogue3/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 |
---|---|
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
1 # |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
2 # Makefile for rogue |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
3 # %W% (Berkeley) %G% |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
4 # |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
5 # Rogue: Exploring the Dungeons of Doom |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
6 # Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
7 # All rights reserved. |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
8 # |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
9 # See the file LICENSE.TXT for full copyright and licensing information. |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
10 # |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
11 |
92
53e69c17c313
rogue3: set missing Makefile variables.
John "Elwin" Edwards
parents:
91
diff
changeset
|
12 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ |
53e69c17c313
rogue3: set missing Makefile variables.
John "Elwin" Edwards
parents:
91
diff
changeset
|
13 PACKAGE_TARNAME=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ |
88 | 14 PROGRAM=@PROGRAM@ |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
15 |
91
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
16 SCOREFILE=@SCOREFILE@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
17 LOGFILE=@LOGFILE@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
18 SAVEDIR=@SAVEDIR@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
19 GROUPOWNER=@GROUPOWNER@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
20 |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
21 DESTDIR= |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
22 prefix=@prefix@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
23 exec_prefix=@exec_prefix@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
24 datarootdir=@datarootdir@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
25 bindir=@bindir@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
26 mandir=@mandir@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
27 man6dir=$(mandir)/man6 |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
28 docdir=@docdir@ |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
29 |
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
30 |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
31 O=o |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
32 |
91
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
33 HDRS= rogue.h machdep.h config.h |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
34 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
35 OBJS1 = vers.$(O) armor.$(O) chase.$(O) command.$(O) daemon.$(O) daemons.$(O) \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
36 fight.$(O) init.$(O) io.$(O) list.$(O) main.$(O) mdport.$(O) \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
37 misc.$(O) monsters.$(O) move.$(O) newlevel.$(O) options.$(O) |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
38 OBJS2 = pack.$(O) passages.$(O) potions.$(O) rings.$(O) rip.$(O) rooms.$(O) \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
39 save.$(O) scrolls.$(O) state.$(O) sticks.$(O) things.$(O) \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
40 weapons.$(O) wizard.$(O) xcrypt.$(O) |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
41 OBJS = $(OBJS1) $(OBJS2) |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
42 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
43 CFILES= vers.c armor.c chase.c command.c daemon.c daemons.c fight.c \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
44 init.c io.c list.c main.c mdport.c misc.c monsters.c move.c newlevel.c \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
45 options.c pack.c passages.c potions.c rings.c rip.c rooms.c \ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
46 save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c xcrypt.c |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
47 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
48 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
49 MISC_C= |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
50 DOCSRC= rogue.6 rogue.r |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
51 DOCS = $(PROGRAM).doc $(PROGRAM).cat |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
52 MISC = Makefile $(MISC_C) LICENSE.TXT $(PROGRAM).sln $(PROGRAM).vcproj $(DOCS)\ |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
53 $(DOCSRC) rogue36.html readme36.html |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
54 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
55 CC = gcc |
88 | 56 CPPFLAGS =@DEFS@ |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
57 ROPTS = |
116
97f8fdf9595c
Makefiles: don't set defaults for CFLAGS.
John "Elwin" Edwards
parents:
92
diff
changeset
|
58 COPTS = |
20
bbf072f8bafa
rogue3: move file locations from Makefile to machdep.h
edwarj4
parents:
16
diff
changeset
|
59 CFLAGS= $(COPTS) $(ROPTS) |
222 | 60 LIBS = @LIBS@ |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
61 RM = rm -f |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
62 LD = $(CC) |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
63 LDOUT = -o |
91
e5ddbaf324d4
rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents:
88
diff
changeset
|
64 INSTALL=@INSTALL@ |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
65 GROFF=@GROFF@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
66 NROFF=@NROFF@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
67 COLCRT=@COLCRT@ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
68 TBL=@TBL@ |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
69 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
70 .SUFFIXES: .obj |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
71 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
72 .c.obj: |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
73 $(CC) $(CFLAGS) /c $*.c |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
74 |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
75 all: $(PROGRAM)$(EXE) docs |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
76 |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
77 $(PROGRAM)$(EXE): $(HDRS) $(OBJS) |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
78 $(LD) $(LDFLAGS) $(OBJS) $(LIBS) $(LDOUT)$@ |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
79 |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
80 clean: |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
81 $(RM) $(OBJS1) |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
82 $(RM) $(OBJS2) |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
83 $(RM) core $(PROGRAM) $(PROGRAM).exe $(DOCS) $(DISTNAME).tar $(DISTNAME).tar.gz |
0
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
84 $(RM) $(DISTNAME).zip |
527e2150eaf0
Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff
changeset
|
85 |
223
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
86 docs: $(DOCS) |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
87 |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
88 $(PROGRAM).doc: rogue.r |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
89 if test "x$(GROFF)" != "x" ; then \ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
90 $(GROFF) -P-c -P-b -P-u -t -ms -Tutf8 rogue.r > $(PROGRAM).doc ;\ |
0e99eade579c
Generate text documentation from the troff source files.
John "Elwin" Edwards
parents:
222
diff
changeset
|
91 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ |