Mercurial > hg > early-roguelike
annotate arogue5/Makefile.in @ 239:837044d2c362
Merge the GCC5 and build fix branches.
This fixes all warnings produced by GCC 5, except the ones related to
system functions. Those could be fixed by including the proper headers,
but it would be better to replace the system-dependent code with
functions from mdport.c.
author | John "Elwin" Edwards |
---|---|
date | Fri, 11 Mar 2016 19:47:52 -0500 |
parents | bac2c81fec78 |
children | 0b3d1b38998f |
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 | |
231 | 54 CC = @CC@ |
99 | 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@ | |
232
bac2c81fec78
Makefiles: don't rely on built-in implicit rules.
John "Elwin" Edwards
parents:
231
diff
changeset
|
61 .SUFFIXES: .obj .o .c |
99 | 62 |
63 .c.obj: | |
64 $(CC) $(CFLAGS) /c $*.c | |
65 | |
232
bac2c81fec78
Makefiles: don't rely on built-in implicit rules.
John "Elwin" Edwards
parents:
231
diff
changeset
|
66 .c.o: |
bac2c81fec78
Makefiles: don't rely on built-in implicit rules.
John "Elwin" Edwards
parents:
231
diff
changeset
|
67 $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c |
bac2c81fec78
Makefiles: don't rely on built-in implicit rules.
John "Elwin" Edwards
parents:
231
diff
changeset
|
68 |
99 | 69 $(PROGRAM): $(OBJS) |
70 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | |
71 | |
72 tags: $(HDRS) $(CFILES) | |
73 ctags -u $? | |
74 ed - tags < :ctfix | |
75 sort tags -o tags | |
76 | |
77 lint: | |
78 lint -hxbc $(CFILES) $(CRLIB) > linterrs | |
79 | |
80 install: $(PROGRAM) | |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
81 touch test |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
82 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
83 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
84 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
85 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
86 mkdir -p `dirname $(DESTDIR)$(LOGFILE)` ; \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
87 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
88 if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
89 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
90 mkdir -p $(DESTDIR)$(bindir) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
91 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) |
99 | 92 -if test "x$(GROUPOWNER)" != "x" ; then \ |
93 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ | |
94 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ | |
95 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
96 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ | |
97 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
98 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | |
99 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | |
100 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
101 fi |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
102 if test ! -d $(DESTDIR)$(docdir) ; \ |
99 | 103 then mkdir -p $(DESTDIR)$(docdir) ; fi |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
104 $(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
105 $(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
106 $(RM) test |
99 | 107 |
108 uninstall: | |
224
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
109 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
110 $(RM) -r $(DESTDIR)$(docdir) |
4d0f53998e8a
Makefile fixes related to installation.
John "Elwin" Edwards
parents:
222
diff
changeset
|
111 |
99 | 112 reinstall: uninstall install |
113 | |
114 clean: | |
115 $(RM) $(OBJS1) | |
116 $(RM) $(OBJS2) | |
117 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip | |
118 | |
119 count: | |
120 wc -l $(HDRS) $(CFILES) | |
121 | |
122 realcount: | |
123 cc -E $(CFILES) | ssp - | wc -l | |
124 | |
125 update: | |
126 ar uv .SAVE $(CFILES) $(HDRS) $(MISC) | |
127 | |
128 dist: | |
129 @mkdir dist | |
130 cp $(CFILES) $(HDRS) $(MISC) dist | |
131 | |
132 dist.src: | |
133 make clean | |
134 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) $(DOCS) | |
135 gzip -f $(DISTNAME)-src.tar | |
136 | |
137 dist.irix: | |
138 make clean | |
139 make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM) | |
140 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
141 gzip -f $(DISTNAME)-irix.tar | |
142 | |
143 dist.aix: | |
144 make clean | |
145 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM) | |
146 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
147 gzip -f $(DISTNAME)-aix.tar | |
148 | |
149 debug.linux: | |
150 make clean | |
151 make CFLAGS="-g -DWIZARD" $(PROGRAM) | |
152 | |
153 dist.linux: | |
154 make clean | |
155 make $(PROGRAM) | |
156 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
157 gzip -f $(DISTNAME)-linux.tar | |
158 | |
159 debug.interix: | |
160 make clean | |
161 make CFLAGS="-g3 -DWIZARD" $(PROGRAM) | |
162 | |
163 dist.interix: | |
164 make clean | |
165 make $(PROGRAM) | |
166 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
167 gzip -f $(DISTNAME)-interix.tar | |
168 | |
169 debug.cygwin: | |
170 make clean | |
171 make CFLAGS="-g3 -DWIZARD" $(PROGRAM) | |
172 | |
173 dist.cygwin: | |
174 make clean | |
175 make CRLIB="-static -lcurses" $(PROGRAM) | |
176 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
177 gzip -f $(DISTNAME)-cygwin.tar | |
178 | |
179 # | |
180 # Use MINGW32-MAKE to build this target | |
181 # | |
182 dist.mingw32: | |
183 @$(MAKE) --no-print-directory RM="cmd /c del" clean | |
184 @$(MAKE) --no-print-directory CRLIB="-lpdcurses" $(PROGRAM) | |
185 cmd /c del $(DISTNAME)-mingw32.zip | |
186 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
187 | |
188 dist.msys: | |
189 @$(MAKE) --no-print-directory clean | |
190 @$(MAKE) --no-print-directory CRLIB="-lcurses" $(PROGRAM) | |
191 tar cf $(DISTNAME)-msys.tar $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
192 gzip -f $(DISTNAME)-msys.tar | |
193 | |
194 debug.djgpp: | |
195 make clean | |
196 make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM) | |
197 | |
198 dist.djgpp: | |
199 make clean | |
200 make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM) | |
201 rm -f $(DISTNAME)-djgpp.zip | |
202 zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
203 | |
204 # | |
205 # Use NMAKE to build this target | |
206 # | |
207 | |
208 debug.win32: | |
209 nmake O="obj" RM="-del" clean | |
210 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-DWIZARD -nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM) | |
211 | |
212 dist.win32: | |
213 nmake O="obj" RM="-del" clean | |
214 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM) | |
215 -del $(DISTNAME)-win32.zip | |
216 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
217 | |
218 vers.$(O): vers.c rogue.h | |
219 chase.$(O): chase.c rogue.h | |
220 command.$(O): command.c rogue.h | |
221 daemon.$(O): daemon.c rogue.h | |
222 daemons.$(O): daemons.c rogue.h | |
223 encumb.$(O): encumb.c rogue.h | |
224 fight.$(O): fight.c rogue.h | |
225 init.$(O): init.c rogue.h | |
226 io.$(O): io.c rogue.h | |
227 list.$(O): list.c rogue.h | |
228 main.$(O): main.c rogue.h | |
229 maze.$(O): maze.c rogue.h | |
230 misc.$(O): misc.c rogue.h | |
231 monsters.$(O): monsters.c rogue.h | |
232 move.$(O): move.c rogue.h | |
233 new_level.$(O): new_level.c rogue.h | |
234 options.$(O): options.c rogue.h | |
235 outside.$(O): outside.c rogue.h | |
236 pack.$(O): pack.c rogue.h | |
237 passages.$(O): passages.c rogue.h | |
238 player.$(O): player.c rogue.h | |
239 potions.$(O): potions.c rogue.h | |
240 rings.$(O): rings.c rogue.h | |
241 rip.$(O): rip.c rogue.h | |
242 rogue.$(O): rogue.c rogue.h | |
243 rooms.$(O): rooms.c rogue.h | |
244 save.$(O): save.c rogue.h | |
245 scrolls.$(O): scrolls.c rogue.h | |
246 state.$(O): state.c rogue.h | |
247 sticks.$(O): sticks.c rogue.h | |
248 things.$(O): things.c rogue.h | |
249 trader.$(O): trader.c rogue.h | |
250 util.$(O): util.c rogue.h | |
251 weapons.$(O): weapons.c rogue.h | |
252 wear.$(O): wear.c rogue.h | |
253 wizard.$(O): wizard.c rogue.h | |
254 xcrypt.$(O): xcrypt.c | |
255 |