]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/d10v-elf/Makefile.in
For "mulxu", store unsigned product in ACC.
[thirdparty/binutils-gdb.git] / sim / testsuite / d10v-elf / Makefile.in
1 # Makefile for regression testing the GNU debugger.
2 # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3
4 # This file is part of GDB.
5
6 # GDB is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # GDB is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 VPATH = @srcdir@
21 srcdir = @srcdir@
22 srcroot = $(srcdir)/..
23
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
26
27 host_alias = @host_alias@
28 target_alias = @target_alias@
29 program_transform_name = @program_transform_name@
30 build_canonical = @build@
31 host_canonical = @host@
32 target_canonical = @target@
33 target_cpu = @target_cpu@
34
35
36 SHELL = /bin/sh
37 SUBDIRS = @subdirs@
38 RPATH_ENVVAR = @RPATH_ENVVAR@
39
40 TESTS = \
41 exit47.ko \
42 hello.hi \
43 t-mac.ok \
44 t-mvtac.ok \
45 t-mulxu.ok \
46 t-rachi.ok \
47 t-rep.ok \
48 t-sub2w.ok \
49 t-subi.ok \
50 #
51
52 AS_FOR_TARGET = `\
53 if [ -x ../../../gas/as-new ]; then \
54 echo ../../../gas/as-new ; \
55 else \
56 echo $(target_alias)-as ; \
57 fi`
58
59 LD_FOR_TARGET = `\
60 if [ -x ../../../ld/ld-new ]; then \
61 echo ../../../ld/ld-new ; \
62 else \
63 echo $(target_alias)-ld ; \
64 fi`
65
66 RUN_FOR_TARGET = `\
67 if [ -x ../../../sim/d10v/run ]; then \
68 echo ../../../sim/d10v/run ; \
69 else \
70 echo $(target_alias)-run ; \
71 fi`
72
73
74 check: sanity $(TESTS)
75 sanity:
76 @eval echo AS_FOR_TARGET=$(AS_FOR_TARGET)
77 @eval echo LD_FOR_TARGET=$(LD_FOR_TARGET)
78 @eval echo RUN_FOR_TARGET=$(RUN_FOR_TARGET)
79
80 clean:
81 rm -f $(TESTS)
82 rm -f *.run *.o
83 rm -f core *.core
84
85 # Rules for running the tests
86
87 .SUFFIXES: .ok .run .hi .ko .ti
88 .run.ok:
89 rm -f tmp-$* $*.hi
90 ulimit -t 5 ; \
91 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
92 mv tmp-$* $*.ok
93 .run.hi:
94 rm -f tmp-$* $*.hi diff-$*
95 ulimit -t 5 ; \
96 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
97 echo 'Hello World!' | diff - tmp-$* > diff-$*
98 cat tmp-$* diff-$* > $*.hi
99 .run.ko:
100 rm -f tmp-$* $*.ko
101 set +e ; \
102 ulimit -t 5 ; \
103 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
104 if [ $$? -eq 47 ] ; then \
105 exit 0 ; \
106 else \
107 exit 1 ; \
108 fi
109 mv tmp-$* $*.ko
110 .run.ti:
111 rm -f tmp-$* $*.ti
112 set +e ; \
113 ulimit -t 5 ; \
114 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
115 test `cat tmp-$* | wc -l` -eq 10 < /dev/null
116 test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
117 mv tmp-$* $*.ti
118
119
120 # Rules for building the test
121 # Preference is for obtaining the executable (.run) from a prebuilt image
122
123 .SUFFIXES: .uue .s .S .run
124 .uue.run:
125 head $* | grep $*.run > /dev/null
126 uudecode $*.uue
127 .run.u:
128 uuencode < $*.run $*.run > $*.u
129 .o.run:
130 $(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
131 .s.o:
132 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
133 .S.o:
134 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
135
136
137 Makefile: Makefile.in config.status
138 $(SHELL) ./config.status
139
140 config.status: configure
141 $(SHELL) ./config.status --recheck