Makefile
4.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
#!smake -k
# --------------------------------------------------------------------
# Copyright (C) 1997,1998 Nintendo. (Originated by SGI)
#
# $RCSfile: Makefile,v $
# $Revision: 1.1.1.1 $
# $Date: 2002/05/02 03:27:34 $
# --------------------------------------------------------------------
#
# Makefile for Spin demo application
#
#
#
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
APP = spin
OPTIMIZER = -g
TARGETS = rom spintcl.so
TEXHFILES = RGBA16molecule.h \
RGBA16grid.h \
I8mand.h \
I8cloud.h \
I4granite3.h \
IA16tree.h \
IA8tree.h \
IA4tree.h \
I8grid.h \
CI8mario.h \
CI4mario.h \
RGBA16checkMM.h \
RGBA16check1MM.h \
RGBA16treeMM.h \
RGBA16foliageMM.h \
RGBA16mario.h \
RGBA32mario.h \
RGBA16gridMM.h \
I8checkMM.h
HFILES = $(TEXHFILES) spin.h
CODEFILES = spin.c \
vect.c \
track.c \
fly.c \
asin.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = dynamic.c \
zbuffer.c \
init.c \
models.c \
cfb.c \
texture.c
DATAOBJECTS = $(DATAFILES:.c=.o)
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCDEFS = $(HW_FLAGS)
LCINCS = -I. -I./DB -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include
LCOPTS = -fullwarn -non_shared -G 0
LDIRT = $(APP) spin $(TEXHFILES) *.so
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra_d
default: $(TARGETS)
include $(COMMONRULES)
RGB2CO = $(ROOT)/usr/sbin/rgb2c
#
# what does it mean to 'install' this thing?
#
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/spin README spinit rom spintcl.so
$(INSTALL) -m 555 -F /usr/src/PR/demos/spin spinit
cd ui; make install; cd ..
$(CODESEGMENT): $(CODEOBJECTS) main.o
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) main.o $(LDFLAGS)
#
# This must depend on the generated h-files.
# If we don't do this, smake fails.
#
spin.o: $(TEXHFILES)
$(OBJECTS): $(HFILES)
rom $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) $(LCINCS) -r rom spec
#
# Make texture files
#
RGBA16molecule.h: Texture/molecule.rgba
$(RGB2C) -m RGBA16molecule Texture/molecule.rgba > RGBA16molecule.h
RGBA16grid.h: Texture/grid.rgba
$(RGB2C) -m RGBA16grid Texture/grid.rgba > RGBA16grid.h
I4granite3.h: Texture/granite.3.bw
$(RGB2C) -f I -s 4 -m I4granite3 Texture/granite.3.bw > I4granite3.h
IA16tree.h: Texture/tree32.rgba
$(RGB2C) -f IA -s 16 -m IA16tree Texture/tree32.rgba > IA16tree.h
IA8tree.h: Texture/tree32.rgba
$(RGB2C) -f IA -s 8 -m IA8tree Texture/tree32.rgba > IA8tree.h
IA4tree.h: Texture/tree32.rgba
$(RGB2C) -f IA -s 4 -m IA4tree Texture/tree32.rgba > IA4tree.h
I8mand.h: Texture/mand.rgb
$(RGB2C) -f I -s 8 -m I8mand Texture/mand.rgb > I8mand.h
I8cloud.h: Texture/cloud.rgb
$(RGB2C) -f I -s 8 -m I8cloud Texture/cloud.rgb > I8cloud.h
I8grid.h: Texture/grid.rgba
$(RGB2C) -f I -s 8 -m I8grid Texture/grid.rgba > I8grid.h
CI8mario.h: Texture/mario.rgb
cp Texture/CI8mario.h .
# $(RGB2C) -f CI -s 8 -m CI8mario Texture/mario.rgb > CI8mario.h
CI4mario.h: Texture/mario.rgb
# cp Texture/CI4mario.h .
$(RGB2C) -f CI -s 4 -m CI4mario Texture/mario.rgb > CI4mario.h
RGBA16checkMM.h: Texture/check.rgba
# cp Texture/RGBA16checkMM.h .
$(RGB2CO) -f RGBA -s 16 -m RGBA16checkMM -o MIP Texture/check.rgba > RGBA16checkMM.h
RGBA16check1MM.h: Texture/check1.rgba
# cp Texture/RGBA16check1MM.h .
$(RGB2CO) -f RGBA -s 16 -m RGBA16check1MM -o MIP Texture/check1.rgba > RGBA16check1MM.h
I8checkMM.h: Texture/check1.rgba
$(RGB2CO) -f I -s 8 -m I8checkMM -o MIP Texture/check1.rgba > I8checkMM.h
RGBA16treeMM.h :Texture/tree32.rgba
$(RGB2C) -f RGBA -s 16 -m RGBA16treeMM -o MIP Texture/tree32.rgba > RGBA16treeMM.h
# cp Texture/RGBA16treeMM.h .
RGBA16foliageMM.h :Texture/foliage4.rgb
$(RGB2C) -f RGBA -s 16 -m RGBA16foliageMM -o MIP Texture/foliage4.rgb > RGBA16foliageMM.h
# cp Texture/RGBA16foliageMM.h .
RGBA16mario.h: Texture/mario64.rgb
$(RGB2C) -f RGBA -s 16 -m RGBA16mario Texture/mario64.rgb > RGBA16mario.h
RGBA32mario.h: Texture/mario.rgb
$(RGB2C) -f RGBA -s 32 -m RGBA32mario Texture/mario.rgb > RGBA32mario.h
RGBA16gridMM.h: Texture/grid.rgba
$(RGB2C) -f RGBA -s 16 -m RGBA16gridMM -o MIP Texture/grid.rgba > RGBA16gridMM.h
#
# Files specific to Hardware/Emulator
#
main.o: main.c
$(CC) $(CFLAGS) -D_TRACE -c $<
#
# Make TCL library
#
spintcl.so: spintcl.o callback.o gen_dl.o driverd.o
$(LD) -o spintcl.so -shared -no_unresolved spintcl.o callback.o gen_dl.o driverd.o \
-L $(TOOLROOT)/usr/IRIXpro/lib -lX11 -lc -lm -ltcl -L $(ROOT)/usr/lib -lultrahost
spintcl.o: spintcl.c spincontrol.h
$(CC) -c $(LCINCS) $(LCDEFS) -I$(TOOLROOT)/usr/IRIXpro/include spintcl.c
driverd.o: driverd.c
$(CC) -c $(LCINCS) $(LCDEFS) driverd.c
callback.o: callback.c
$(CC) -c $(LCINCS) $(LCDEFS) -I$(TOOLROOT)/usr/IRIXpro/include callback.c
gen_dl.o: gen_dl.c spincontrol.h
$(CC) -c $(LCINCS) $(LCDEFS) -I$(TOOLROOT)/usr/IRIXpro/include gen_dl.c