comparison arogue5/Makefile.in @ 99:dfeed24bb616

arogue5: port to autoconf. 'configure' and 'make install' now work. There may be problems with hard-to-test features like MAXLOAD.
author John "Elwin" Edwards
date Sat, 31 Aug 2013 09:18:07 -0700
parents
children fbc75509f4cd
comparison
equal deleted inserted replaced
98:ea71ef31d9be 99:dfeed24bb616
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
33 HDRS = rogue.h mach_dep.h network.h
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@
56 CFLAGS= -g
57 CRLIB = -lcurses
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)
78 -touch test
79 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \
80 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
81 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
82 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
83 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
84 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi
85 -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
86 -if test "x$(GROUPOWNER)" != "x" ; then \
87 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \
88 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \
89 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \
90 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \
91 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \
92 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \
93 chmod 0464 $(DESTDIR)$(LOGFILE) ; \
94 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \
95 fi
96 -if test ! -d $(DESTDIR)$(docdir) ; \
97 then mkdir -p $(DESTDIR)$(docdir) ; fi
98 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
99 -$(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir)
100 -$(RM) test
101
102 uninstall:
103 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
104 -$(RM) -r $(DESTDIR)$(docdir)
105
106 reinstall: uninstall install
107
108 clean:
109 $(RM) $(OBJS1)
110 $(RM) $(OBJS2)
111 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip
112
113 count:
114 wc -l $(HDRS) $(CFILES)
115
116 realcount:
117 cc -E $(CFILES) | ssp - | wc -l
118
119 update:
120 ar uv .SAVE $(CFILES) $(HDRS) $(MISC)
121
122 dist:
123 @mkdir dist
124 cp $(CFILES) $(HDRS) $(MISC) dist
125
126 dist.src:
127 make clean
128 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) $(DOCS)
129 gzip -f $(DISTNAME)-src.tar
130
131 dist.irix:
132 make clean
133 make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM)
134 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
135 gzip -f $(DISTNAME)-irix.tar
136
137 dist.aix:
138 make clean
139 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM)
140 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
141 gzip -f $(DISTNAME)-aix.tar
142
143 debug.linux:
144 make clean
145 make CFLAGS="-g -DWIZARD" $(PROGRAM)
146
147 dist.linux:
148 make clean
149 make $(PROGRAM)
150 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS)
151 gzip -f $(DISTNAME)-linux.tar
152
153 debug.interix:
154 make clean
155 make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
156
157 dist.interix:
158 make clean
159 make $(PROGRAM)
160 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
161 gzip -f $(DISTNAME)-interix.tar
162
163 debug.cygwin:
164 make clean
165 make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
166
167 dist.cygwin:
168 make clean
169 make CRLIB="-static -lcurses" $(PROGRAM)
170 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS)
171 gzip -f $(DISTNAME)-cygwin.tar
172
173 #
174 # Use MINGW32-MAKE to build this target
175 #
176 dist.mingw32:
177 @$(MAKE) --no-print-directory RM="cmd /c del" clean
178 @$(MAKE) --no-print-directory CRLIB="-lpdcurses" $(PROGRAM)
179 cmd /c del $(DISTNAME)-mingw32.zip
180 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
181
182 dist.msys:
183 @$(MAKE) --no-print-directory clean
184 @$(MAKE) --no-print-directory CRLIB="-lcurses" $(PROGRAM)
185 tar cf $(DISTNAME)-msys.tar $(PROGRAM).exe LICENSE.TXT $(DOCS)
186 gzip -f $(DISTNAME)-msys.tar
187
188 debug.djgpp:
189 make clean
190 make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
191
192 dist.djgpp:
193 make clean
194 make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
195 rm -f $(DISTNAME)-djgpp.zip
196 zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
197
198 #
199 # Use NMAKE to build this target
200 #
201
202 debug.win32:
203 nmake O="obj" RM="-del" clean
204 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-DWIZARD -nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM)
205
206 dist.win32:
207 nmake O="obj" RM="-del" clean
208 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM)
209 -del $(DISTNAME)-win32.zip
210 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
211
212 vers.$(O): vers.c rogue.h
213 chase.$(O): chase.c rogue.h
214 command.$(O): command.c rogue.h
215 daemon.$(O): daemon.c rogue.h
216 daemons.$(O): daemons.c rogue.h
217 encumb.$(O): encumb.c rogue.h
218 fight.$(O): fight.c rogue.h
219 init.$(O): init.c rogue.h
220 io.$(O): io.c rogue.h
221 list.$(O): list.c rogue.h
222 main.$(O): main.c rogue.h
223 maze.$(O): maze.c rogue.h
224 misc.$(O): misc.c rogue.h
225 monsters.$(O): monsters.c rogue.h
226 move.$(O): move.c rogue.h
227 new_level.$(O): new_level.c rogue.h
228 options.$(O): options.c rogue.h
229 outside.$(O): outside.c rogue.h
230 pack.$(O): pack.c rogue.h
231 passages.$(O): passages.c rogue.h
232 player.$(O): player.c rogue.h
233 potions.$(O): potions.c rogue.h
234 rings.$(O): rings.c rogue.h
235 rip.$(O): rip.c rogue.h
236 rogue.$(O): rogue.c rogue.h
237 rooms.$(O): rooms.c rogue.h
238 save.$(O): save.c rogue.h
239 scrolls.$(O): scrolls.c rogue.h
240 state.$(O): state.c rogue.h
241 sticks.$(O): sticks.c rogue.h
242 things.$(O): things.c rogue.h
243 trader.$(O): trader.c rogue.h
244 util.$(O): util.c rogue.h
245 weapons.$(O): weapons.c rogue.h
246 wear.$(O): wear.c rogue.h
247 wizard.$(O): wizard.c rogue.h
248 xcrypt.$(O): xcrypt.c
249