comparison rogue4/Makefile.in @ 51:a1dc75e38e73

rogue4: ported to autoconf.
author elwin
date Tue, 11 Oct 2011 15:20:40 +0000
parents
children 8f7c082fde46
comparison
equal deleted inserted replaced
50:c9382913d6df 51:a1dc75e38e73
1 #
2 # Makefile for rogue
3 # @(#)Makefile 4.13 (Berkeley) 1/23/82
4 #
5 # Rogue: Exploring the Dungeons of Doom
6 # Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman
7 # All rights reserved.
8 #
9 # See the file LICENSE.TXT for full copyright and licensing information.
10 #
11
12 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@
13 PACKAGE_TARNAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
14 PROGRAM=@PROGRAM@
15
16 CC = @CC@
17 LIBS = @LIBS@
18
19 #SCOREFILE=\"/usr/local/games/roguelike/rogue4.scr\"
20 SCOREFILE=@SCOREFILE@
21 #LOGFILE=\"/usr/local/games/roguelike/rogue4.log\"
22 LOGFILE=@LOGFILE@
23 #SAVEDIR=\"/usr/local/games/roguelike/rogue4save/\"
24 SAVEDIR=@SAVEDIR@
25 #LOCKFILE=\"/usr/local/games/roguelike/rogue4save/rogue4.lck\"
26 LOCKFILE=@LOCKFILE@
27 #GROUPOWNER=games
28 GROUPOWNER=@GROUPOWNER@
29
30 DESTDIR=@DESTDIR@
31 prefix=@prefix@
32 exec_prefix=@exec_prefix@
33 datarootdir=@datarootdir@
34 bindir=@bindir@
35 mandir=@mandir@
36 man6dir=$(mandir)/man6
37 docdir=@docdir@
38
39 HDRS= rogue.h extern.h
40 DOBJS= vers.o extern.o armor.o chase.o command.o daemon.o daemons.o \
41 fight.o init.o io.o list.o main.o misc.o monsters.o move.o \
42 new_level.o options.o pack.o passages.o potions.o rings.o rip.o \
43 rooms.o save.o scrolls.o state.o sticks.o things.o weapons.o wizard.o\
44 xcrypt.o mdport.o
45 OBJS= $(DOBJS) mach_dep.o
46 CFILES= vers.c extern.c armor.c chase.c command.c daemon.c daemons.c \
47 fight.c init.c io.c list.c main.c misc.c monsters.c move.c \
48 new_level.c options.c pack.c passages.c potions.c rings.c rip.c \
49 rooms.c save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c \
50 mach_dep.c xcrypt.c mdport.c
51 MISC= Makefile LICENSE.TXT rogue.6 rogue.me
52
53 CFLAGS= -O3
54 CRLIB = -lcurses
55 RM = rm -f
56 TAR = tar
57 TOUCH=touch
58 MKDIR=mkdir
59 CHGRP=chgrp
60 CHMOD=chmod
61 INSTALL=@INSTALL@
62
63 SF=
64 NAMELIST=
65 NL=
66 #MACHDEP= -DMAXLOAD=40 -DLOADAV -DCHECKTIME=4
67 MACHDEP=
68
69 .c.o:
70 @echo $(CC) -c $(CFLAGS) $*.c
71 @$(CC) -c $(CFLAGS) $*.c -o $*.o
72 # @cpp -P $(CFLAGS) $*.c | ./xstr -v -c -
73 # @cc -c $(CFLAGS) x.c
74 # @mv x.o $*.o
75
76 @PROGRAM@: $(HDRS) $(OBJS) # xs.o
77 # @rm -f x.c
78 # $(CC) $(LDFLAGS) xs.o $(OBJS) $(CRLIB)
79 $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
80
81 main.o: main.c $(HDRS)
82 $(CC) -c $(CFLAGS) -o $@ main.c
83
84 vers.o:
85 $(CC) -c $(CFLAGS) vers.c
86
87 mach_dep.o: mach_dep.c
88 $(CC) -c $(CFLAGS) $(SF) $(NL) $(MACHDEP) mach_dep.c
89
90 xs.o: strings
91 ./xstr
92 $(CC) -c $(CFLAGS) xs.c
93
94 xstr: xstr.c
95 $(CC) -s -O -o xstr xstr.c
96
97 findpw: findpw.c xcrypt.c
98 $(CC) -s -o findpw findpw.c xcrypt.c
99
100 prob: prob.o extern.o xs.o
101 $(CC) -O -o prob prob.o extern.o xs.o
102
103 prob.o: prob.c rogue.h
104 $(CC) -O -c prob.c
105
106 clean:
107 rm -f $(POBJS) $(OBJS) core a.out p.out @PROGRAM@ strings make.out rogue.tar vgrind.* x.c x.o xs.c xs.o linterrs findpw distmod.o xs.po xstr rogue rogue.exe rogue.tar.gz rogue.cat rogue.doc xstr.exe
108
109 maintainer-clean:
110 make clean
111 $(RM) Makefile config.h
112 $(RM) config.status config.log
113 $(RM) $(PROGRAM).scr $(PROGRAM).log $(PROGRAM).lck
114 $(RM) rogue.6 rogue.me
115
116 install: $(PROGRAM)
117 -$(TOUCH) test
118 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \
119 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
120 -if test "x$(LOGFILE)" != "x" -a ! -f $(DESTDIR)$(LOGFILE) ; then \
121 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
122 -if test "x$(SAVEDIR)" != "x" -a ! -d $(DESTDIR)$(SAVEDIR) ; then \
123 $(MKDIR) -p $(DESTDIR)$(SAVEDIR) ; fi
124 -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
125 -if test "x$(GROUPOWNER)" != "x" ; then \
126 $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \
127 $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \
128 $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \
129 $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \
130 $(CHMOD) 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \
131 $(CHMOD) 0464 $(DESTDIR)$(SCOREFILE) ; \
132 $(CHMOD) 0464 $(DESTDIR)$(LOGFILE) ; \
133 $(CHMOD) 0775 $(DESTDIR)$(SAVEDIR) ; \
134 fi
135 -if test -d $(DESTDIR)$(man6dir) ; \
136 then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi
137 -if test ! -d $(DESTDIR)$(man6dir) ; \
138 then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi
139 -if test ! -d $(DESTDIR)$(docdir) ; \
140 then $(MKDIR) -p $(DESTDIR)$(docdir) ; fi
141 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
142 -$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me
143 -if test "x$(LOCKFILE)" != "x" -a ! -f $(DESTDIR)$(LOCKFILE) ; then \
144 $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \
145 $(RM) $(DESTDIR)$(LOCKFILE) ; \
146 fi
147 -$(RM) test
148
149 uninstall:
150 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
151 -$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6
152 -$(RM) $(DESTDIR)$(docdir)$(PROGRAM)/$(PROGRAM).doc
153 -$(RM) $(DESTDIR)$(LOCKFILE)
154 -$(RMDIR) $(DESTDIR)$(docdir)$(PROGRAM)
155
156 reinstall: uninstall install
157
158 dist.src:
159 make clean
160 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC)
161 gzip -f $(DISTNAME)-src.tar
162
163 debug.irix:
164 make clean
165 make CC=cc CFLAGS="-woff 1116 -g -DWIZARD" rogue
166 dist.irix:
167 make clean
168 make CC=cc CFLAGS="-woff 1116 -O3" rogue
169 tbl rogue.me | nroff -me | colcrt - > rogue.doc
170 nroff -man rogue.6 | colcrt - > rogue.cat
171 tar cf $(DISTNAME)-irix.tar rogue LICENSE.TXT rogue.cat rogue.doc
172 gzip -f $(DISTNAME)-irix.tar
173
174 debug.aix:
175 make clean
176 make CC=xlc CFLAGS="-qmaxmem=16768 -g -qstrict -DWIZARD" rogue
177 dist.aix:
178 make clean
179 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" rogue
180 tbl rogue.me | nroff -me | colcrt - > rogue.doc
181 nroff -man rogue.6 | colcrt - > rogue.cat
182 tar cf $(DISTNAME)-aix.tar rogue LICENSE.TXT rogue.cat rogue.doc
183 gzip -f $(DISTNAME)-aix.tar
184
185 debug.linux:
186 make clean
187 make CFLAGS="-g3 -DWIZARD" rogue
188 dist.linux:
189 make clean
190 make rogue
191 groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc
192 groff -man rogue.6 | sed -e 's/.\x08//g' > rogue.cat
193 tar cf $(DISTNAME)-linux.tar rogue LICENSE.TXT rogue.cat rogue.doc
194 gzip -f $(DISTNAME)-linux.tar
195
196 debug.interix:
197 make clean
198 make CFLAGS="-g3 -DWIZARD" rogue
199 dist.interix:
200 make clean
201 make rogue
202 groff -P-b -P-u -t -me -Tascii rogue.me > rogue.doc
203 groff -P-b -P-u -man -Tascii rogue.6 > rogue.cat
204 tar cf $(DISTNAME)-interix.tar rogue LICENSE.TXT rogue.cat rogue.doc
205 gzip -f $(DISTNAME)-interix.tar
206
207 debug.cygwin:
208 make clean
209 make CFLAGS="-g3 -DWIZARD" rogue
210 dist.cygwin:
211 make clean
212 make rogue
213 groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc
214 groff -P-c -man -Tascii rogue.6 | sed -e 's/.\x08//g' > rogue.cat
215 tar cf $(DISTNAME)-cygwin.tar rogue.exe LICENSE.TXT rogue.cat rogue.doc
216 gzip -f $(DISTNAME)-cygwin.tar
217
218 debug.djgpp:
219 make clean
220 make CFLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" rogue
221 dist.djgpp:
222 make clean
223 make CFLAGS="-O3" LDFLAGS="-L$(DJDIR)/LIB" rogue
224 groff -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc
225 groff -man -Tascii rogue.6 | sed -e 's/.\x08//g' > rogue.cat
226 rm -f $(DISTNAME)-djgpp.zip
227 zip $(DISTNAME)-djgpp.zip rogue.exe LICENSE.TXT rogue.cat rogue.doc