1 # Makefile for regression testing the sky simulator.
8 exec_prefix = @
exec_prefix@
9 bindir = $(exec_prefix)/bin
11 host_alias
= @host_alias@
12 target_alias
= @target_alias@
13 program_transform_name
= @program_transform_name@
14 build_canonical
= @build@
15 host_canonical
= @host@
16 target_canonical
= @target@
17 target_cpu
= @target_cpu@
22 RPATH_ENVVAR
= @RPATH_ENVVAR@
24 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
25 echo $${rootme}/../../expect/expect ; \
26 else echo expect ; fi`
28 RUNTEST
= $(RUNTEST_FOR_TARGET
)
32 RUNTEST_FOR_TARGET
= `\
33 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
34 echo $${srcdir}/../../../dejagnu/runtest; \
36 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
39 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
44 if [ -x ${bindir}/dvp-elf-as ]; then \
45 echo ${bindir}/dvp-elf-as ; \
47 echo $(target_alias)-as ; \
50 DVPOBJCP_FOR_TARGET
= `\
51 if [ -x ${bindir}/dvp-elf-objcopy ]; then \
52 echo ${bindir}/dvp-elf-objcopy ; \
54 echo $(target_alias)-objcopy ; \
58 if [ -x ../../../gas/as-new ]; then \
59 echo ../../../gas/as-new ; \
61 echo $(target_alias)-as ; \
65 if [ -x ../../../ld/ld-new ]; then \
66 echo ../../../ld/ld-new ; \
68 echo $(target_alias)-ld ; \
75 if [ -x ../../../sim/mips/run ]; then \
76 echo ../../../sim/mips/run ; \
78 echo $(target_alias)-run ; \
82 if [ -x ../../../gcc/xgcc ]; then \
83 echo ../../../gcc/xgcc ; \
85 echo $(target_alias)-gcc ; \
88 C_GEN
= perl
$(srcdir)/c_gen.pl
90 # cpu time limit (in seconds)
93 .SUFFIXES
: .trc .c .run .ok \
94 .vif0out .vif0ok .vif0expect \
95 .vif1out .vif1ok .vif1expect \
96 .vuout .vuok .vuexpect \
102 t-pke2.vif1ok t-pke3.ok t-pke4.vif0ok \
103 tss08_0.ok tss08_1.ok \
104 tss16_0.ok tss16_1.ok \
105 tss32_0.ok tss32_1.ok \
106 tsv208_0.ok tsv208_1.ok \
107 tsv216_0.ok tsv216_1.ok \
108 tsv232_0.ok tsv232_1.ok \
109 tsv308_0.ok tsv308_1.ok \
110 tsv316_0.ok tsv316_1.ok \
111 tsv332_0.ok tsv332_1.ok \
112 tsv408_0.ok tsv408_1.ok \
113 tsv416_0.ok tsv416_1.ok \
114 tsv432_0.ok tsv432_1.ok \
115 t-cop2.vuok t-cop2b.ok
117 #SCE_TESTS := $(patsubst %.dvpasm, %.ok, $(wildcard sce*.dvpasm))
119 sce_test1.ok sce_test2.ok sce_test3.ok sce_test4.ok \
120 sce_test5.ok sce_test6.ok sce_test7.ok sce_test8.ok \
121 sce_test9.ok sce_test10.ok sce2_test11.ok sce2_test12.ok \
122 sce_test13.ok sce_test14.ok sce_test15.ok sce_test16.ok \
123 sce_test17.ok sce_test18.ok sce_test19.ok sce_test20.ok \
124 sce_test21.ok sce_test22.ok sce2_test23.ok sce_test24.ok \
125 sce_test25.ok sce_test26.ok sce_test27.ok sce_test28.ok \
126 sce_test29.ok sce_test30.ok sce_test31.ok sce_test32.ok \
127 sce_test33.ok sce_test34.ok sce_test35.ok sce_test36.ok \
128 sce_test37.ok sce_test38.ok sce_test39.ok sce_test40.ok \
129 sce_test41.ok sce_test42.ok sce_test43.ok sce_test44.ok \
130 sce_test45.ok sce_test46.ok sce_test47.ok sce_test48.ok \
131 sce_test49.ok sce_test50.ok sce_test51.ok sce_test52.ok \
132 sce_test53.ok sce_test54.ok sce_test55.ok sce_test56.ok \
133 sce_test57.ok sce_test58.ok sce_test59.ok
135 check: sanity
$(TESTS
)
136 check_sce
: sanity
$(SCE_TESTS
)
139 @eval echo AS_FOR_TARGET
= $(AS_FOR_TARGET
)
140 @eval echo LD_FOR_TARGET
= $(LD_FOR_TARGET
)
141 @eval echo RUN_FOR_TARGET
= $(RUN_FOR_TARGET
)
142 @eval echo GCC_FOR_TARGET
= $(GCC_FOR_TARGET
)
143 @eval echo DVPAS_FOR_TARGET
= $(DVPAS_FOR_TARGET
)
144 @eval echo DVPOBJCP_FOR_TARGET
= $(DVPOBJCP_FOR_TARGET
)
146 #------------------------------------
147 # Rules for building and running the SCE tests :
148 #------------------------------------
150 LDFLAGS
=-T
$(srcdir)/sky.
ld
151 CFLAGS
+= -g
-I
$(srcdir)
152 ASFLAGS
= -I
$(srcdir)
154 sce
%.exe
: sce
%.o sce_main.o refresh.o
155 $(GCC_FOR_TARGET
) $(CFLAGS
) $(LDFLAGS
) sce_main.o refresh.o
-o
$@
$<
157 sce_main.o
: sce_main.c
158 $(GCC_FOR_TARGET
) -c
$(CFLAGS
) -o
$@
$<
161 $(DVPAS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
163 sce_
%.o
: sce_
%.dvpasm sce_
%.vuasm
164 $(DVPAS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
166 sce2_
%.o
: sce2_
%.dvpasm sce2_
%.vubin
167 $(DVPAS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
169 sce2_
%.vubin
: sce2_
%.vu.o
170 $(DVPOBJCP_FOR_TARGET
) -O binary
$< $@
172 sce2_
%.vu.o
: sce2_
%.vuasm
173 $(DVPAS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
177 ulimit
-t
$(ULIMIT
) ; $(RUN_FOR_TARGET
) $< > sce
$*_our_gif.dat
; \
178 if
[ $$?
-ne
0 ]; then \
181 echo Running sce
$*.exe returns
$$?
> sce
$*.ok
;\
185 # diff -bitw sce$*_out_dif.dat sce$*_our_gif.dat > sce$*.ok; \
188 #------------------------
189 # Rules for running tests
190 #------------------------
194 ulimit
-t
$(ULIMIT
) ; $(RUN_FOR_TARGET
) $< > tmp-
$*
199 ulimit
-t
$(ULIMIT
) ; $(RUN_FOR_TARGET
) $< > tmp-
$* ; \
200 if
[ $$?
-ne
0 ] ; then \
207 diff
$(srcdir)/$*.vif0expect
$<
210 diff
$(srcdir)/$*.vif1expect
$<
213 diff
$(srcdir)/$*.vuexpect
$<
216 #------------------------------------
217 # Rules for building the TESTS
218 #------------------------------------
223 $(GCC_FOR_TARGET
) $(CFLAGS
) $(LDFLAGS
) -o
$@
$<
228 -env VIF0_TRACE_FILE
=$@
$(RUN_FOR_TARGET
) $<
231 -env VIF1_TRACE_FILE
=$@
$(RUN_FOR_TARGET
) $<
234 -env SKY_DEBUG
=inst_trace
$(RUN_FOR_TARGET
) $< > $@
237 $(AS_FOR_TARGET
) -mcpu
=r5900
-o
$@
$<
239 $(GCC_FOR_TARGET
) -S
-o
$@
$<
246 -rm -f
*~ core
*.o a.out
*.x
*.grt
247 -rm -f
*.vif
*out
*.ok tmp-
*
249 rm -f
$(SCE_TESTS
) sce
*our_gif.dat sce
*.exe
*.vubin a.raw
250 # if [ x"${SUBDIRS}" != x ] ; then \
251 # for dir in ${SUBDIRS}; \
254 # if [ -d $$dir ]; then \
255 # (cd $$dir; $(MAKE) clean); \
260 distclean maintainer-clean
realclean: clean
262 -rm -f Makefile config.status
*-init.exp
263 -rm -fr
*.log summary detail
*.plog
*.sum
*.psum site.
*
265 # if [ x"${SUBDIRS}" != x ] ; then \
266 # for dir in ${SUBDIRS}; \
269 # if [ -d $$dir ]; then \
270 # (cd $$dir; $(MAKE) distclean); \
275 Makefile
: Makefile.in config.status
276 $(SHELL
) config.status
278 config.status
: configure
279 $(SHELL
) config.status
--recheck