* sim/m32r/maclh1.cgs: Fix testcase.
[deliverable/binutils-gdb.git] / sim / testsuite / sky / Makefile.in
CommitLineData
559eba20
FCE
1# Makefile for regression testing the sky simulator.
2
559eba20
FCE
3VPATH = @srcdir@
4srcdir = @srcdir@
5srcroot = $(srcdir)/..
6
7prefix = @prefix@
8exec_prefix = @exec_prefix@
373df641 9bindir = $(exec_prefix)/bin
559eba20
FCE
10
11host_alias = @host_alias@
12target_alias = @target_alias@
13program_transform_name = @program_transform_name@
14build_canonical = @build@
15host_canonical = @host@
16target_canonical = @target@
17target_cpu = @target_cpu@
18
19
20SHELL = /bin/sh
21SUBDIRS = @subdirs@
22RPATH_ENVVAR = @RPATH_ENVVAR@
23
24EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
25 echo $${rootme}/../../expect/expect ; \
26 else echo expect ; fi`
27
28RUNTEST = $(RUNTEST_FOR_TARGET)
29
30RUNTESTFLAGS =
31
32RUNTEST_FOR_TARGET = `\
33 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
34 echo $${srcdir}/../../../dejagnu/runtest; \
35 else \
36 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
37 echo runtest; \
38 else \
39 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
40 fi; \
41 fi`
42
0dee6af2
FCE
43DVPAS_FOR_TARGET = `\
44 if [ -x ${bindir}/dvp-elf-as ]; then \
45 echo ${bindir}/dvp-elf-as ; \
46 else \
47 echo $(target_alias)-as ; \
48 fi`
49
356d8c8c
JY
50DVPOBJCP_FOR_TARGET = `\
51 if [ -x ${bindir}/dvp-elf-objcopy ]; then \
52 echo ${bindir}/dvp-elf-objcopy ; \
559eba20 53 else \
356d8c8c 54 echo $(target_alias)-objcopy ; \
559eba20 55 fi`
0dee6af2 56
356d8c8c 57AS_FOR_TARGET = `\
0dee6af2
FCE
58 if [ -x ../../../gas/as-new ]; then \
59 echo ../../../gas/as-new ; \
559eba20 60 else \
0dee6af2 61 echo $(target_alias)-as ; \
559eba20
FCE
62 fi`
63
356d8c8c
JY
64LD_FOR_TARGET = `\
65 if [ -x ../../../ld/ld-new ]; then \
66 echo ../../../ld/ld-new ; \
5087a605 67 else \
356d8c8c 68 echo $(target_alias)-ld ; \
5087a605
JY
69 fi`
70
71
fd909089 72RUNOPTS =
559eba20
FCE
73
74RUN_FOR_TARGET = `\
75 if [ -x ../../../sim/mips/run ]; then \
76 echo ../../../sim/mips/run ; \
77 else \
78 echo $(target_alias)-run ; \
79 fi` $(RUNOPTS)
80
81GCC_FOR_TARGET = `\
82 if [ -x ../../../gcc/xgcc ]; then \
83 echo ../../../gcc/xgcc ; \
84 else \
85 echo $(target_alias)-gcc ; \
86 fi`
87
08b28417 88C_GEN = perl $(srcdir)/c_gen.pl
559eba20 89
5087a605 90.SUFFIXES: .trc .c .run .ok \
1e83118b 91 .vif0out .vif0ok .vif0expect \
5087a605 92 .vif1out .vif1ok .vif1expect \
1e83118b 93 .vuout .vuok .vuexpect \
5087a605
JY
94 .uu \
95 .dvpasm .vuasm
559eba20
FCE
96
97TESTS = \
fc609c6c 98 t-dma.ok \
5087a605
JY
99 t-pke2.vif1ok t-pke3.ok t-pke4.vif0ok \
100 tss08_0.ok tss08_1.ok \
101 tss16_0.ok tss16_1.ok \
102 tss32_0.ok tss32_1.ok \
103 tsv208_0.ok tsv208_1.ok \
104 tsv216_0.ok tsv216_1.ok \
105 tsv232_0.ok tsv232_1.ok \
106 tsv308_0.ok tsv308_1.ok \
107 tsv316_0.ok tsv316_1.ok \
108 tsv332_0.ok tsv332_1.ok \
109 tsv408_0.ok tsv408_1.ok \
110 tsv416_0.ok tsv416_1.ok \
0dee6af2 111 tsv432_0.ok tsv432_1.ok \
1e83118b 112 t-cop2.vuok
5087a605
JY
113
114#SCE_TESTS := $(patsubst %.dvpasm, %.ok, $(wildcard sce*.dvpasm))
115SCE_TESTS = \
116 sce_test1.ok sce_test2.ok sce_test3.ok sce_test4.ok \
117 sce_test5.ok sce_test6.ok sce_test7.ok sce_test8.ok \
118 sce_test9.ok sce_test10.ok sce2_test11.ok sce2_test12.ok \
119 sce_test13.ok sce_test14.ok sce_test15.ok sce_test16.ok \
120 sce_test17.ok sce_test18.ok sce_test19.ok sce_test20.ok \
121 sce_test21.ok sce_test22.ok sce2_test23.ok sce_test24.ok \
122 sce_test25.ok sce_test26.ok sce_test27.ok sce_test28.ok \
123 sce_test29.ok sce_test30.ok sce_test31.ok sce_test32.ok \
124 sce_test33.ok sce_test34.ok sce_test35.ok sce_test36.ok \
125 sce_test37.ok sce_test38.ok sce_test39.ok sce_test40.ok \
126 sce_test41.ok sce_test42.ok sce_test43.ok sce_test44.ok \
127 sce_test45.ok sce_test46.ok sce_test47.ok sce_test48.ok \
128 sce_test49.ok sce_test50.ok sce_test51.ok sce_test52.ok \
129 sce_test53.ok sce_test54.ok sce_test55.ok sce_test56.ok \
130 sce_test57.ok sce_test58.ok sce_test59.ok
0dee6af2 131
356d8c8c
JY
132check: sanity $(TESTS)
133check_sce: sanity $(SCE_TESTS)
1d33e946 134
559eba20
FCE
135sanity:
136 @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
137 @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
138 @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
139 @eval echo GCC_FOR_TARGET = $(GCC_FOR_TARGET)
356d8c8c
JY
140 @eval echo DVPAS_FOR_TARGET = $(DVPAS_FOR_TARGET)
141 @eval echo DVPOBJCP_FOR_TARGET = $(DVPOBJCP_FOR_TARGET)
142
5087a605
JY
143#------------------------------------
144# Rules for building and running the SCE tests :
145#------------------------------------
559eba20 146
5087a605 147LDFLAGS=-T$(srcdir)/sky.ld
373df641 148CFLAGS += -I$(srcdir)
356d8c8c 149ASFLAGS = -I$(srcdir)
5087a605
JY
150
151sce%.exe: sce%.o sce_main.o refresh.o
152 $(GCC_FOR_TARGET) $(CFLAGS) $(LDFLAGS) sce_main.o refresh.o -o $@ $<
153
154sce_main.o: sce_main.c
155 $(GCC_FOR_TARGET) -c $(CFLAGS) -o $@ $<
0dee6af2 156
5087a605 157refresh.o: refresh.s
0dee6af2
FCE
158 $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
159
5087a605 160sce_%.o: sce_%.dvpasm sce_%.vuasm
0dee6af2 161 $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
5087a605
JY
162
163sce2_%.o: sce2_%.dvpasm sce2_%.vubin
0dee6af2 164 $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
5087a605
JY
165
166sce2_%.vubin: sce2_%.vu.o
356d8c8c 167 $(DVPOBJCP_FOR_TARGET) -O binary $< $@
0dee6af2 168
5087a605 169sce2_%.vu.o: sce2_%.vuasm
0dee6af2
FCE
170 $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
171
5087a605
JY
172sce%.ok: sce%.exe
173 rm -f sce$*.ok
4cc9cd54 174 ulimit -t 30 ; $(RUN_FOR_TARGET) $< > sce$*_our_gif.dat; \
5087a605 175 if [ $$? -ne 0 ]; then \
356d8c8c
JY
176 touch sce$*.ok; \
177 else \
178 echo Running sce$*.exe returns $$? > sce$*.ok ;\
179 fi
180
181# else \
182# diff -bitw sce$*_out_dif.dat sce$*_our_gif.dat > sce$*.ok; \
183# fi
5087a605 184
0dee6af2
FCE
185#------------------------
186# Rules for running tests
187#------------------------
559eba20
FCE
188
189.run.ok:
190 rm -f tmp-$* $*.hi
86a60941 191 ulimit -t 30 ; $(RUN_FOR_TARGET) $< > tmp-$*
559eba20
FCE
192 mv tmp-$* $*.ok
193.run.ko:
194 rm -f tmp-$* $*.ko
195 set +e ; \
86a60941 196 ulimit -t 30 ; $(RUN_FOR_TARGET) $< > tmp-$* ; \
559eba20
FCE
197 if [ $$? -ne 0 ] ; then \
198 exit 0 ; \
199 else \
200 exit 1 ; \
201 fi
202 mv tmp-$* $*.ko
203.vif0out.vif0ok:
8accf4df 204 diff $(srcdir)/$*.vif0expect $<
559eba20
FCE
205 touch $@
206.vif1out.vif1ok:
8accf4df 207 diff $(srcdir)/$*.vif1expect $<
559eba20 208 touch $@
1e83118b
FCE
209.vuout.vuok:
210 diff $(srcdir)/$*.vuexpect $<
211
559eba20 212
5087a605
JY
213#------------------------------------
214# Rules for building the TESTS
215#------------------------------------
0dee6af2 216
559eba20
FCE
217.trc.c:
218 $(C_GEN) $< $@
219.c.run:
fc609c6c 220 $(GCC_FOR_TARGET) -T$(srcdir)/sky.ld -o $@ $<
8accf4df
FCE
221.uu.run:
222 uudecode $< > $@
559eba20
FCE
223.run.vif0out:
224 rm -f $@
8accf4df 225 -env VIF0_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
559eba20
FCE
226.run.vif1out:
227 rm -f $@
8accf4df 228 -env VIF1_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
1e83118b
FCE
229.run.vuout:
230 rm -f $@
231 -env SKY_DEBUG=inst_trace $(RUN_FOR_TARGET) $< > $@
0dee6af2 232.s.run:
4118c63c 233 rm -f $@
0dee6af2 234 $(AS_FOR_TARGET) -mcpu=r5900 -o $@ $<
559eba20
FCE
235
236
237#
238# Standard
239#
240clean mostlyclean:
241 -rm -f *~ core *.o a.out *.x *.grt
242 -rm -f *.vif*out *.ok tmp-*
5087a605 243 rm -f $(TESTS)
356d8c8c 244 rm -f $(SCE_TESTS) sce*our_gif.dat sce*.exe *.vubin a.raw
559eba20
FCE
245# if [ x"${SUBDIRS}" != x ] ; then \
246# for dir in ${SUBDIRS}; \
247# do \
248# echo "$$dir:"; \
249# if [ -d $$dir ]; then \
250# (cd $$dir; $(MAKE) clean); \
251# fi; \
252# done ; \
253# else true; fi
254
255distclean maintainer-clean realclean: clean
256 -rm -f *~ core
257 -rm -f Makefile config.status *-init.exp
258 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
5087a605 259 -rm -f a.raw
559eba20
FCE
260# if [ x"${SUBDIRS}" != x ] ; then \
261# for dir in ${SUBDIRS}; \
262# do \
263# echo "$$dir:"; \
264# if [ -d $$dir ]; then \
265# (cd $$dir; $(MAKE) distclean); \
266# fi; \
267# done ; \
268# else true; fi
269
270Makefile : Makefile.in config.status
271 $(SHELL) config.status
272
273config.status: configure
274 $(SHELL) config.status --recheck
This page took 0.05194 seconds and 4 git commands to generate.