comparison rogue5/Makefile.std @ 33:f502bf60e6e4

Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
author elwin
date Mon, 24 May 2010 20:10:59 +0000
parents
children
comparison
equal deleted inserted replaced
32:2dcd75e6a736 33:f502bf60e6e4
1 #
2 # Makefile for rogue
3 # @(#)Makefile 4.21 (Berkeley) 02/04/99
4 #
5 # Rogue: Exploring the Dungeons of Doom
6 # Copyright (C) 1980-1983, 1985, 1999 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 = rogue5.4.5
13 PROGRAM = rogue54
14 O = o
15 HDRS = rogue.h extern.h score.h
16 OBJS1 = vers.$(O) extern.$(O) armor.$(O) chase.$(O) command.$(O) \
17 daemon.$(O) daemons.$(O) fight.$(O) init.$(O) io.$(O) list.$(O) \
18 mach_dep.$(O) main.$(O) mdport.$(O) misc.$(O) monsters.$(O) \
19 move.$(O) new_level.$(O)
20 OBJS2 = options.$(O) pack.$(O) passages.$(O) potions.$(O) rings.$(O) \
21 rip.$(O) rooms.$(O) save.$(O) scrolls.$(O) state.$(O) sticks.$(O) \
22 things.$(O) weapons.$(O) wizard.$(O) xcrypt.$(O)
23 OBJS = $(OBJS1) $(OBJS2)
24 CFILES = vers.c extern.c armor.c chase.c command.c daemon.c \
25 daemons.c fight.c init.c io.c list.c mach_dep.c \
26 main.c mdport.c misc.c monsters.c move.c new_level.c \
27 options.c pack.c passages.c potions.c rings.c rip.c \
28 rooms.c save.c scrolls.c state.c sticks.c things.c \
29 weapons.c wizard.c xcrypt.c
30 MISC_C = findpw.c scedit.c scmisc.c
31 DOCSRC = rogue.me.in rogue.6.in rogue.doc.in rogue.html.in rogue.cat.in
32 DOCS = $(PROGRAM).doc $(PROGRAM).html $(PROGRAM).cat $(PROGRAM).me \
33 $(PROGRAM).6
34 AFILES = configure Makefile.in configure.ac config.h.in config.sub config.guess \
35 install-sh rogue.6.in rogue.me.in rogue.html.in rogue.doc.in rogue.cat.in
36 MISC = Makefile.std LICENSE.TXT rogue54.sln rogue54.vcproj rogue.spec \
37 rogue.png rogue.desktop
38 CC = gcc
39 FEATURES = -DALLSCORES -DSCOREFILE=\"$(SCOREFILE)\" -DLOCKFILE=\"$(LOCKFILE)\"
40 CPPFLAGS =
41 CFLAGS = -O3
42 LDFLAGS =
43 LIBS = -lcurses
44 RM = rm -f
45 MAKEFILE = -f Makefile.std
46 SCOREFILE= $(PROGRAM).scr
47 LOCKFILE = $(PROGRAM).lck
48 OUTFLAG = -o
49 EXE =
50
51 .SUFFIXES: .obj
52
53 .c.obj:
54 $(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURES) /c $*.c
55
56 .c.o:
57 $(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURES) -c $*.c
58
59 $(PROGRAM): $(HDRS) $(OBJS) fixdocs
60 $(CC) $(LDFLAGS) $(OBJS) $(LIBS) $(OUTFLAG)$@$(EXE)
61
62 clean:
63 $(RM) $(OBJS1)
64 $(RM) $(OBJS2)
65 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).lck
66 $(RM) $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip
67 $(RM) $(DISTNAME)/*
68
69 dist.src:
70 $(MAKE) $(MAKEFILE) clean
71 mkdir $(DISTNAME)
72 cp $(CFILES) $(HDRS) $(MISC) $(AFILES) $(DISTNAME)
73 tar cf $(DISTNAME)-src.tar $(DISTNAME)
74 gzip -f $(DISTNAME)-src.tar
75 rm -fr $(DISTNAME)
76
77 findpw: findpw.c xcrypt.o mdport.o xcrypt.o
78 $(CC) -s -o findpw findpw.c xcrypt.o mdport.o -lcurses
79
80 scedit: scedit.o scmisc.o vers.o mdport.o xcrypt.o
81 $(CC) -s -o scedit vers.o scedit.o scmisc.o mdport.o xcrypt.o -lcurses
82
83 scmisc.o scedit.o:
84 $(CC) -O -c $(SF) $*.c
85
86 doc.nroff:
87 tbl rogue.me | nroff -me | colcrt - > rogue.doc
88 nroff -man rogue.6 | colcrt - > rogue.cat
89
90 doc.groff:
91 groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc
92 groff -man rogue.6 | sed -e 's/.\x08//g' > rogue.cat
93
94 fixdocs:
95 sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/$(SCOREFILE)/' rogue.6.in > $(PROGRAM).6
96 sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/$(SCOREFILE)/' rogue.me.in > $(PROGRAM).me
97 sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/$(SCOREFILE)/' rogue.html.in > $(PROGRAM).html
98 sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/$(SCOREFILE)/' rogue.doc.in > $(PROGRAM).doc
99 sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/$(SCOREFILE)/' rogue.cat.in > $(PROGRAM).cat
100
101 dist.irix:
102 $(MAKE) $(MAKEFILE) clean
103 $(MAKE) $(MAKEFILE) CC=cc $(PROGRAM)
104 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
105 gzip -f $(DISTNAME)-irix.tar
106
107 dist.aix:
108 $(MAKE) $(MAKEFILE) clean
109 $(MAKE) $(MAKEFILE) CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM)
110 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
111 gzip -f $(DISTNAME)-aix.tar
112
113 dist.linux:
114 $(MAKE) $(MAKEFILE) clean
115 $(MAKE) $(MAKEFILE) $(PROGRAM)
116 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(DOCS)
117 gzip -f $(DISTNAME)-linux.tar
118
119 dist.interix:
120 @$(MAKE) $(MAKEFILE) clean
121 @$(MAKE) $(MAKEFILE) CFLAGS="-ansi" $(PROGRAM)
122 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(DOCS)
123 gzip -f $(DISTNAME)-interix.tar
124
125 dist.cygwin:
126 @$(MAKE) $(MAKEFILE) --no-print-directory clean
127 @$(MAKE) $(MAKEFILE) CPPFLAGS="-I/usr/include/ncurses" --no-print-directory $(PROGRAM)
128 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(DOCS)
129 gzip -f $(DISTNAME)-cygwin.tar
130
131 #
132 # Use MINGW32-MAKE to build this target
133 #
134 dist.mingw32:
135 @$(MAKE) $(MAKEFILE) --no-print-directory RM="cmd /c del" clean
136 @$(MAKE) $(MAKEFILE) --no-print-directory CPPFLAGS="-I../pdcurses" LIBS="../pdcurses/pdcurses.a" $(PROGRAM)
137 cmd /c del $(DISTNAME)-mingw32.zip
138 zip $(DISTNAME)-mingw32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)
139
140 dist.djgpp:
141 @$(MAKE) $(MAKEFILE) --no-print-directory clean
142 @$(MAKE) $(MAKEFILE) --no-print-directory LDFLAGS="-L$(DJDIR)/LIB" \
143 LIBS="-lpdcurses" $(PROGRAM)
144 rm -f $(DISTNAME)-djgpp.zip
145 zip $(DISTNAME)-djgpp.zip $(PROGRAM) LICENSE.TXT $(DOCS)
146
147 #
148 # Use NMAKE to build this targer
149 #
150
151 dist.win32:
152 @$(MAKE) $(MAKEFILE) /NOLOGO O="obj" RM="-del" clean
153 @$(MAKE) $(MAKEFILE) /NOLOGO O="obj" CC="CL" \
154 LIBS="..\pdcurses\pdcurses.lib shell32.lib user32.lib Advapi32.lib" \
155 EXE=".exe" OUTFLAG="/Fe" CPPFLAGS="-I..\pdcurses" \
156 CFLAGS="-nologo -Ox -wd4033 -wd4716" $(PROGRAM)
157 -del $(DISTNAME)-win32.zip
158 zip $(DISTNAME)-win32.zip $(PROGRAM).exe LICENSE.TXT $(DOCS)