GNUmakefile
13.8 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
#!smake -k
#
# Makefile for RDP verification application test suite.
#
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
OPTIMIZER = -g -D_HW_VERSION_2
TARGETS = rom
EMULATE = $(ROOT)/usr/sbin/emulate
TEXHFILES = RGBA16dana.h \
RGBA16grid.h \
IA8phong.h \
RGBA16cbar.h
#
# These header files are generated by a data generation program
#
GENHFILES = case_edge_00.h case_vertex_00.h case_skinny_00.h \
case_tiny_00.h case_disc_00.h
HFILES = $(TEXHFILES) rdpverif.h
CODEFILES = rdpverif.c main.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = zbuffer.c init.c static.c cfb.c
DATAOBJECTS = $(GENHFILES) $(DATAFILES:.c=.o)
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
#LCINCS = -I. -I$(ROOT)/usr/include/PR -DUSE_TEX
LCINCS = -I. -I$(ROOT)/usr/include/PR
LCOPTS = -Wall -non_shared -G 0 -mips2
LCDEFS = $(HW_FLAGS)
LDIRT = $(APP) rdpverif $(GENHFILES) cases InData/test*Z $(TEXHFILES)
LDFLAGS = $(MKDEPOPT) -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
-lultra_d -lgcc
default: $(TARGETS)
include $(COMMONRULES)
#
# what does it mean to 'install' this thing?
#
install: default
$(INSTALL) -m 444 -F /usr/src/PR/$(APP) rdpverif \
$(HFILES) $(CODEFILES) $(DATAFILES) Makefile spec
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
$(OBJECTS): $(HFILES)
#
# This must depend on the generated h-files, which in turn depend
# on the cases utility. If we don't do this, smake fails.
#
static.o: $(GENHFILES)
rom $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) -r rom spec
#
# ADD TEST CASE:
#
# Note: due to fopen() restrictions in the rsp simulator, the
# directory you send the output to must exist before running...
#
NIGHTLY_REGRESSION_TEST_ARCHIVE = \
InData/test022.22.rdp.Z.archive \
InData/test023.23.rdp.Z.archive \
InData/test024.24.rdp.Z.archive \
InData/test028.28.rdp.Z.archive \
InData/test029.29.rdp.Z.archive \
InData/test030.30.rdp.Z.archive \
InData/test040.40.rdp.Z.archive \
\
InData/test122.22.rdp.Z.archive \
InData/test123.23.rdp.Z.archive \
InData/test124.24.rdp.Z.archive \
InData/test128.28.rdp.Z.archive \
InData/test129.29.rdp.Z.archive \
InData/test130.30.rdp.Z.archive
OTHER_TESTS_ARCHIVE = \
InData/test001.01.rdp.Z.archive \
InData/test002.02.rdp.Z.archive \
InData/test003.03.rdp.Z.archive \
InData/test004.04.rdp.Z.archive \
InData/test005.05.rdp.Z.archive \
InData/test006.06.rdp.Z.archive \
InData/test007.07.rdp.Z.archive \
InData/test009.09.rdp.Z.archive \
InData/test010.10.rdp.Z.archive \
InData/test015.15.rdp.Z.archive \
InData/test020.20.rdp.Z.archive \
InData/test021.21.rdp.Z.archive \
InData/test025.25.rdp.Z.archive \
InData/test026.26.rdp.Z.archive \
InData/test027.27.rdp.Z.archive
NIGHTLY_REGRESSION_TESTS = ${NIGHTLY_REGRESSION_TEST_ARCHIVE:R:R:R:R:T}
NIGHTLY_REGRESSION_TEST_TARGETS = ${NIGHTLY_REGRESSION_TEST_ARCHIVE:R}
OTHER_TESTS = ${OTHER_TESTS_ARCHIVE:R:R:R:R:T}
OTHER_TESTS_TARGETS = ${OTHER_TESTS_ARCHIVE:R}
TESTS = ${OTHER_TESTS} ${NIGHTLY_REGRESSION_TESTS}
#
# Header file build rules
#
RGBA16dana.h: Texture/dana_tiny.rgb
$(RGB2C) -m RGBA16dana Texture/dana_tiny.rgb > RGBA16dana.h
RGBA16grid.h: Texture/grid.rgb
$(RGB2C) -m RGBA16grid Texture/grid.rgb > RGBA16grid.h
IA8phong.h: Texture/phong.rgba
$(RGB2C) -m IA8phong -s 8 -f IA Texture/phong.rgba > IA8phong.h
RGBA16cbar.h: Texture/colorbar.rgb
$(RGB2C) -m RGBA16cbar Texture/colorbar.rgb > RGBA16cbar.h
#
# GENHFILES, use the data generation program 'cases'
#
case_edge_00.h: cases
./cases -w 0
case_vertex_00.h: cases
./cases -w 1
case_skinny_00.h: cases
./cases -w 2
case_tiny_00.h: cases
./cases -w 3
case_disc_00.h: cases
./cases -w 4
#
# The program to build the above include files...
#
cases: cases.c
$(HOST_CC) -o $@ cases.c -lm
#
# Anti-aliased
#
test000: InData/test000.0.rdp.Z
InData/test000.0.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 0 -n InData/test000" $(APP) rom
compress -f InData/test000*.rdp
test001: InData/test001.1.rdp.Z
InData/test001.1.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 1 -n InData/test001" $(APP) rom
compress -f InData/test001*.rdp
test002: InData/test002.2.rdp.Z
InData/test002.2.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 2 -n InData/test002" $(APP) rom
compress -f InData/test002*.rdp
test003: InData/test003.3.rdp.Z
InData/test003.3.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 3 -n InData/test003" $(APP) rom
compress -f InData/test003*.rdp
test004: InData/test004.4.rdp.Z
InData/test004.4.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -f 4 -o 4 -n InData/test004" $(APP) rom
compress -f InData/test004*.rdp
test005: InData/test005.5.rdp.Z
InData/test005.5.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -f 5 -o 5 -n InData/test005" $(APP) rom
compress -f InData/test005*.rdp
test006: InData/test006.6.rdp.Z
InData/test006.6.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 6 -n InData/test006" $(APP) rom
compress -f InData/test006*.rdp
test007: InData/test007.7.rdp.Z
InData/test007.7.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 7 -n InData/test007" $(APP) rom
compress -f InData/test007*.rdp
#
# Anti-aliased
#
test009: InData/test009.9.rdp.Z
InData/test009.9.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 9 -n InData/test009" $(APP) rom
compress -f InData/test009*.rdp
test010: InData/test010.10.rdp.Z
InData/test010.10.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 10 -n InData/test010" $(APP) rom
compress -f InData/test010*.rdp
test015: InData/test015.15.rdp.Z
InData/test015.15.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 15 -f 15 -n InData/test015" $(APP) rom
compress -f InData/test015*.rdp
test020: InData/test020.20.rdp.Z
InData/test020.20.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 20 -f 20 -n InData/test020" $(APP) rom
compress -f InData/test020*.rdp
#
# Anti-aliased
#
test021: InData/test021.21.rdp.Z
InData/test021.21.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 21 -f 21 -n InData/test021" $(APP) rom
compress -f InData/test021*.rdp
#
# Anti-aliased
#
test022: InData/test022.22.rdp.Z InData/test022.22.rdram.Z
InData/test022.22.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 22 -f 22 -r -n InData/test022" $(APP) rom
compress -f InData/test022*.rdp
InData/test022.22.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 22 -F -f 22 -r -n InData/test022" $(APP) rom
#
# (32 bit version)
# Anti-aliased
#
test122: InData/test122.22.rdp.Z InData/test122.22.rdram.Z
InData/test122.22.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 22 -f 22 -r -n InData/test122 -t" $(APP) rom
compress -f InData/test122*.rdp
InData/test122.22.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 22 -F -f 22 -r -n InData/test122 -t" $(APP) rom
#
# Anti-aliased
#
test023: InData/test023.23.rdp.Z InData/test023.23.rdram.Z
InData/test023.23.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 23 -f 23 -r -n InData/test023" $(APP) rom
compress -f InData/test023*.rdp
InData/test023.23.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 23 -F -f 23 -r -n InData/test023" $(APP) rom
#
# (32 bit version)
# Anti-aliased
#
test123: InData/test123.23.rdp.Z InData/test123.23.rdram.Z
InData/test123.23.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 23 -f 23 -r -n InData/test123 -t" $(APP) rom
compress -f InData/test123*.rdp
InData/test123.23.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 23 -F -f 23 -r -n InData/test123 -t" $(APP) rom
#
# Anti-aliased
#
test024: InData/test024.24.rdp.Z InData/test024.24.rdram.Z
InData/test024.24.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 24 -f 24 -r -n InData/test024" $(APP) rom
compress -f InData/test024*.rdp
InData/test024.24.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 24 -F -f 24 -r -n InData/test024" $(APP) rom
#
# (32 bit version)
# Anti-aliased
#
test124: InData/test124.24.rdp.Z InData/test124.24.rdram.Z
InData/test124.24.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 24 -f 24 -r -n InData/test124 -t" $(APP) rom
compress -f InData/test124*.rdp
InData/test124.24.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 24 -F -f 24 -r -n InData/test124 -t" $(APP) rom
#
# Anti-aliased
#
test025: InData/test025.25.rdp.Z
InData/test025.25.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 25 -f 25 -n InData/test025" $(APP) rom
compress -f InData/test025*.rdp
#
# Anti-aliased
#
test026: InData/test026.26.rdp.Z
InData/test026.26.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 26 -f 26 -n InData/test026" $(APP) rom
compress -f InData/test026*.rdp
#
# Anti-aliased
#
test027: InData/test027.27.rdp.Z
InData/test027.27.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 27 -f 27 -n InData/test027" $(APP) rom
compress -f InData/test027*.rdp
#
# Anti-aliased
#
test028: InData/test028.28.rdp.Z InData/test028.28.rdram.Z
InData/test028.28.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 28 -f 28 -r -n InData/test028" $(APP) rom
compress -f InData/test028*.rdp
InData/test028.28.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 28 -f 28 -r -n InData/test028" $(APP) rom
#
# (32 bit version)
# Anti-aliased
#
test128: InData/test128.28.rdp.Z InData/test128.28.rdram.Z
InData/test128.28.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 28 -f 28 -r -n InData/test128 -t" $(APP) rom
compress -f InData/test128*.rdp
InData/test128.28.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 28 -f 28 -r -n InData/test128 -t" $(APP) rom
#
# Anti-aliased; if you do not supply the -F flag when generating the rdram
# file, you will see the mspan cache coherency problem, as this test generates
# lots of small, overlapping triangles.
#
test029: InData/test029.29.rdp.Z InData/test029.29.rdram.Z
InData/test029.29.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 29 -f 29 -r -n InData/test029" $(APP) rom
compress -f InData/test029*.rdp
InData/test029.29.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 29 -f 29 -r -n InData/test029" $(APP) rom
#
# (32 bit version)
# Anti-aliased; if you do not supply the -F flag when generating the rdram
# file, you will see the mspan cache coherency problem, as this test generates
# lots of small, overlapping triangles.
#
test129: InData/test129.29.rdp.Z InData/test129.29.rdram.Z
InData/test129.29.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 29 -f 29 -r -n InData/test129 -t" $(APP) rom
compress -f InData/test129*.rdp
InData/test129.29.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 29 -f 29 -r -n InData/test129 -t" $(APP) rom
#
# Anti-aliased
#
test030: InData/test030.30.rdp.Z InData/test030.30.rdram.Z
InData/test030.30.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 30 -f 30 -r -n InData/test030" $(APP) rom
compress -f InData/test030*.rdp
InData/test030.30.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 30 -f 30 -r -n InData/test030" $(APP) rom
#
# (32 bit version)
# Anti-aliased
#
test130: InData/test130.30.rdp.Z InData/test130.30.rdram.Z
InData/test130.30.rdp.Z: $(APP)
$(EMULATE) -n -s -a "-m -a -o 30 -f 30 -r -n InData/test130 -t" $(APP) rom
compress -f InData/test130*.rdp
InData/test130.30.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 30 -f 30 -r -n InData/test130 -t" $(APP) rom
#
# test 31 is Anti-aliased (no rule here yet)
#
#
# Line tests
#
test035: InData/test035.35.rdp.Z
InData/test035.35.rdp.Z: $(APP) $(_FORCE)
$(EMULATE) -n -s -a "-l -m -a -o 35 -f 35 -n InData/test035" $(APP) rom
uncompress InData/test035.35.mem.Z
compress -c -f InData/test035.35.rdp > InData/test035.35.rdp.Z
rdp_c -i test035.35 -v -e -m test035.35
test036: InData/test036.36.rdp.Z
InData/test036.36.rdp.Z: $(APP) $(_FORCE)
$(EMULATE) -n -s -a "-l -m -a -o 36 -f 36 -n InData/test036" $(APP) rom
uncompress InData/test036.36.mem.Z
compress -c -f InData/test036.36.rdp > InData/test036.36.rdp.Z
rdp_c -i test036.36 -v -e -m test036.36
test037: InData/test037.37.rdp.Z
InData/test037.37.rdp.Z: $(APP) $(_FORCE)
$(EMULATE) -n -s -a "-l -m -a -o 37 -f 37 -n InData/test037" $(APP) rom
uncompress InData/test037.37.mem.Z
compress -c -f InData/test037.37.rdp > InData/test037.37.rdp.Z
rdp_c -i test037.37 -v -e -m test037.37
test038: InData/test038.38.rdp.Z
InData/test038.38.rdp.Z: $(APP) $(_FORCE)
$(EMULATE) -n -s -a "-l -m -a -o 38 -f 38 -n InData/test038" $(APP) rom
uncompress InData/test038.38.mem.Z
compress -c -f InData/test038.38.rdp > InData/test038.38.rdp.Z
rdp_c -i test038.38 -v -e -m test038.38
test039: InData/test039.39.rdp.Z InData/test039.39.rdram.Z
InData/test039.39.rdp.Z: $(APP) $(_FORCE)
$(EMULATE) -n -s -a "-m -a -o 39 -f 39 -n InData/test039" $(APP) rom
# uncompress InData/test039.39.mem.Z
# compress -c -f InData/test039.39.rdp > InData/test039.39.rdp.Z
# rdp_c -i test039.39 -v -e -m test039.39
compress -f InData/test039*.rdp
InData/test039.39.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -o 39 -f 39 -n InData/test039" $(APP) rom
#
# Dither test
#
test040: InData/test040.40.rdram.Z
InData/test040.40.rdram.Z: $(APP)
$(EMULATE) -n -s -a \
"-a -d -m -F -o 40 -f 40 -r -n InData/test040" $(APP) rom
tests: $(TESTS)
#
# Run a smaller subset of the total test coverage on a nightly basis.
#
nightly_regression: $(NIGHTLY_REGRESSION_TESTS)
#
# Only checkin archived versions of the .rdp files on a periodic,
# on-demand basis (e.g. whenever an RSP simulator/ucode change affects the
# output files mumble.rdp).
#
# Otherwise we'll pollute the source tree with unnecessary copies
# of these data files. The intent is to provide a way to resurrect data
# files for downstream simulation purposes whenever the output files generated
# by the rsp sim environment causes a hiccup downstream.
#
periodic_checkin: $(NIGHTLY_REGRESSION_TESTS)
$(ROOT)/PR/tools/scripts/copyToArchive $(NIGHTLY_REGRESSION_TEST_TARGETS)