comparison srogue/Makefile @ 36:2128c7dc8a40

Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
author elwin
date Thu, 25 Nov 2010 12:21:41 +0000
parents
children 8757a0593e6e
comparison
equal deleted inserted replaced
35:05018c63a721 36:2128c7dc8a40
1 # Makefile for rogue
2 # %W% (Berkeley) %G%
3 #
4 # Super-Rogue
5 # Copyright (C) 1984 Robert D. Kindelberger
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 DISTNAME=srogue9.0-1
15 PROGRAM=srogue
16
17 HDRS= bob.h cx.h ncx.h rdk.h rogue.h
18 OBJS= vers.o armor.o chase.o command.o daemon.o daemons.o disply.o encumb.o \
19 fight.o global.o init.o io.o list.o main.o misc.o monsters.o move.o \
20 new_leve.o options.o pack.o passages.o potions.o pstats.o rings.o rip.o \
21 rooms.o save.o scrolls.o state.o sticks.o things.o trader.o weapons.o \
22 wizard.o xcrypt.o
23 CFILES= vers.c armor.c chase.c command.c daemon.c daemons.c disply.c encumb.c \
24 fight.c global.c init.c io.c list.c main.c misc.c monsters.c move.c \
25 new_leve.c options.c pack.c passages.c potions.c pstats.c rings.c rip.c \
26 rooms.c save.c scrolls.c state.c sticks.c things.c trader.c weapons.c \
27 wizard.c xcrypt.c
28
29 MISC= Makefile LICENSE.TXT rogue.nr
30
31 CC = gcc
32 CFLAGS= -g
33 CRLIB = -lcurses
34 RM = rm -f
35 TAR = tar
36
37 $(PROGRAM): $(HDRS) $(OBJS)
38 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
39
40 tags: $(HDRS) $(CFILES)
41 ctags -u $?
42 ed - tags < :ctfix
43 sort tags -o tags
44
45 lint:
46 lint -hxbc $(CFILES) $(CRLIB) > linterrs
47
48 clean:
49 rm -f $(OBJS) core
50 rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).doc
51
52 count:
53 wc -l $(HDRS) $(CFILES)
54
55 realcount:
56 cc -E $(CFILES) | ssp - | wc -l
57
58 update:
59 ar uv .SAVE $(CFILES) $(HDRS) $(MISC)
60
61 dist:
62 @mkdir dist
63 cp $(CFILES) $(HDRS) $(MISC) dist
64
65 dist.src:
66 make clean
67 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC)
68 gzip -f $(DISTNAME)-src.tar
69
70 dist.irix:
71 make clean
72 make CC=cc CFLAGS="-woff 1116 -O3" $(PROGRAM)
73 tbl rogue.nr | nroff -mm | colcrt - > $(PROGRAM).doc
74 tar cf $(DISTNAME)-irix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
75 gzip -f $(DISTNAME)-irix.tar
76
77 debug.aix:
78 make clean
79 make CC=xlc CFLAGS="-qmaxmem=16768 -g -DWIZARD -qstrict" $(PROGRAM)
80
81 dist.aix:
82 make clean
83 make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" $(PROGRAM)
84 tbl rogue.nr | nroff -mm | colcrt - > $(PROGRAM).doc
85 tar cf $(DISTNAME)-aix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
86 gzip -f $(DISTNAME)-aix.tar
87
88 debug.linux:
89 make clean
90 make CFLAGS="-g -DWIZARD" $(PROGRAM)
91
92 dist.linux:
93 make clean
94 make $(PROGRAM)
95 groff -P-c -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' >$(PROGRAM).doc
96 tar cf $(DISTNAME)-linux.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
97 gzip -f $(DISTNAME)-linux.tar
98
99 debug.interix:
100 make clean
101 make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
102
103 dist.interix:
104 make clean
105 make $(PROGRAM)
106 groff -P-b -P-u -t -mm -Tascii rogue.nr > $(PROGRAM).doc
107 tar cf $(DISTNAME)-interix.tar $(PROGRAM) LICENSE.TXT $(PROGRAM).doc
108 gzip -f $(DISTNAME)-interix.tar
109
110 debug.cygwin:
111 make clean
112 make CFLAGS="-g3 -DWIZARD" $(PROGRAM)
113
114 dist.cygwin:
115 make clean
116 make $(PROGRAM)
117 groff -P-c -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' >$(PROGRAM).doc
118 tar cf $(DISTNAME)-cygwin.tar $(PROGRAM).exe LICENSE.TXT $(PROGRAM).doc
119 gzip -f $(DISTNAME)-cygwin.tar
120
121 debug.djgpp:
122 make clean
123 make CFGLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
124
125 dist.djgpp:
126 make clean
127 make LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" $(PROGRAM)
128 groff -t -mm -Tascii rogue.nr | sed -e 's/.\x08//g' > $(PROGRAM).doc
129 rm -f $(DISTNAME)-djgpp.zip
130 zip $(DISTNAME)-djgpp.zip $(PROGRAM).exe LICENSE.TXT $(PROGRAM).doc