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; \
43 # Note: we want to use dvp-elf-as for the SKY testcase,
44 # not the mips64r5900 one.
46 if [ -x ${bindir}/dvp-elf-as ]; then \
47 echo ${bindir}/dvp-elf-as ; \
49 echo $(target_alias)-as ; \
53 if [ -x ../../../ld/ld-new ]; then \
54 echo ../../../ld/ld-new ; \
56 echo $(target_alias)-ld ; \
59 OBJCOPY_FOR_TARGET
= `\
60 if [ -x ${bindir}/dvp-elf-objcopy ]; then \
61 echo ${bindir}/dvp-elf-objcopy ; \
63 echo $(target_alias)-objcopy ; \
71 if [ -x ../../../sim/mips/run ]; then \
72 echo ../../../sim/mips/run ; \
74 echo $(target_alias)-run ; \
78 if [ -x ../../../gcc/xgcc ]; then \
79 echo ../../../gcc/xgcc ; \
81 echo $(target_alias)-gcc ; \
84 C_GEN
= perl
$(srcdir)/c_gen.pl
86 .SUFFIXES
: .trc .c .run .ok \
89 .vif1out .vif1ok .vif1expect \
95 t-pke2.vif1ok t-pke3.ok t-pke4.vif0ok \
96 tss08_0.ok tss08_1.ok \
97 tss16_0.ok tss16_1.ok \
98 tss32_0.ok tss32_1.ok \
99 tsv208_0.ok tsv208_1.ok \
100 tsv216_0.ok tsv216_1.ok \
101 tsv232_0.ok tsv232_1.ok \
102 tsv308_0.ok tsv308_1.ok \
103 tsv316_0.ok tsv316_1.ok \
104 tsv332_0.ok tsv332_1.ok \
105 tsv408_0.ok tsv408_1.ok \
106 tsv416_0.ok tsv416_1.ok \
107 tsv432_0.ok tsv432_1.ok
109 #SCE_TESTS := $(patsubst %.dvpasm, %.ok, $(wildcard sce*.dvpasm))
111 sce_test1.ok sce_test2.ok sce_test3.ok sce_test4.ok \
112 sce_test5.ok sce_test6.ok sce_test7.ok sce_test8.ok \
113 sce_test9.ok sce_test10.ok sce2_test11.ok sce2_test12.ok \
114 sce_test13.ok sce_test14.ok sce_test15.ok sce_test16.ok \
115 sce_test17.ok sce_test18.ok sce_test19.ok sce_test20.ok \
116 sce_test21.ok sce_test22.ok sce2_test23.ok sce_test24.ok \
117 sce_test25.ok sce_test26.ok sce_test27.ok sce_test28.ok \
118 sce_test29.ok sce_test30.ok sce_test31.ok sce_test32.ok \
119 sce_test33.ok sce_test34.ok sce_test35.ok sce_test36.ok \
120 sce_test37.ok sce_test38.ok sce_test39.ok sce_test40.ok \
121 sce_test41.ok sce_test42.ok sce_test43.ok sce_test44.ok \
122 sce_test45.ok sce_test46.ok sce_test47.ok sce_test48.ok \
123 sce_test49.ok sce_test50.ok sce_test51.ok sce_test52.ok \
124 sce_test53.ok sce_test54.ok sce_test55.ok sce_test56.ok \
125 sce_test57.ok sce_test58.ok sce_test59.ok
127 check: sanity
$(TESTS
) $(SCE_TESTS
)
130 @eval echo AS_FOR_TARGET
= $(AS_FOR_TARGET
)
131 @eval echo LD_FOR_TARGET
= $(LD_FOR_TARGET
)
132 @eval echo OBJCOPY_FOR_TARGET
= $(OBJCOPY_FOR_TARGET
)
133 @eval echo RUN_FOR_TARGET
= $(RUN_FOR_TARGET
)
134 @eval echo GCC_FOR_TARGET
= $(GCC_FOR_TARGET
)
136 #------------------------------------
137 # Rules for building and running the SCE tests :
138 #------------------------------------
140 LDFLAGS
=-T
$(srcdir)/sky.
ld
141 CFLAGS
+= -I
$(srcdir)
142 ASFLAGS
= -a
-I
$(srcdir)
144 sce
%.exe
: sce
%.o sce_main.o refresh.o
145 $(GCC_FOR_TARGET
) $(CFLAGS
) $(LDFLAGS
) sce_main.o refresh.o
-o
$@
$<
147 sce_main.o
: sce_main.c
148 $(GCC_FOR_TARGET
) -c
$(CFLAGS
) -o
$@
$<
151 $(AS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
153 sce_
%.o
: sce_
%.dvpasm sce_
%.vuasm
154 $(AS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
156 sce2_
%.o
: sce2_
%.dvpasm sce2_
%.vubin
157 $(AS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
159 sce2_
%.vubin
: sce2_
%.vu.o
160 $(OBJCOPY_FOR_TARGET
) -O binary
$< $@
162 sce2_
%.vu.o
: sce2_
%.vuasm
163 $(AS_FOR_TARGET
) $(ASFLAGS
) -o
$@
$<
167 ulimit
-t
30 ; $(RUN_FOR_TARGET
) $< > sce
$*_our_gif.dat
; \
168 if
[ $$?
-ne
0 ]; then \
169 echo Running sce
$*.exe returns
$$?
> sce
$*.ok
; \
171 diff
-bitw sce
$*_out_dif.dat sce
$*_our_gif.dat
> sce
$*.ok
; \
175 #------------------------------------
176 # Rules for running the TESTS
177 #------------------------------------
181 ulimit
-t
30 ; $(RUN_FOR_TARGET
) $< > tmp-
$*
186 ulimit
-t
30 ; $(RUN_FOR_TARGET
) $< > tmp-
$* ; \
187 if
[ $$?
-ne
0 ] ; then \
194 diff
$(srcdir)/$*.vif0expect
$<
197 diff
$(srcdir)/$*.vif1expect
$<
200 #------------------------------------
201 # Rules for building the TESTS
202 #------------------------------------
207 $(GCC_FOR_TARGET
) -T
$(srcdir)/sky.
ld -o
$@
$<
212 -env VIF0_TRACE_FILE
=$@
$(RUN_FOR_TARGET
) $<
215 -env VIF1_TRACE_FILE
=$@
$(RUN_FOR_TARGET
) $<
223 -rm -f
*~ core
*.o a.out
*.x
*.grt
224 -rm -f
*.vif
*out
*.ok tmp-
*
226 rm -f
$(SCE_TESTS
) sce
*our_gif.dat sce
*.exe a.raw
227 # if [ x"${SUBDIRS}" != x ] ; then \
228 # for dir in ${SUBDIRS}; \
231 # if [ -d $$dir ]; then \
232 # (cd $$dir; $(MAKE) clean); \
237 distclean maintainer-clean
realclean: clean
239 -rm -f Makefile config.status
*-init.exp
240 -rm -fr
*.log summary detail
*.plog
*.sum
*.psum site.
*
242 # if [ x"${SUBDIRS}" != x ] ; then \
243 # for dir in ${SUBDIRS}; \
246 # if [ -d $$dir ]; then \
247 # (cd $$dir; $(MAKE) distclean); \
252 Makefile
: Makefile.in config.status
253 $(SHELL
) config.status
255 config.status
: configure
256 $(SHELL
) config.status
--recheck