Mercurial > hg > early-roguelike
comparison rogue3/Makefile.in @ 88:07c4d4883ef2
rogue3: begin porting to autoconf.
Rogue V3 can now be built with './configure && make'. This is
preliminary: 'make install' does not work yet.
author | John "Elwin" Edwards |
---|---|
date | Sat, 24 Aug 2013 13:36:13 -0700 |
parents | rogue3/Makefile@bbf072f8bafa |
children | e5ddbaf324d4 |
comparison
equal
deleted
inserted
replaced
87:f871cb0539d3 | 88:07c4d4883ef2 |
---|---|
1 # | |
2 # Makefile for rogue | |
3 # %W% (Berkeley) %G% | |
4 # | |
5 # Rogue: Exploring the Dungeons of Doom | |
6 # Copyright (C) 1980, 1981 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=rogue3.6.4 | |
13 PROGRAM=@PROGRAM@ | |
14 | |
15 O=o | |
16 | |
17 HDRS= rogue.h machdep.h | |
18 | |
19 OBJS1 = vers.$(O) armor.$(O) chase.$(O) command.$(O) daemon.$(O) daemons.$(O) \ | |
20 fight.$(O) init.$(O) io.$(O) list.$(O) main.$(O) mdport.$(O) \ | |
21 misc.$(O) monsters.$(O) move.$(O) newlevel.$(O) options.$(O) | |
22 OBJS2 = pack.$(O) passages.$(O) potions.$(O) rings.$(O) rip.$(O) rooms.$(O) \ | |
23 save.$(O) scrolls.$(O) state.$(O) sticks.$(O) things.$(O) \ | |
24 weapons.$(O) wizard.$(O) xcrypt.$(O) | |
25 OBJS = $(OBJS1) $(OBJS2) | |
26 | |
27 CFILES= vers.c armor.c chase.c command.c daemon.c daemons.c fight.c \ | |
28 init.c io.c list.c main.c mdport.c misc.c monsters.c move.c newlevel.c \ | |
29 options.c pack.c passages.c potions.c rings.c rip.c rooms.c \ | |
30 save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c xcrypt.c | |
31 | |
32 | |
33 MISC_C= | |
34 DOCSRC= rogue.6 rogue.r | |
35 DOCS = $(PROGRAM).doc $(PROGRAM).cat $(PROGRAM).html readme36.html | |
36 MISC = Makefile $(MISC_C) LICENSE.TXT $(PROGRAM).sln $(PROGRAM).vcproj $(DOCS)\ | |
37 $(DOCSRC) | |
38 | |
39 CC = gcc | |
40 CPPFLAGS =@DEFS@ | |
41 ROPTS = | |
42 COPTS = -O3 | |
43 CFLAGS= $(COPTS) $(ROPTS) | |
44 LIBS = -lcurses | |
45 RM = rm -f | |
46 LD = $(CC) | |
47 LDOUT = -o | |
48 | |
49 .SUFFIXES: .obj | |
50 | |
51 .c.obj: | |
52 $(CC) $(CFLAGS) /c $*.c | |
53 | |
54 $(PROGRAM)$(EXE): $(HDRS) $(OBJS) | |
55 $(LD) $(LDFLAGS) $(OBJS) $(LIBS) $(LDOUT)$@ | |
56 | |
57 clean: | |
58 $(RM) $(OBJS1) | |
59 $(RM) $(OBJS2) | |
60 $(RM) core $(PROGRAM) $(PROGRAM).exe $(DISTNAME).tar $(DISTNAME).tar.gz | |
61 $(RM) $(DISTNAME).zip | |
62 | |
63 dist.src: | |
64 make clean | |
65 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) $(DOCS) | |
66 gzip -f $(DISTNAME)-src.tar | |
67 | |
68 dist.irix: | |
69 @$(MAKE) clean | |
70 @$(MAKE) CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM) | |
71 # tbl rogue.r | nroff -ms | colcrt - > $(PROGRAM).doc | |
72 # nroff -man rogue.6 | colcrt - > $(PROGRAM).cat | |
73 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
74 gzip -f $(DISTNAME)-irix.tar | |
75 | |
76 dist.aix: | |
77 @$(MAKE) clean | |
78 @$(MAKE) CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM) | |
79 # tbl rogue.r | nroff -ms | colcrt - > $(ROGUE).doc | |
80 # nroff -man rogue.6 | colcrt - > $(ROGUE).cat | |
81 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
82 gzip -f $(DISTNAME)-aix.tar | |
83 | |
84 dist.linux: | |
85 @$(MAKE) clean | |
86 @$(MAKE) $(PROGRAM) | |
87 # groff -P-c -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc | |
88 # groff -man rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat | |
89 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
90 gzip -f $(DISTNAME)-linux.tar | |
91 | |
92 debug.linux: | |
93 @$(MAKE) clean | |
94 @$(MAKE) COPTS="-g" $(PROGRAM) | |
95 # groff -P-c -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc | |
96 # groff -man rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat | |
97 | |
98 dist.interix: | |
99 @$(MAKE) clean | |
100 @$(MAKE) COPTS="-ansi" $(PROGRAM) | |
101 # groff -P-b -P-u -t -ms -Tascii rogue.r > $(PROGRAM).doc | |
102 # groff -P-b -P-u -man -Tascii rogue.6 > $(PROGRAM).cat | |
103 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS) | |
104 gzip -f $(DISTNAME)-interix.tar | |
105 | |
106 dist.cygwin: | |
107 @$(MAKE) --no-print-directory clean | |
108 @$(MAKE) COPTS="-I/usr/include/ncurses" --no-print-directory $(PROGRAM) | |
109 # groff -P-c -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc | |
110 # groff -P-c -man -Tascii rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat | |
111 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
112 gzip -f $(DISTNAME)-cygwin.tar | |
113 | |
114 # | |
115 # Use MINGW32-MAKE to build this target | |
116 # | |
117 dist.mingw32: | |
118 @$(MAKE) --no-print-directory RM="cmd /c del" clean | |
119 @$(MAKE) --no-print-directory COPTS="-I../pdcurses" LIBS="../pdcurses/pdcurses.a" $(PROGRAM) | |
120 cmd /c del $(DISTNAME)-mingw32.zip | |
121 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) | |
122 | |
123 # | |
124 # Seperate doc targets for DJGPP prevent strange SIGSEGV in groff | |
125 # in that environment. | |
126 # | |
127 doc.djgpp: | |
128 groff -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc | |
129 | |
130 cat.djgpp: | |
131 groff -man -Tascii rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat | |
132 | |
133 dist.djgpp: | |
134 @$(MAKE) --no-print-directory clean | |
135 @$(MAKE) --no-print-directory LDFLAGS="-L$(DJDIR)/LIB" \ | |
136 LIBS="-lpdcur" $(PROGRAM) | |
137 # @$(MAKE) --no-print-directory doc.djgpp | |
138 # @$(MAKE) --no-print-directory cat.djgpp | |
139 rm -f $(DISTNAME)-djgpp.zip | |
140 zip $(DISTNAME)-djgpp.zip $(PROGRAM) LICENSE.TXT $(DOCS) | |
141 | |
142 # | |
143 # Use NMAKE to build this target | |
144 # | |
145 dist.win32: | |
146 @$(MAKE) /NOLOGO O="obj" RM="-del" clean | |
147 @$(MAKE) /NOLOGO O="obj" CC="@CL" LD="link" LDOUT="/OUT:" EXE=".exe"\ | |
148 LIBS="/NODEFAULTLIB:LIBC ..\pdcurses\pdcurses.lib shell32.lib user32.lib Advapi32.lib" \ | |
149 COPTS="-nologo -D_CRT_SECURE_NO_DEPRECATE -I..\pdcurses \ | |
150 -Ox -wd4033 -wd4716" $(PROGRAM).exe | |
151 -del $(DISTNAME)-win32.zip | |
152 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS) |