Makefile 14.1 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
#!smake -k
#
# Makefile for RDP verification application test suite.
#
include $(ROOT)/usr/include/make/PRdefs

TEXDIR =	$(ROOT)/PR/apps/rdpew/Texture

APP =		rdpverif
APP_EM =	rdpverif_em

OPTIMIZER =	-g

TARGETS =	rom rom_em

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

TEXHFILES =	RGBA16dana.h	\
		RGBA16grid.h 	\
		IA16Noise.h

HFILES =	$(TEXHFILES) rdpverif.h controller.h

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

DATAFILES =	zbuffer.c init.c static.c cfb.c
DATAOBJECTS =	$(DATAFILES:.c=.o)

CODESEGMENT =	codesegment.o
CODESEGMENT_EM = codesegment_em.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)
OBJECTS_EM =	$(CODESEGMENT_EM) $(DATAOBJECTS)

LCINCS =	-I. -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include
LCOPTS =	-fullwarn -non_shared -G 0

LDIRT  =	$(APP) $(APP_EM) rdpverif rdpverif_em \
		InData/test*Z InData/test*rdp $(TEXHFILES)

LDFLAGS_EM =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
			-lem -lultra_em

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

LCDEFS =

default:	$(TARGETS)

include $(COMMONRULES)

install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/rdpverif Makefile spec \
			$(HFILES) $(CODEFILES) $(DATAFILES)

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

$(CODESEGMENT_EM):	$(CODEOBJECTS_EM)
		$(LD) -o $(CODESEGMENT_EM) -r $(CODEOBJECTS_EM) $(LDFLAGS_EM)

$(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.
#
main.o: $(HFILES)
static.o: $(HFILES)

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

rom_em $(APP_EM):	spec_em $(OBJECTS_EM) $(MAKEROM)
		$(MAKEROM) -e -r rom_em spec_em

#
# Files specific to Hardware/Emulator
#

main.o: main.c
	$(CC) $(CFLAGS) $(LCDEFS) -c $< 

rdpverif.o: rdpverif.c
	$(CC) $(CFLAGS) $(LCDEFS) -c $< 

static.o: static.c
	$(CC) $(CFLAGS) $(LCDEFS) -c $< 

main_em.o: main.c
	$(CC) $(CFLAGS) $(LCDEFS) -D_EMULATOR -o $*.o -c main.c

#
# ADD TEST CASE:
#
# Note: due to fopen() restrictions in the rsp simulator, the
# directory you send the output to must exist before running...
#
# Temporarily/permanently removed from nightly regression suite:
#
#	InData/test012.12.rdp.Z.archive \
#	InData/test014.14.rdp.Z.archive \
#	InData/test015.15.rdp.Z.archive \
#	InData/test022.22.rdp.Z.archive \
#	InData/test023.23.rdp.Z.archive \
#
#

NIGHTLY_REGRESSION_TEST_ARCHIVE = 	\
	InData/test016.16.rdp.Z.archive \
	InData/test026.26.rdp.Z.archive \
	InData/test040.40.rdp.Z.archive \
	InData/test116.16.rdp.Z.archive \
	InData/test126.26.rdp.Z.archive

OTHER_TESTS_ARCHIVE =	\
	InData/test002.02.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/test014.14.rdp.Z.archive \
	InData/test015.15.rdp.Z.archive \
	InData/test017.17.rdp.Z.archive \
	InData/test018.18.rdp.Z.archive \
	InData/test019.19.rdp.Z.archive \
	InData/test020.20.rdp.Z.archive \
	InData/test021.21.rdp.Z.archive \
	InData/test022.22.rdp.Z.archive \
	InData/test023.23.rdp.Z.archive \
	InData/test024.24.rdp.Z.archive \
	InData/test025.25.rdp.Z.archive \
	InData/test030.30.rdp.Z.archive \
	InData/test031.31.rdp.Z.archive \
	InData/test032.32.rdp.Z.archive \
	InData/test033.33.rdp.Z.archive \
	InData/test034.34.rdp.Z.archive

#
#  'Backward span' test cases - specific triangles that will cause
#  memspan to hang unless spans are rejected by the edge walker.  
#  test500 is the 'good', right major triangle that the other 5XX 
#  cases are based on.
#
#  501-503 = bad spans at top of triangle
#  504-507 = bad spans in middle of triangle
#  508-511 = bad spans at bottom of triangle
#  512     = bad spans at top and middle
#  513     = bad spans at top and bottom
#
HANG_TARGET_ARCHIVE = \
	InData/test500.400.rdram.Z.archive \
	InData/test501.401.rdram.Z.archive \
	InData/test502.402.rdram.Z.archive \
	InData/test503.403.rdram.Z.archive \
	InData/test504.404.rdram.Z.archive \
	InData/test505.405.rdram.Z.archive \
	InData/test506.406.rdram.Z.archive \
	InData/test507.407.rdram.Z.archive \
	InData/test508.408.rdram.Z.archive \
	InData/test509.409.rdram.Z.archive \
	InData/test510.410.rdram.Z.archive \
	InData/test511.411.rdram.Z.archive \
	InData/test512.412.rdram.Z.archive \
	InData/test513.413.rdram.Z.archive

#
#  More 'backward span' tests from the random triangle app.
#
#
HANG_RANDOM_ARCHIVE = \
	InData/test200.100.rdram.Z.archive \
	InData/test201.101.rdram.Z.archive \
	InData/test202.102.rdram.Z.archive \
	InData/test203.103.rdram.Z.archive \
	InData/test204.104.rdram.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: $(TEXDIR)/dana_tiny.rgb
	$(RGB2C) -m RGBA16dana $(TEXDIR)/dana_tiny.rgb > RGBA16dana.h

RGBA16grid.h: $(TEXDIR)/grid.rgb
	$(RGB2C) -m RGBA16grid $(TEXDIR)/grid.rgb > RGBA16grid.h

IA16Noise.h: $(TEXDIR)/Noise.rgb
	$(RGB2C) -f I -s 8 -m IA16Noise $(TEXDIR)/Noise.rgb > IA16Noise.h


test000:	InData/test000.0.rdp.Z

InData/test000.0.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 0 -n InData/test000" $(APP_EM) rom_em
	compress -f InData/test000*.rdp

test002:	InData/test002.2.rdp.Z

InData/test002.2.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 2 -n InData/test002" $(APP_EM) rom_em
	compress -f InData/test002*.rdp

test004:	InData/test004.4.rdp.Z

InData/test004.4.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 4 -o 4 -n InData/test004" $(APP_EM) rom_em
	compress -f InData/test004*.rdp

test005:	InData/test005.5.rdp.Z

InData/test005.5.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 5 -o 5 -n InData/test005" $(APP_EM) rom_em
	compress -f InData/test005*.rdp

test006:	InData/test006.6.rdp.Z InData/test006.6.rdram.Z

InData/test006.6.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 6 -o 6 -n InData/test006" $(APP_EM) rom_em
	compress -f InData/test006*.rdp

InData/test006.6.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 6 -o 6 -n InData/test006" $(APP_EM) rom_em

test007:	InData/test007.7.rdp.Z

InData/test007.7.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 7 -n InData/test007" $(APP_EM) rom_em
	compress -f InData/test007*.rdp

test008:	InData/test008.8.rdp.Z

InData/test008.8.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 8 -n InData/test008" $(APP_EM) rom_em
	compress -f InData/test008*.rdp

test009:	InData/test009.9.rdp.Z

InData/test009.9.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 9 -n InData/test009" $(APP_EM) rom_em
	compress -f InData/test009*.rdp

test010:	InData/test010.10.rdp.Z InData/test010.10.rdram.Z

InData/test010.10.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 10 -o 10 -n InData/test010" $(APP_EM) rom_em
	compress -f InData/test010*.rdp

InData/test010.10.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 10 -o 10 -n InData/test010" $(APP_EM) rom_em

test011:	InData/test011.11.rdp.Z InData/test011.11.rdram.Z

InData/test011.11.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 11 -o 11 -n InData/test011" $(APP_EM) rom_em
	compress -f InData/test011*.rdp

InData/test011.11.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 11 -o 11 -n InData/test011" $(APP_EM) rom_em

test012:	InData/test012.12.rdp.Z InData/test012.12.rdram.Z

InData/test012.12.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 12 -o 12 -n InData/test012" $(APP_EM) rom_em
	compress -f InData/test012*.rdp

InData/test012.12.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 12 -o 12 -n InData/test012" $(APP_EM) rom_em

test013:	InData/test013.13.rdp.Z InData/test013.13.rdram.Z

InData/test013.13.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 13 -o 13 -n InData/test013" $(APP_EM) rom_em
	compress -f InData/test013*.rdp

InData/test013.13.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 13 -o 13 -n InData/test013" $(APP_EM) rom_em

test014:	InData/test014.14.rdp.Z InData/test014.14.rdram.Z

InData/test014.14.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 14 -o 14 -n InData/test014" $(APP_EM) rom_em
	compress -f InData/test014*.rdp

InData/test014.14.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 14 -o 14 -n InData/test014" $(APP_EM) rom_em

test015:	InData/test015.15.rdp.Z InData/test015.15.rdram.Z

InData/test015.15.rdp.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 15 -o 15 -n InData/test015" $(APP_EM) rom_em
	compress -f InData/test015*.rdp

InData/test015.15.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 15 -o 15 -n InData/test015" $(APP_EM) rom_em

test016:	InData/test016.16.rdp.Z InData/test016.16.rdram.Z

InData/test016.16.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 16 -n InData/test016" $(APP_EM) rom_em
	compress -f InData/test016*.rdp

InData/test016.16.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -m -o 16 -n InData/test016" $(APP_EM) rom_em

test116:	InData/test116.16.rdp.Z InData/test116.16.rdram.Z

InData/test116.16.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 16 -n InData/test116 -t" $(APP_EM) rom_em
	compress -f InData/test116*.rdp

InData/test116.16.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -m -o 16 -n InData/test116 -t" $(APP_EM) rom_em

test017:	InData/test017.17.rdp.Z

InData/test017.17.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 17 -n InData/test017" $(APP_EM) rom_em
	compress -f InData/test017*.rdp

test018:	InData/test018.18.rdp.Z

InData/test018.18.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 18 -n InData/test018" $(APP_EM) rom_em
	compress -f InData/test018*.rdp

test019:	InData/test019.19.rdp.Z InData/test019.19.rdram.Z

InData/test019.19.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -f 19 -o 19 -n InData/test019 -t" $(APP_EM) rom_em
	compress -f InData/test019*.rdp

InData/test019.19.rdram.Z:	$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -f 19 -o 19 -n InData/test019 -t" $(APP_EM) rom_em

test020:	InData/test020.20.rdp.Z

InData/test020.20.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 20 -n InData/test020" $(APP_EM) rom_em
	compress -f InData/test020*.rdp

test021:	InData/test021.21.rdp.Z

InData/test021.21.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 21 -n InData/test021" $(APP_EM) rom_em
	compress -f InData/test021*.rdp

test022:	InData/test022.22.rdp.Z InData/test022.22.rdram.Z

InData/test022.22.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 22 -n InData/test022" $(APP_EM) rom_em
	compress -f InData/test022.22.rdp

InData/test022.22.rdram.Z:
	$(EMULATE) -n -s -a "-m -a -d -m -o 22 -n InData/test022" $(APP_EM) rom_em

test023:	InData/test023.23.rdp.Z InData/test023.23.rdram.Z

InData/test023.23.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 23 -n InData/test023" $(APP_EM) rom_em
	compress -f InData/test023.23.rdp

InData/test023.23.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -d -m -o 23 -n InData/test023" $(APP_EM) rom_em

test024:	InData/test024.24.rdp.Z InData/test024.24.rdram.Z

InData/test024.24.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 24 -n InData/test024" $(APP_EM) rom_em
	compress -f InData/test024*.rdp

InData/test024.24.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-a -d -m -o 24 -n InData/test024" $(APP_EM) rom_em

test025:	InData/test025.25.rdp.Z

InData/test025.25.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 25 -n InData/test025" $(APP_EM) rom_em
	compress -f InData/test025*.rdp

test026:	InData/test026.26.rdp.Z InData/test026.26.rdram.Z

InData/test026.26.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 26 -n InData/test026" $(APP_EM) rom_em
	compress -f InData/test026*.rdp

InData/test026.26.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-a -d -m -o 26 -n InData/test026" $(APP_EM) rom_em

test126:	InData/test126.26.rdp.Z InData/test126.26.rdram.Z

InData/test126.26.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 26 -n InData/test126 -t" $(APP_EM) rom_em
	compress -f InData/test126*.rdp

InData/test126.26.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-a -d -m -o 26 -n InData/test126 -t" $(APP_EM) rom_em

test030:	InData/test030.30.rdp.Z

InData/test030.30.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 30 -n InData/test030" $(APP_EM) rom_em
	compress -f InData/test030*.rdp

test031:	InData/test031.31.rdp.Z

InData/test031.31.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 31 -n InData/test031" $(APP_EM) rom_em
	compress -f InData/test031*.rdp

test032:	InData/test032.32.rdp.Z

InData/test032.32.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 32 -n InData/test032" $(APP_EM) rom_em
	compress -f InData/test032*.rdp

test033:	InData/test033.33.rdp.Z

InData/test033.33.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 33 -n InData/test033" $(APP_EM) rom_em
	compress -f InData/test033*.rdp

test034:	InData/test034.34.rdp.Z

InData/test034.34.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 34 -n InData/test034" $(APP_EM) rom_em
	compress -f InData/test034*.rdp

#
#  Qsim test of RDP
#
test040:	InData/test040.40.rdp.Z InData/test040.40.rdram.Z

InData/test040.40.rdp.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-m -a -o 40 -n InData/test040" $(APP_EM) rom_em
	compress -f InData/test040*.rdp

InData/test040.40.rdram.Z:		$(APP_EM)
	$(EMULATE) -n -s -a "-d -m -a -o 40 -n InData/test040" $(APP_EM) rom_em

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)