GNUmakefile 12 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
#!smake -k
#
# Makefile for RDP verification application test suite.
#

PRDEPTH = ../..

include $(PRDEPTH)/PRdefs

APP =		rdpverif

OPTIMIZER =	-g -D_HW_VERSION_2

TARGETS =	rom

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


TEXHFILES =

#
# These header files are generated by a data generation program
#
GENHFILES =

HFILES =	$(TEXHFILES) rdpverif.h

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

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

CODESEGMENT =	codesegment.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

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)

#
# Header files (textures)
#

RGBA16dana.h: ../rdpatt/Texture/dana_tiny.rgb
	$(RGB2C) -m RGBA16dana ../rdpatt/Texture/dana_tiny.rgb > RGBA16dana.h

RGBA8dana.h: ../rdpatt/Texture/dana_tiny.rgb
	$(RGB2C) -m RGBA8dana  -s 8 ../rdpatt/Texture/dana_tiny.rgb > RGBA8dana.h


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

#
# Header file build rules
#


#
# GENHFILES, use the data generation program 'cases'
#


#
# The program to build the above include files...
#
cases:	cases.c
	$(CC) -o $@ cases.c -lm

#
# 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/test001.1.rdp.Z.archive  \
	InData/test002.2.rdp.Z.archive  \
	InData/test003.3.rdp.Z.archive  \
	InData/test103.3.rdp.Z.archive  \
	InData/test004.4.rdp.Z.archive  \
	InData/test005.5.rdp.Z.archive  \
	InData/test105.5.rdp.Z.archive  \
	InData/test006.6.rdp.Z.archive  \
	InData/test007.7.rdp.Z.archive  \
	InData/test107.7.rdp.Z.archive  \
	InData/test010.10.rdp.Z.archive \
	InData/test011.11.rdp.Z.archive \
	InData/test013.13.rdp.Z.archive \
	InData/test014.14.rdp.Z.archive \
	InData/test114.14.rdp.Z.archive \
	InData/test015.15.rdp.Z.archive \
	InData/test016.16.rdp.Z.archive \
	InData/test017.17.rdp.Z.archive \
	InData/test911.811.rdp.Z.archive \
	InData/test917.817.rdp.Z.archive \
	InData/test119.19.rdp.Z.archive 

OTHER_TESTS_ARCHIVE =			\
	InData/test000.0.rdp.Z.archive

#
#  Load bug in tapeout1 hardware case
#
LOAD_BUG_ARCHIVE = \
	InData/test911.811.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}

test000:	InData/test000.0.rdp.Z InData/test000.0.rdram.Z

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

InData/test000.0.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 0 -f 0 -n InData/test000 -m" $(APP) rom

test001:	InData/test001.1.rdp.Z InData/test001.1.rdram.Z

InData/test001.1.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 1 -f 1 -m -n InData/test001" $(APP) rom
	compress -f InData/test001*.rdp

InData/test001.1.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 1 -f 1 -n InData/test001 -m" $(APP) rom

test002:	InData/test002.2.rdp.Z InData/test002.2.rdram.Z

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

InData/test002.2.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 2 -f 2 -n InData/test002 -m" $(APP) rom

test003:	InData/test003.3.rdp.Z InData/test003.3.rdram.Z

InData/test003.3.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 3 -f 3 -m -n InData/test003" $(APP) rom
	compress -f InData/test003*.rdp

InData/test003.3.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 3 -f 3 -n InData/test003 -m" $(APP) rom

test103:	InData/test103.3.rdp.Z InData/test103.3.rdram.Z

InData/test103.3.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 3 -f 3 -m -n InData/test103 -t" $(APP) rom
	compress -f InData/test103*.rdp

InData/test103.3.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 3 -f 3 -m -n InData/test103 -t" $(APP) rom

test004:	InData/test004.4.rdp.Z InData/test004.4.rdram.Z

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

InData/test004.4.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 4 -f 4 -n InData/test004 -m" $(APP) rom

test005:	InData/test005.5.rdp.Z InData/test005.5.rdram.Z

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

InData/test005.5.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 5 -f 5 -n InData/test005 -m" $(APP) rom

test105:	InData/test105.5.rdp.Z InData/test105.5.rdram.Z

InData/test105.5.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 5 -f 5 -m -n InData/test105 -t" $(APP) rom
	compress -f InData/test105*.rdp

InData/test105.5.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 5 -f 5 -m -n InData/test105 -t" $(APP) rom

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

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

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

test007:	InData/test007.7.rdp.Z InData/test007.7.rdram.Z

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

InData/test007.7.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 7 -f 7 -n InData/test007 -m" $(APP) rom

test107:	InData/test107.7.rdp.Z InData/test107.7.rdram.Z

InData/test107.7.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 7 -f 7 -m -n InData/test107 -t" $(APP) rom
	compress -f InData/test107*.rdp

InData/test107.7.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 7 -f 7 -m -n InData/test107 -t" $(APP) rom

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

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

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

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

InData/test110.10.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 10 -f 10 -m -n InData/test110 -t" $(APP) rom
	compress -f InData/test110*.rdp

InData/test110.10.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 10 -f 10 -m -n InData/test110 -t" $(APP) rom

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

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

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

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

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

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

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

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

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

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

InData/test114.14.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 14 -f 14 -m -n InData/test114 -t" $(APP) rom
	compress -f InData/test114*.rdp

InData/test114.14.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 14 -f 14 -m -n InData/test114 -t" $(APP) rom

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

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

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

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

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

InData/test016.16.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 16 -f 16 -n InData/test016 -m -F" $(APP) rom

test017:	InData/test017.17.rdp.Z InData/test017.17.rdram.Z

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

InData/test017.17.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 17 -f 17 -n InData/test017 -m" $(APP) rom

#
# virtually same as 117, with copy mode stuff deleted.
#
test119:	InData/test119.19.rdp.Z InData/test119.19.rdram.Z

InData/test119.19.rdp.Z:        $(APP)
	$(EMULATE) -n -s -a "-a -o 19 -f 19 -m -n InData/test119 -t" $(APP) rom
	compress -f InData/test119*.rdp

InData/test119.19.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 19 -f 19 -m -n InData/test119 -t" $(APP) rom


#
# load_tile test case (only ned rdram file)
#
test911:	InData/test911.811.rdram.Z

InData/test911.811.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 811 -f 811 -m -n InData/test911 -t" $(APP) rom


#
# load_tlut test case (only need the .rdram file)
#
test917:	InData/test917.817.rdram.Z

InData/test917.817.rdram.Z:        $(APP)
	$(EMULATE) -n -s -a "-d -a -o 817 -f 817 -m -n InData/test917 -t" $(APP) rom

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

#
# Scott & Nathan's old, familiar ms targets...
#

mtest001: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 1 -f 1 -m -n InData/test001" $(APP) rom

mtest002: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 2 -f 2 -m -n InData/test002" $(APP) rom

mtest003: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 3 -f 3 -m -n InData/test003" $(APP) rom

mtest004: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 4 -f 4 -m -n InData/test004" $(APP) rom

mtest005: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 5 -f 5 -m -n InData/test005" $(APP) rom

mtest006: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 6 -f 6 -m -n InData/test006" $(APP) rom

mtest007: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 7 -f 7 -m -n InData/test007" $(APP) rom

mtest010: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 10 -f 10 -m -n InData/test010" $(APP) rom

mtest011: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 11 -f 11 -m -n InData/test011" $(APP) rom

mtest012: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 12 -f 12 -m -n InData/test012" $(APP) rom

mtest013: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 13 -f 13 -m -n InData/test013" $(APP) rom

mtest014: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 14 -f 14 -m -n InData/test014" $(APP) rom

mtest015: $(APP)
	$(EMULATE) -n -s -a "-d -a -o 15 -f 14 -m -n InData/test015" $(APP) rom