Mercurial > hg > early-roguelike
annotate arogue5/Makefile.in @ 224:4d0f53998e8a
Makefile fixes related to installation.
'make install' and 'make uninstall' should now work correctly, placing
the documentation in the proper places. Any directories needed will be
created.
author | John "Elwin" Edwards |
---|---|
date | Fri, 26 Feb 2016 17:30:30 -0500 |
parents | a666e4a034ed |
children | 455464db5800 |
rev | line source |
---|---|
99 | 1 # |
2 # Makefile for rogue | |
3 # | |
4 # Advanced Rogue | |
5 # Copyright (C) 1984, 1985 Michael Morgan, Ken Dalka and AT&T | |
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 # | |
14 | |
15 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ | |
16 PACKAGE_TARNAME=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ | |
17 PROGRAM=@PROGRAM@ | |
18 | |
19 SCOREFILE=@SCOREFILE@ | |
20 LOGFILE=@LOGFILE@ | |
21 SAVEDIR=@SAVEDIR@ | |
22 GROUPOWNER=@GROUPOWNER@ | |
23 | |
24 DESTDIR= | |
25 prefix=@prefix@ | |
26 exec_prefix=@exec_prefix@ | |
27 datarootdir=@datarootdir@ | |
28 bindir=@bindir@ | |
29 docdir=@docdir@ | |
30 | |
31 O=o | |
32 | |
104
fbc75509f4cd
Add config.h to the list of headers in the Makefiles.
John "Elwin" Edwards
parents:
99
diff
changeset
|
33 HDRS = rogue.h mach_dep.h network.h config.h |
99 | 34 OBJS1 = chase.$(O) command.$(O) daemon.$(O) daemons.$(O) encumb.$(O) \ |
35 fight.$(O) init.$(O) io.$(O) list.$(O) main.$(O) maze.$(O) mdport.$(O)\ | |
36 misc.$(O) monsters.$(O) move.$(O) new_level.$(O) options.$(O) \ | |
37 outside.$(O) | |
38 OBJS2 = pack.$(O) passages.$(O) player.$(O) potions.$(O) rings.$(O) rip.$(O) \ | |
39 rogue.$(O) rooms.$(O) save.$(O) scrolls.$(O) state.$(O) sticks.$(O) \ | |
40 things.$(O) trader.$(O) util.$(O) vers.$(O) weapons.$(O) wear.$(O) \ | |
41 wizard.$(O) xcrypt.$(O) | |
42 OBJS = $(OBJS1) $(OBJS2) | |
43 CFILES= \ | |
44 vers.c chase.c command.c daemon.c daemons.c encumb.c \ | |
45 fight.c init.c io.c list.c main.c maze.c mdport.c misc.c monsters.c \ | |
46 move.c new_level.c options.c outside.c pack.c passages.c player.c \ | |
47 potions.c rings.c rip.c rogue.c \ | |
48 rooms.c save.c scrolls.c state.c sticks.c things.c trader.c util.c \ | |
49 weapons.c wear.c wizard.c xcrypt.c | |
50 | |
51 MISC= Makefile LICENSE.TXT arogue58.sln arogue58.vcproj | |
52 DOCS= arogue58.doc arogue58.html | |
53 | |
54 CC = gcc | |
55 CPPFLAGS =@DEFS@ | |
116
97f8fdf9595c
Makefiles: don't set defaults for CFLAGS.
John "Elwin" Edwards
parents:
104
diff
changeset
|
56 CFLAGS= |
222 | 57 CRLIB = @LIBS@ |
99 | 58 RM = rm -f |
59 TAR = tar | |
60 INSTALL=@INSTALL@ | |
61 .SUFFIXES: .obj | |
62 | |
63 .c.obj: | |
64 $(CC) $(CFLAGS) /c $*.c | |
65 | |
66 $(PROGRAM): $(OBJS) | |
67 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | |
68 | |
69 tags: $(HDRS) $(CFILES) | |
70 ctags -u $? | |
71 ed - tags < :ctfix | |
72 sort tags -o tags | |
73 | |
74 lint: | |
75 lint -hxbc $(CFILES) $(CRLIB) > linterrs | |
76 | |
77 install: $(PROGRAM) | |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
78 touch test |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
79 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
80 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
81 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
82 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
83 mkdir -p `dirname $(DESTDIR)$(LOGFILE)` ; \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
84 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
85 if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
86 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
87 mkdir -p $(DESTDIR)$(bindir) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
88 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) |
99 | 89 -if test "x$(GROUPOWNER)" != "x" ; then \ |
90 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ | |
91 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ | |
92 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
93 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ | |
94 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
95 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | |
96 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | |
97 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
98 fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
99 if test ! -d $(DESTDIR)$(docdir) ; \ |
99 | 100 then mkdir -p $(DESTDIR)$(docdir) ; fi |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
101 $(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
102 $(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
103 $(RM) test |
99 | 104 |
105 uninstall: | |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
106 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
107 $(RM) -r $(DESTDIR)$(docdir) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
108 |
99 | 109 reinstall: uninstall install |
110 | |
111 clean: | |
112 $(RM) $(OBJS1) | |
113 $(RM) $(OBJS2) | |
114 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip | |
115 | |
116 count: | |
117 wc -l $(HDRS) $(CFILES) | |
118 | |
119 realcount: | |
120 cc -E $(CFILES) | ssp - | wc -l | |
121 | |
122 update: | |
123 ar uv .SAVE $(CFILES) $(HDRS) $(MISC) | |
124 | |
125 dist: | |
126 @mkdir dist | |
127 cp $(CFILES) $(HDRS) $(MISC) dist | |
128 | |
129 dist.src: | |
130 make clean | |
131 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) $(DOCS) | |
132 gzip -f $(DISTNAME)-src.tar | |
133 | |
134 dist.irix: | |
135 make clean | |
136 make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM) | |
137 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
138 gzip -f $(DISTNAME)-irix.tar | |
139 | |
140 dist.aix: | |
141 make clean | |
142 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM) | |
143 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
144 gzip -f $(DISTNAME)-aix.tar | |
145 | |
146 debug.linux: | |
147 make clean | |
148 make CFLAGS="-g -DWIZARD" $(PROGRAM) | |
149 | |
150 dist.linux: | |
151 make clean | |
152 make $(PROGRAM) | |
153 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
154 gzip -f $(DISTNAME)-linux.tar | |
155 | |
156 debug.interix: | |
157 make clean | |
158 make CFLAGS="-g3 -DWIZARD" $(PROGRAM) | |
159 | |
160 dist.interix: | |
161 make clean | |
162 make $(PROGRAM) | |
163 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
164 gzip -f $(DISTNAME)-interix.tar | |
165 | |
166 debug.cygwin: | |
167 make clean | |
168 make CFLAGS="-g3 -DWIZARD" $(PROGRAM) | |
169 | |
170 dist.cygwin: | |
171 make clean | |
172 make CRLIB="-static -lcurses" $(PROGRAM) | |
173 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
174 gzip -f $(DISTNAME)-cygwin.tar | |
175 | |
176 # | |
177 # Use MINGW32-MAKE to build this target | |
178 # | |
179 dist.mingw32: | |
180 @$(MAKE) --no-print-directory RM="cmd /c del" clean | |
181 @$(MAKE) --no-print-directory CRLIB="-lpdcurses" $(PROGRAM) | |
182 cmd /c del $(DISTNAME)-mingw32.zip | |
183 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
184 | |
185 dist.msys: | |
186 @$(MAKE) --no-print-directory clean | |
187 @$(MAKE) --no-print-directory CRLIB="-lcurses" $(PROGRAM) | |
188 tar cf $(DISTNAME)-msys.tar $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
189 gzip -f $(DISTNAME)-msys.tar | |
190 | |
191 debug.djgpp: | |
192 make clean | |
193 make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM) | |
194 | |
195 dist.djgpp: | |
196 make clean | |
197 make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM) | |
198 rm -f $(DISTNAME)-djgpp.zip | |
199 zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
200 | |
201 # | |
202 # Use NMAKE to build this target | |
203 # | |
204 | |
205 debug.win32: | |
206 nmake O="obj" RM="-del" clean | |
207 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-DWIZARD -nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM) | |
208 | |
209 dist.win32: | |
210 nmake O="obj" RM="-del" clean | |
211 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM) | |
212 -del $(DISTNAME)-win32.zip | |
213 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
214 | |
215 vers.$(O): vers.c rogue.h | |
216 chase.$(O): chase.c rogue.h | |
217 command.$(O): command.c rogue.h | |
218 daemon.$(O): daemon.c rogue.h | |
219 daemons.$(O): daemons.c rogue.h | |
220 encumb.$(O): encumb.c rogue.h | |
221 fight.$(O): fight.c rogue.h | |
222 init.$(O): init.c rogue.h | |
223 io.$(O): io.c rogue.h | |
224 list.$(O): list.c rogue.h | |
225 main.$(O): main.c rogue.h | |
226 maze.$(O): maze.c rogue.h | |
227 misc.$(O): misc.c rogue.h | |
228 monsters.$(O): monsters.c rogue.h | |
229 move.$(O): move.c rogue.h | |
230 new_level.$(O): new_level.c rogue.h | |
231 options.$(O): options.c rogue.h | |
232 outside.$(O): outside.c rogue.h | |
233 pack.$(O): pack.c rogue.h | |
234 passages.$(O): passages.c rogue.h | |
235 player.$(O): player.c rogue.h | |
236 potions.$(O): potions.c rogue.h | |
237 rings.$(O): rings.c rogue.h | |
238 rip.$(O): rip.c rogue.h | |
239 rogue.$(O): rogue.c rogue.h | |
240 rooms.$(O): rooms.c rogue.h | |
241 save.$(O): save.c rogue.h | |
242 scrolls.$(O): scrolls.c rogue.h | |
243 state.$(O): state.c rogue.h | |
244 sticks.$(O): sticks.c rogue.h | |
245 things.$(O): things.c rogue.h | |
246 trader.$(O): trader.c rogue.h | |
247 util.$(O): util.c rogue.h | |
248 weapons.$(O): weapons.c rogue.h | |
249 wear.$(O): wear.c rogue.h | |
250 wizard.$(O): wizard.c rogue.h | |
251 xcrypt.$(O): xcrypt.c | |
252 |