comparison rogue3/Makefile @ 0:527e2150eaf0

Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
author edwarj4
date Tue, 13 Oct 2009 13:33:34 +0000
parents
children b4856d4d4c4e
comparison
equal deleted inserted replaced
-1:000000000000 0:527e2150eaf0
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=rogue
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 ROPTS =
41 COPTS = -O3
42 CFLAGS= $(COPTS) $(ROPTS) -DSCOREFILE=\"rogue36.scr\"
43 LIBS = -lcurses
44 RM = rm -f
45 LD = $(CC)
46 LDOUT = -o
47
48 .SUFFIXES: .obj
49
50 .c.obj:
51 $(CC) $(CFLAGS) /c $*.c
52
53 $(PROGRAM)$(EXE): $(HDRS) $(OBJS)
54 $(LD) $(LDFLAGS) $(OBJS) $(LIBS) $(LDOUT)$@
55
56 clean:
57 $(RM) $(OBJS1)
58 $(RM) $(OBJS2)
59 $(RM) core $(PROGRAM) $(PROGRAM).exe $(DISTNAME).tar $(DISTNAME).tar.gz
60 $(RM) $(DISTNAME).zip
61
62 dist.src:
63 make clean
64 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) $(DOCS)
65 gzip -f $(DISTNAME)-src.tar
66
67 dist.irix:
68 @$(MAKE) clean
69 @$(MAKE) CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM)
70 # tbl rogue.r | nroff -ms | colcrt - > $(PROGRAM).doc
71 # nroff -man rogue.6 | colcrt - > $(PROGRAM).cat
72 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
73 gzip -f $(DISTNAME)-irix.tar
74
75 dist.aix:
76 @$(MAKE) clean
77 @$(MAKE) CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM)
78 # tbl rogue.r | nroff -ms | colcrt - > $(ROGUE).doc
79 # nroff -man rogue.6 | colcrt - > $(ROGUE).cat
80 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
81 gzip -f $(DISTNAME)-aix.tar
82
83 dist.linux:
84 @$(MAKE) clean
85 @$(MAKE) $(PROGRAM)
86 # groff -P-c -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc
87 # groff -man rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat
88 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS)
89 gzip -f $(DISTNAME)-linux.tar
90
91 debug.linux:
92 @$(MAKE) clean
93 @$(MAKE) COPTS="-g" $(PROGRAM)
94 # groff -P-c -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc
95 # groff -man rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat
96
97 dist.interix:
98 @$(MAKE) clean
99 @$(MAKE) COPTS="-ansi" $(PROGRAM)
100 # groff -P-b -P-u -t -ms -Tascii rogue.r > $(PROGRAM).doc
101 # groff -P-b -P-u -man -Tascii rogue.6 > $(PROGRAM).cat
102 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
103 gzip -f $(DISTNAME)-interix.tar
104
105 dist.cygwin:
106 @$(MAKE) --no-print-directory clean
107 @$(MAKE) COPTS="-I/usr/include/ncurses" --no-print-directory $(PROGRAM)
108 # groff -P-c -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc
109 # groff -P-c -man -Tascii rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat
110 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS)
111 gzip -f $(DISTNAME)-cygwin.tar
112
113 #
114 # Use MINGW32-MAKE to build this target
115 #
116 dist.mingw32:
117 @$(MAKE) --no-print-directory RM="cmd /c del" clean
118 @$(MAKE) --no-print-directory COPTS="-I../pdcurses" LIBS="../pdcurses/pdcurses.a" $(PROGRAM)
119 cmd /c del $(DISTNAME)-mingw32.zip
120 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
121
122 #
123 # Seperate doc targets for DJGPP prevent strange SIGSEGV in groff
124 # in that environment.
125 #
126 doc.djgpp:
127 groff -t -ms -Tascii rogue.r | sed -e 's/.\x08//g' > $(PROGRAM).doc
128
129 cat.djgpp:
130 groff -man -Tascii rogue.6 | sed -e 's/.\x08//g' > $(PROGRAM).cat
131
132 dist.djgpp:
133 @$(MAKE) --no-print-directory clean
134 @$(MAKE) --no-print-directory LDFLAGS="-L$(DJDIR)/LIB" \
135 LIBS="-lpdcur" $(PROGRAM)
136 # @$(MAKE) --no-print-directory doc.djgpp
137 # @$(MAKE) --no-print-directory cat.djgpp
138 rm -f $(DISTNAME)-djgpp.zip
139 zip $(DISTNAME)-djgpp.zip $(PROGRAM) LICENSE.TXT $(DOCS)
140
141 #
142 # Use NMAKE to build this target
143 #
144 dist.win32:
145 @$(MAKE) /NOLOGO O="obj" RM="-del" clean
146 @$(MAKE) /NOLOGO O="obj" CC="@CL" LD="link" LDOUT="/OUT:" EXE=".exe"\
147 LIBS="/NODEFAULTLIB:LIBC ..\pdcurses\pdcurses.lib shell32.lib user32.lib Advapi32.lib" \
148 COPTS="-nologo -D_CRT_SECURE_NO_DEPRECATE -I..\pdcurses \
149 -Ox -wd4033 -wd4716" $(PROGRAM).exe
150 -del $(DISTNAME)-win32.zip
151 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)