comparison arogue5/Makefile @ 63:0ed67132cf10

Import Advanced Rogue 5.8 from the Roguelike Restoration Project (r1490)
author elwin
date Thu, 09 Aug 2012 22:58:48 +0000
parents
children b27bd9f8c7d0
comparison
equal deleted inserted replaced
62:0ef99244acb8 63:0ed67132cf10
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=arogue5.8.2
16 PROGRAM=arogue58
17
18 O=o
19
20 HDRS = rogue.h mach_dep.h network.h
21 OBJS1 = chase.$(O) command.$(O) daemon.$(O) daemons.$(O) encumb.$(O) \
22 fight.$(O) init.$(O) io.$(O) list.$(O) main.$(O) maze.$(O) mdport.$(O)\
23 misc.$(O) monsters.$(O) move.$(O) new_level.$(O) options.$(O) \
24 outside.$(O)
25 OBJS2 = pack.$(O) passages.$(O) player.$(O) potions.$(O) rings.$(O) rip.$(O) \
26 rogue.$(O) rooms.$(O) save.$(O) scrolls.$(O) state.$(O) sticks.$(O) \
27 things.$(O) trader.$(O) util.$(O) vers.$(O) weapons.$(O) wear.$(O) \
28 wizard.$(O) xcrypt.$(O)
29 OBJS = $(OBJS1) $(OBJS2)
30 CFILES= \
31 vers.c chase.c command.c daemon.c daemons.c encumb.c \
32 fight.c init.c io.c list.c main.c maze.c mdport.c misc.c monsters.c \
33 move.c new_level.c options.c outside.c pack.c passages.c player.c \
34 potions.c rings.c rip.c rogue.c \
35 rooms.c save.c scrolls.c state.c sticks.c things.c trader.c util.c \
36 weapons.c wear.c wizard.c xcrypt.c
37
38 MISC= Makefile LICENSE.TXT arogue58.sln arogue58.vcproj
39 DOCS= arogue58.doc arogue58.html
40
41 CC = gcc
42 CFLAGS= -g
43 CRLIB = -lcurses
44 RM = rm -f
45 TAR = tar
46 .SUFFIXES: .obj
47
48 .c.obj:
49 $(CC) $(CFLAGS) /c $*.c
50
51 $(PROGRAM): $(OBJS)
52 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
53
54 tags: $(HDRS) $(CFILES)
55 ctags -u $?
56 ed - tags < :ctfix
57 sort tags -o tags
58
59 lint:
60 lint -hxbc $(CFILES) $(CRLIB) > linterrs
61
62 clean:
63 $(RM) $(OBJS1)
64 $(RM) $(OBJS2)
65 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip
66
67 count:
68 wc -l $(HDRS) $(CFILES)
69
70 realcount:
71 cc -E $(CFILES) | ssp - | wc -l
72
73 update:
74 ar uv .SAVE $(CFILES) $(HDRS) $(MISC)
75
76 dist:
77 @mkdir dist
78 cp $(CFILES) $(HDRS) $(MISC) dist
79
80 dist.src:
81 make clean
82 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) $(DOCS)
83 gzip -f $(DISTNAME)-src.tar
84
85 dist.irix:
86 make clean
87 make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM)
88 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
89 gzip -f $(DISTNAME)-irix.tar
90
91 dist.aix:
92 make clean
93 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM)
94 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
95 gzip -f $(DISTNAME)-aix.tar
96
97 debug.linux:
98 make clean
99 make CFLAGS="-g -DWIZARD" $(PROGRAM)
100
101 dist.linux:
102 make clean
103 make $(PROGRAM)
104 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS)
105 gzip -f $(DISTNAME)-linux.tar
106
107 debug.interix:
108 make clean
109 make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
110
111 dist.interix:
112 make clean
113 make $(PROGRAM)
114 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
115 gzip -f $(DISTNAME)-interix.tar
116
117 debug.cygwin:
118 make clean
119 make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
120
121 dist.cygwin:
122 make clean
123 make CRLIB="-static -lcurses" $(PROGRAM)
124 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS)
125 gzip -f $(DISTNAME)-cygwin.tar
126
127 #
128 # Use MINGW32-MAKE to build this target
129 #
130 dist.mingw32:
131 @$(MAKE) --no-print-directory RM="cmd /c del" clean
132 @$(MAKE) --no-print-directory CRLIB="-lpdcurses" $(PROGRAM)
133 cmd /c del $(DISTNAME)-mingw32.zip
134 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
135
136 dist.msys:
137 @$(MAKE) --no-print-directory clean
138 @$(MAKE) --no-print-directory CRLIB="-lcurses" $(PROGRAM)
139 tar cf $(DISTNAME)-msys.tar $(PROGRAM).exe LICENSE.TXT $(DOCS)
140 gzip -f $(DISTNAME)-msys.tar
141
142 debug.djgpp:
143 make clean
144 make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
145
146 dist.djgpp:
147 make clean
148 make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
149 rm -f $(DISTNAME)-djgpp.zip
150 zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
151
152 #
153 # Use NMAKE to build this target
154 #
155
156 debug.win32:
157 nmake O="obj" RM="-del" clean
158 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-DWIZARD -nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM)
159
160 dist.win32:
161 nmake O="obj" RM="-del" clean
162 nmake O="obj" CC="CL" CRLIB="..\pdcurses\pdcurses.lib shfolder.lib user32.lib Advapi32.lib" CFLAGS="-nologo -I..\pdcurses -Ox -wd4033 -wd4716" $(PROGRAM)
163 -del $(DISTNAME)-win32.zip
164 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
165
166 vers.$(O): vers.c rogue.h
167 chase.$(O): chase.c rogue.h
168 command.$(O): command.c rogue.h
169 daemon.$(O): daemon.c rogue.h
170 daemons.$(O): daemons.c rogue.h
171 encumb.$(O): encumb.c rogue.h
172 fight.$(O): fight.c rogue.h
173 init.$(O): init.c rogue.h
174 io.$(O): io.c rogue.h
175 list.$(O): list.c rogue.h
176 main.$(O): main.c rogue.h
177 maze.$(O): maze.c rogue.h
178 misc.$(O): misc.c rogue.h
179 monsters.$(O): monsters.c rogue.h
180 move.$(O): move.c rogue.h
181 new_level.$(O): new_level.c rogue.h
182 options.$(O): options.c rogue.h
183 outside.$(O): outside.c rogue.h
184 pack.$(O): pack.c rogue.h
185 passages.$(O): passages.c rogue.h
186 player.$(O): player.c rogue.h
187 potions.$(O): potions.c rogue.h
188 rings.$(O): rings.c rogue.h
189 rip.$(O): rip.c rogue.h
190 rogue.$(O): rogue.c rogue.h
191 rooms.$(O): rooms.c rogue.h
192 save.$(O): save.c rogue.h
193 scrolls.$(O): scrolls.c rogue.h
194 state.$(O): state.c rogue.h
195 sticks.$(O): sticks.c rogue.h
196 things.$(O): things.c rogue.h
197 trader.$(O): trader.c rogue.h
198 util.$(O): util.c rogue.h
199 weapons.$(O): weapons.c rogue.h
200 wear.$(O): wear.c rogue.h
201 wizard.$(O): wizard.c rogue.h
202 xcrypt.$(O): xcrypt.c
203