Makefile
3.2 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
#!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)