1 # Makefile for regression testing the sky simulator.
10 exec_prefix = @
exec_prefix@
12 host_alias
= @host_alias@
13 target_alias
= @target_alias@
14 program_transform_name
= @program_transform_name@
15 build_canonical
= @build@
16 host_canonical
= @host@
17 target_canonical
= @target@
18 target_cpu
= @target_cpu@
23 RPATH_ENVVAR
= @RPATH_ENVVAR@
25 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
26 echo $${rootme}/../../expect/expect ; \
27 else echo expect ; fi`
29 RUNTEST
= $(RUNTEST_FOR_TARGET
)
33 RUNTEST_FOR_TARGET
= `\
34 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
35 echo $${srcdir}/../../../dejagnu/runtest; \
37 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
40 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
46 if [ -x ../../../gas/as-new ]; then \
47 echo ../../../gas/as-new ; \
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 ../../../binutils/objcopy ]; then \
61 echo ../../../binutils/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
142 sce
%.exe
: sce
%.o sce_main.o refresh.o
143 $(GCC_FOR_TARGET
) $(CFLAGS
) $(LDFLAGS
) sce_main.o refresh.o
-o
$@
$<
145 sce_main.o
: sce_main.c
146 $(GCC_FOR_TARGET
) -c
$(CFLAGS
) -o
$@
$<
149 $(AS_FOR_TARGET
) -o
$@
$<
151 sce_
%.o
: sce_
%.dvpasm sce_
%.vuasm
152 $(AS_FOR_TARGET
) -o
$@
$<
154 sce2_
%.o
: sce2_
%.dvpasm sce2_
%.vubin
155 $(AS_FOR_TARGET
) -o
$@
$<
157 sce2_
%.vubin
: sce2_
%.vu.o
158 $(OBJCOPY_FOR_TARGET
) -O binary
$< $@
160 sce2_
%.vu.o
: sce2_
%.vuasm
161 $(AS_FOR_TARGET
) -o
$@
$<
165 ulimit
-t
30 ; $(RUN_FOR_TARGET
) $< > sce
$*_our_gif.dat
; \
166 if
[ $$?
-ne
0 ]; then \
167 echo Running sce
$*.exe returns
$$?
> sce
$*.ok
; \
169 diff
-bitw sce
$*_out_dif.dat sce
$*_our_gif.dat
> sce
$*.ok
; \
173 #------------------------------------
174 # Rules for running the TESTS
175 #------------------------------------
179 ulimit
-t
30 ; $(RUN_FOR_TARGET
) $< > tmp-
$*
184 ulimit
-t
30 ; $(RUN_FOR_TARGET
) $< > tmp-
$* ; \
185 if
[ $$?
-ne
0 ] ; then \
192 diff
$(srcdir)/$*.vif0expect
$<
195 diff
$(srcdir)/$*.vif1expect
$<
198 #------------------------------------
199 # Rules for building the TESTS
200 #------------------------------------
205 $(GCC_FOR_TARGET
) -T
$(srcdir)/sky.
ld -o
$@
$<
210 -env VIF0_TRACE_FILE
=$@
$(RUN_FOR_TARGET
) $<
213 -env VIF1_TRACE_FILE
=$@
$(RUN_FOR_TARGET
) $<
221 -rm -f
*~ core
*.o a.out
*.x
*.grt
222 -rm -f
*.vif
*out
*.ok tmp-
*
224 rm -f
$(SCE_TESTS
) sce
*our_gif.dat sce
*.exe a.raw
225 # if [ x"${SUBDIRS}" != x ] ; then \
226 # for dir in ${SUBDIRS}; \
229 # if [ -d $$dir ]; then \
230 # (cd $$dir; $(MAKE) clean); \
235 distclean maintainer-clean
realclean: clean
237 -rm -f Makefile config.status
*-init.exp
238 -rm -fr
*.log summary detail
*.plog
*.sum
*.psum site.
*
240 # if [ x"${SUBDIRS}" != x ] ; then \
241 # for dir in ${SUBDIRS}; \
244 # if [ -d $$dir ]; then \
245 # (cd $$dir; $(MAKE) distclean); \
250 Makefile
: Makefile.in config.status
251 $(SHELL
) config.status
253 config.status
: configure
254 $(SHELL
) config.status
--recheck