Makefile 12.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
#!smake -k
#
# Makefile for RDP verification application test suite.
#
# Wed Oct  5 21:03:47 PDT 1994
#

PRDEPTH = ../..

include $(PRDEPTH)/PRdefs

OPTIMIZER =	-g -D_HW_VERSION_2

TARGETS =	rom
APP = 		rom

EMULATE = 	$(ROOT)/usr/sbin/emulate

#
# 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/test014.14.rdp.Z.archive \
	InData/test015.15.rdp.Z.archive \
	InData/test016.16.rdp.Z.archive \
	InData/test017.17.rdp.Z.archive \
	InData/test031.31.rdp.Z.archive \
	InData/test032.32.rdp.Z.archive \
	InData/test038.38.rdp.Z.archive \
	InData/test132.32.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/test008.08.rdp.Z.archive \
	InData/test009.09.rdp.Z.archive \
	InData/test010.10.rdp.Z.archive \
	InData/test011.11.rdp.Z.archive \
	InData/test012.12.rdp.Z.archive \
	InData/test013.13.rdp.Z.archive \
	InData/test020.20.rdp.Z.archive \
	InData/test033.33.rdp.Z.archive \
	InData/test034.34.rdp.Z.archive \
	InData/test035.35.rdp.Z.archive \
	InData/test036.36.rdp.Z.archive \
	InData/test037.37.rdp.Z.archive \
	InData/test039.39.rdp.Z.archive \
	InData/test040.40.rdp.Z.archive

ROBTESTS =	test005 \
		test006 \
		test007 \
		test008 \
		test010 \
		test011 \
		test012 \
		test013 \
		test037 \
		test038 \
		test039 \
		test040 \
		test061 \
		test062 \
		test065 \
		test067

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}

TEXHFILES =	RGBA16dana.h	\
		RGBA16grid.h	\
		IA4checker.h	\
		I4granite3.h	\
		I4luna.h	\
		I4haeberli_fixed.h	\
		IA4haeberli_fixed.h	\
		IA4Tymes-Elfin.h	\
		I4Tymes-Elfin.h

HFILES =	$(TEXHFILES) rdpverif.h

CODEFILES =	rdpverif.c main.c
CODEOBJECTS =	$(CODEFILES:.c=.o)

DATAFILES =	zbuffer.c init.c static.c cfb.c
DATAOBJECTS =	$(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 =	-fullwarn -non_shared -G 0
LCDEFS =	$(HW_FLAGS)

LDIRT  =	InData/test*Z $(TEXHFILES)

LDFLAGS =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
			-lultra_d

default:	$(TARGETS)

include $(COMMONRULES)

$(CODESEGMENT):	$(CODEOBJECTS)
		$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)

#
# This must depend on the generated h-files.
# If we don't do this, smake fails.
#
rdpverif.o: $(TEXHFILES)

$(OBJECTS): $(HFILES)

rom:	spec $(OBJECTS) $(MAKEROM)
	$(MAKEROM) -r rom spec

#
# 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

IA4checker.h: Texture/checker.rgb
	$(RGB2C) -f IA -s 4 -m IA4checker Texture/checker.rgb > IA4checker.h

IA4circle.h: Texture/circle.rgb
	$(RGB2C) -f IA -s 4 -m IA4circle Texture/circle.rgb > IA4circle.h

I4granite3.h: Texture/granite.3.bw
	$(RGB2C) -f I -s 4 -m I4granite3 Texture/granite.3.bw > I4granite3.h

I4luna.h: Texture/luna.rgb
	$(RGB2C) -f I -s 4 -m I4luna Texture/luna.rgb > I4luna.h

I4haeberli_fixed.h: Texture/haeberli_fixed.bw
	$(RGB2C) -f I -s 4 -m I4haeberli_fixed Texture/haeberli_fixed.bw > I4haeberli_fixed.h

IA4haeberli_fixed.h: Texture/haeberli_fixed.bw
	$(RGB2C) -f IA -s 4 -m IA4haeberli_fixed Texture/haeberli_fixed.bw > IA4haeberli_fixed.h

IA4Tymes-Elfin.h: Texture/Tymes-Elfin.bw
	$(RGB2C) -f IA -s 4 -m IA4Tymes_Elfin Texture/Tymes-Elfin.bw > IA4Tymes-Elfin.h

I4Tymes-Elfin.h: Texture/Tymes-Elfin.bw
	$(RGB2C) -f I -s 4 -m I4Tymes_Elfin Texture/Tymes-Elfin.bw > I4Tymes-Elfin.h

#
#  Tests not in regression, but interesting anyway
#
robtests: $(ROBTESTS)

#
# Targets to generate the individual rdram images
#

#
# Anti-aliased square
#
test000:                        InData/test000.0.rdram.Z
InData/test000.0.rdram.Z:        $(APP)
	gen_rdram 0 InData/test000.0.rdram
	compress -f InData/test000.0.rdram

test001:                        InData/test001.1.rdram.Z
InData/test001.1.rdram.Z:        $(APP)
	gen_rdram 1 InData/test001.1.rdram
	compress -f InData/test001.1.rdram

test002:                        InData/test002.2.rdram.Z
InData/test002.2.rdram.Z:        $(APP)
	gen_rdram 2 InData/test002.2.rdram
	compress -f InData/test002.2.rdram

test003:                        InData/test003.3.rdram.Z
InData/test003.3.rdram.Z:        $(APP)
	gen_rdram 3 InData/test003.3.rdram
	compress -f InData/test003.3.rdram

test004:                        InData/test004.4.rdram.Z
InData/test004.4.rdram.Z:        $(APP)
	gen_rdram 4 InData/test004.4.rdram
	compress -f InData/test004.4.rdram

test005:                        InData/test005.5.rdram.Z
InData/test005.5.rdram.Z:        $(APP)
	gen_rdram 5 InData/test005.5.rdram
	compress -f InData/test005.5.rdram

test006:                        InData/test006.6.rdram.Z
InData/test006.6.rdram.Z:        $(APP)
	gen_rdram 6 InData/test006.6.rdram
	compress -f InData/test006.6.rdram

test007:                        InData/test007.7.rdram.Z 
InData/test007.7.rdram.Z:        $(APP)
	gen_rdram 7 InData/test007.7.rdram
	compress -f InData/test007.7.rdram

test008:                        InData/test008.8.rdram.Z
InData/test008.8.rdram.Z:        $(APP)
	gen_rdram 8 InData/test008.8.rdram
	compress -f InData/test008.8.rdram

test009:                        InData/test009.9.rdram.Z
InData/test009.9.rdram.Z:        $(APP)
	gen_rdram 9 InData/test009.9.rdram
	compress -f InData/test009.9.rdram

test010:                        InData/test010.10.rdram.Z
InData/test010.10.rdram.Z:        $(APP)
	gen_rdram 10 InData/test0010.10.rdram
	compress -f InData/test0010.10.rdram

test011:                        InData/test011.11.rdram.Z
InData/test011.11.rdram.Z:        $(APP)
	gen_rdram 11 InData/test0011.11.rdram
	compress -f InData/test0011.11.rdram

test012:		InData/test012.12.rdram.Z 
InData/test012.12.rdram.Z:        $(APP)
	gen_rdram 12 InData/test0012.12.rdram
	compress -f InData/test0012.12.rdram

test013:                InData/test013.13.rdram.Z
InData/test013.13.rdram.Z:	$(APP)
	gen_rdram 13 InData/test0013.13.rdram
	compress -f InData/test0013.13.rdram
#
# test014: attribute update/sync in one-cycle mode (has anti-aliasing)
#
test014:	InData/test014.14.rdram.Z 
InData/test014.14.rdram.Z:	$(APP)
	gen_rdram 14 InData/test0014.14.rdram
	compress -f InData/test0014.14.rdram

#
# test015: attribute update/sync in two-cycle mode (has anti-aliasing)
#
test015:	InData/test015.15.rdram.Z 
InData/test015.15.rdram.Z:	$(APP)
	gen_rdram 15 InData/test0015.15.rdram
	compress -f InData/test0015.15.rdram

#
# test016: attribute update/sync in fill mode (no anti-aliasing)
#
test016:	InData/test016.16.rdram.Z 

InData/test016.16.rdram.Z:	$(APP)
	gen_rdram 16 InData/test0016.16.rdram
	compress -f InData/test0016.16.rdram

#
# test017: attribute update in copy mode (no anti-aliasing)
#
test017:	InData/test017.17.rdram.Z InData/test017.17.rdram.Z
InData/test017.17.rdram.Z:	$(APP)
	gen_rdram 17 InData/test0017.17.rdram
	compress -f InData/test0017.17.rdram

#
# Has anti-aliasing
#
test020:			InData/test020.20.rdram.Z
InData/test020.20.rdram.Z:	$(APP)
	gen_rdram 20 InData/test0020.20.rdram
	compress -f InData/test0020.20.rdram

#
#  Flight path
#
#  Warning, this target dumps 15 frames with 2M memory file for each frame.
#
#  Each 2M memory file will subsequently be compressed to ~32K each, but
#  this won't get done until all 15 frames of the animation have been run
#  (i.e. make sure you have 30MB available before running this target).
#
# (has anti-aliasing)
#
#
test030:			InData/test030.31.rdram.Z

InData/test030.31.rdram.Z:	$(APP)
	$(EMULATE) -n -s -a "-a -m -s 30 31 -f 30 -n InData/test030" $(APP) rom
	compress -f InData/test030*.rdp

#
# test031: AA modes, texture loads, z-buffer, interpenetration, coverage, etc.
# (LOOK_ALL)
# (has anti-aliasing)
#
test031:	InData/test031.31.rdram.Z 
InData/test031.31.rdram.Z:	$(APP)
	gen_rdram 31 InData/test0031.31.rdram
	compress -f InData/test0031.31.rdram

#
# test032: another view of 31, more edge-on cases
# (LOOK_ALL_FOUR_TREES)
# (has anti-aliasing)
#
test032:	InData/test032.32.rdram.Z 
InData/test032.32.rdram.Z:	$(APP)
	gen_rdram 32 InData/test0032.32.rdram
	compress -f InData/test0032.32.rdram
#
# test132: 32 bit version of another view of 31, more edge-on cases
# (LOOK_ALL_FOUR_TREES)
# (has anti-aliasing)
#
test132:	InData/test132.32.rdram.Z 
InData/test132.32.rdram.Z:	$(APP)
	gen_rdram 132 InData/test00132.132.rdram
	compress -f InData/test00132.132.rdram
#
#  LOOK_ICOSA
#
test033:                        InData/test033.33.rdram.Z
InData/test033.33.rdram.Z:	$(APP)
	gen_rdram 133 InData/test00133.133.rdram
	compress -f InData/test00133.133.rdram
#
#  LOOK_BOX
#
test034:                        InData/test034.34.rdram.Z
InData/test034.34.rdram.Z:	$(APP)
	gen_rdram 34 InData/test0034.34.rdram
	compress -f InData/test0034.34.rdram
#
#  LOOK_FIRST_TREE
#
test035:                        InData/test035.35.rdram.Z
InData/test035.35.rdram.Z:	$(APP)
	gen_rdram 35 InData/test0035.35.rdram
	compress -f InData/test0035.35.rdram
#
#  LOOK_SECOND_TREE
#
test036:                        InData/test036.36.rdram.Z
InData/test036.36.rdram.Z:	$(APP)
	gen_rdram 36 InData/test0036.36.rdram
	compress -f InData/test0036.36.rdram

#
#  texture edge mode test
#
test037:                        InData/test037.37.rdram.Z
InData/test037.37.rdram.Z:	$(APP)
	gen_rdram 37 InData/test0037.37.rdram
	compress -f InData/test0037.37.rdram

#
#  zbuffer range/accuracy test (no anti-aliasing)
#
test038:	InData/test038.38.rdram.Z 
InData/test038.38.rdram.Z:	$(APP)
	gen_rdram 38 InData/test0038.38.rdram
	compress -f InData/test0038.38.rdram
#
#  odd interlaced version of test030
#
test039:	InData/test039.39.rdram.Z
InData/test039.39.rdram.Z:	$(APP)
	gen_rdram 39 InData/test0039.39.rdram
	compress -f InData/test0039.39.rdram
#
#  even interlaced version of test030
#
test040:	InData/test040.40.rdram.Z 
InData/test040.40.rdram.Z:	$(APP)
	gen_rdram 40 InData/test0040.40.rdram
	compress -f InData/test0040.40.rdram

#
#  Rolling doughnuts
#
test041:                        InData/test041.41.rdram.Z
InData/test041.41.rdram.Z:	$(APP)
	gen_rdram 41 InData/test0041.41.rdram
	compress -f InData/test0041.41.rdram

#
#  Random forest, vert strip, 16b
#
test061:	InData/test061.61.rdram.Z
InData/test061.61.rdram.Z:	$(APP)
	gen_rdram 61 InData/test0061.61.rdram
	compress -f InData/test0061.61.rdram

#
#  Random forest, horz strip, 16b
#
test062:	InData/test062.62.rdram.Z 
InData/test062.62.rdram.Z:	$(APP)
	gen_rdram 62 InData/test0062.62.rdram
	compress -f InData/test0062.62.rdram

#
#  Random forest, vert strip, 32b
#
test063:	InData/test063.63.rdram.Z 
InData/test063.63.rdram.Z:	$(APP)
	gen_rdram 63 InData/test0063.63.rdram
	compress -f InData/test0063.63.rdram
#
#  Random forest, horz strip, 32b
#
test064:	InData/test064.64.rdram.Z 
InData/test064.64.rdram.Z:	$(APP)
	gen_rdram 64 InData/test0064.64.rdram
	compress -f InData/test0064.64.rdram
#
#  Fractal terrain
#
test065:	InData/test065.65.rdram.Z InData/test065.65.rdram.Z
InData/test065.65.rdram.Z:	$(APP)
	gen_rdram 65 InData/test0065.65.rdram
	compress -f InData/test0065.65.rdram

#
#  Spinning Torus
#

test066:	InData/test066.16.rdram.Z InData/test066.16.rdram.Z

InData/test066.16.rdram.Z:	$(APP)
	$(EMULATE) -n -s -a "-a -m -s 66 16 -f 66 -n InData/test066" $(APP) rom
	compress -f InData/test066*.rdp

#
#  Spinning "U-64"
#
test067:	InData/test067.67.rdram.Z 

InData/test067.67.rdram.Z:	$(APP)
	$(EMULATE) -n -s -a "-a -m -o 67 -f 67 -n InData/test067" $(APP) rom
	compress -f InData/test067*.rdp
#
#  Texture Font Example
#
test068:	InData/test068.68.rdram.Z
InData/test068.68.rdram.Z:	$(APP)
	gen_rdram 68 InData/test0068.68.rdram
	compress -f InData/test0068.68.rdram

tests:	$(TESTS)

#
# Run a smaller subset of the total test coverage on a nightly basis.
#
nightly_regression: $(NIGHTLY_REGRESSION_TESTS)

#
# Run tests not run in nightly regression
#
other_tests: $(OTHER_TESTS)

#
# Only checkin archived versions of the .mem, .rdp files on a periodic, 
# on-demand basis (e.g. whenever an RSP simulator/ucode change affects the 
# output files mumble.mem or 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)