Makefile 3.2 KB
#!smake -k
# --------------------------------------------------------------------
#        Copyright (C) 1997 Nintendo. (Originated by SGI)
#        
#        $RCSfile: Makefile,v $
#        $Revision: 1.1.1.1 $
#        $Date: 2002/05/02 03:27:21 $
# --------------------------------------------------------------------
#
# Makefile for RSP verification application test suite.
#

PRDEPTH = ../..

include $(PRDEPTH)/PRdefs

APP =		rspverif

OPTIMIZER =	-g

TARGETS =	rom

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

TEXHFILES =

HFILES =	rspverif.h

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

DATAFILES =	dynamic.c 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
LCOPTS =	-fullwarn -non_shared -G 0

LDIRT  =	$(APP) rspverif $(GENHFILES) InData/test*Z $(TEXHFILES)

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

default:	$(TARGETS)

include $(COMMONRULES)

#
# what does it mean to 'install' this thing?
#
install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/demos/$(APP) rspverif \
			$(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) -e -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 =

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

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

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



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)