aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/sky/Makefile.in
blob: eb504576db1cce643126785541ab572dbb6ec911 (plain)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# Makefile for regression testing the sky simulator.


VPATH = @srcdir@
srcdir = @srcdir@
srcroot = $(srcdir)/..

prefix = @prefix@
exec_prefix = @exec_prefix@

host_alias = @host_alias@
target_alias = @target_alias@
program_transform_name = @program_transform_name@
build_canonical = @build@
host_canonical = @host@
target_canonical = @target@
target_cpu = @target_cpu@


SHELL = /bin/sh
SUBDIRS = @subdirs@
RPATH_ENVVAR = @RPATH_ENVVAR@

EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
          echo $${rootme}/../../expect/expect ; \
          else echo expect ; fi`

RUNTEST = $(RUNTEST_FOR_TARGET)

RUNTESTFLAGS =

RUNTEST_FOR_TARGET = `\
  if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
    echo $${srcdir}/../../../dejagnu/runtest; \
  else \
    if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
      echo runtest; \
    else \
      t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
    fi; \
  fi`


AS_FOR_TARGET = `\
  if [ -x ../../../gas/as-new ]; then \
    echo ../../../gas/as-new ; \
  else \
    echo $(target_alias)-as ; \
  fi`

LD_FOR_TARGET = `\
  if [ -x ../../../ld/ld-new ]; then \
    echo ../../../ld/ld-new ; \
  else \
    echo $(target_alias)-ld ; \
  fi`

RUNOPTS = 

RUN_FOR_TARGET = `\
  if [ -x ../../../sim/mips/run ]; then \
    echo ../../../sim/mips/run ; \
  else \
    echo $(target_alias)-run ; \
  fi` $(RUNOPTS)

GCC_FOR_TARGET = `\
  if [ -x ../../../gcc/xgcc ]; then \
    echo ../../../gcc/xgcc ; \
  else \
    echo $(target_alias)-gcc ; \
  fi`

C_GEN = /build/sky-tools/c_gen.pl

.SUFFIXES: .trc .c .run .ok .vif0out .vif0ok .vif0expect .vif1out .vif1ok .vif1expect .uu

TESTS = \
	t-pke1.vif0ok \
	t-pke2.vif1ok \
	t-pke3.ok \
	t-pke4.vif0ok \
	tss08_0.ok \
	tss08_1.ok \
	tss16_0.ok \
	tss16_1.ok \
	tss32_0.ok \
	tss32_1.ok \
	tsv208_0.ok \
	tsv208_1.ok \
	tsv216_0.ok \
	tsv216_1.ok \
	tsv232_0.ok \
	tsv232_1.ok \
	tsv308_0.ok \
	tsv308_1.ok \
	tsv316_0.ok \
	tsv316_1.ok \
	tsv332_0.ok \
	tsv332_1.ok \
	tsv408_0.ok \
	tsv408_1.ok \
	tsv416_0.ok \
	tsv416_1.ok \
	tsv432_0.ok \
	tsv432_1.ok


check: sanity 
	-$(MAKE) -k $(TESTS)
sanity:
	@eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
	@eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
	@eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
	@eval echo GCC_FOR_TARGET = $(GCC_FOR_TARGET)


# Rules for running the tests

.run.ok:
	rm -f tmp-$* $*.hi
	ulimit -t 30 ; $(RUN_FOR_TARGET) $< > tmp-$*
	mv tmp-$* $*.ok
.run.ko:
	rm -f tmp-$* $*.ko
	set +e ; \
	ulimit -t 30 ; $(RUN_FOR_TARGET) $< > tmp-$* ; \
	if [ $$? -ne 0 ] ; then \
	  exit 0 ; \
	else \
	  exit 1 ; \
	fi
	mv tmp-$* $*.ko
.vif0out.vif0ok:
	diff $(srcdir)/$*.vif0expect $<
	touch $@
.vif1out.vif1ok:
	diff $(srcdir)/$*.vif1expect $<
	touch $@

# Rules for building all the tests

.trc.c:
	$(C_GEN) $< $@
.c.run:
	$(GCC_FOR_TARGET) -Tr5900.ld -o $@ $<
.uu.run:
	uudecode $< > $@
.run.vif0out:
	rm -f $@
	-env VIF0_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
.run.vif1out:
	rm -f $@
	-env VIF1_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<



#
# Standard
#
clean mostlyclean:
	-rm -f *~ core *.o a.out *.x *.grt
	-rm -f *.vif*out *.ok tmp-*
	rm -f $(TESTS)
#	if [ x"${SUBDIRS}" != x ] ; then \
#	    for dir in ${SUBDIRS}; \
#	    do \
#		    echo "$$dir:"; \
#		    if [ -d $$dir ]; then \
#			    (cd $$dir; $(MAKE) clean); \
#		    fi; \
#	    done ; \
#	else true; fi

distclean maintainer-clean realclean: clean
	-rm -f *~ core
	-rm -f Makefile config.status *-init.exp
	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
#	if [ x"${SUBDIRS}" != x ] ; then \
#	    for dir in ${SUBDIRS}; \
#	    do \
#		    echo "$$dir:"; \
#		    if [ -d $$dir ]; then \
#			    (cd $$dir; $(MAKE) distclean); \
#		    fi; \
#	    done ; \
#	else true; fi

Makefile : Makefile.in config.status
	$(SHELL) config.status

config.status: configure
	$(SHELL) config.status --recheck