]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/d10v-elf/Makefile.in
Add DM (bit 4) to PSW. See 7-1 for more info.
[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-mvtc.ok \
46 t-msbu.ok \
47 t-mulxu.ok \
48 t-rac.ok \
49 t-rachi.ok \
50 t-rep.ok \
51 t-sub2w.ok \
52 t-sub.ok \
53 t-subi.ok \
54 #
55
56 AS_FOR_TARGET = `\
57 if [ -x ../../../gas/as-new ]; then \
58 echo ../../../gas/as-new ; \
59 else \
60 echo $(target_alias)-as ; \
61 fi`
62
63 LD_FOR_TARGET = `\
64 if [ -x ../../../ld/ld-new ]; then \
65 echo ../../../ld/ld-new ; \
66 else \
67 echo $(target_alias)-ld ; \
68 fi`
69
70 RUN_FOR_TARGET = `\
71 if [ -x ../../../sim/d10v/run ]; then \
72 echo ../../../sim/d10v/run ; \
73 else \
74 echo $(target_alias)-run ; \
75 fi`
76
77
78 check: sanity $(TESTS)
79 sanity:
80 @eval echo AS_FOR_TARGET=$(AS_FOR_TARGET)
81 @eval echo LD_FOR_TARGET=$(LD_FOR_TARGET)
82 @eval echo RUN_FOR_TARGET=$(RUN_FOR_TARGET)
83
84 clean:
85 rm -f $(TESTS)
86 rm -f *.run *.o
87 rm -f core *.core
88
89 # Rules for running the tests
90
91 .SUFFIXES: .ok .run .hi .ko .ti
92 .run.ok:
93 rm -f tmp-$* $*.hi
94 ulimit -t 5 ; \
95 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
96 mv tmp-$* $*.ok
97 .run.hi:
98 rm -f tmp-$* $*.hi diff-$*
99 ulimit -t 5 ; \
100 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
101 echo 'Hello World!' | diff - tmp-$* > diff-$*
102 cat tmp-$* diff-$* > $*.hi
103 .run.ko:
104 rm -f tmp-$* $*.ko
105 set +e ; \
106 ulimit -t 5 ; \
107 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
108 if [ $$? -eq 47 ] ; then \
109 exit 0 ; \
110 else \
111 exit 1 ; \
112 fi
113 mv tmp-$* $*.ko
114 .run.ti:
115 rm -f tmp-$* $*.ti
116 set +e ; \
117 ulimit -t 5 ; \
118 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
119 test `cat tmp-$* | wc -l` -eq 10 < /dev/null
120 test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
121 mv tmp-$* $*.ti
122
123
124 # Rules for building the test
125 # Preference is for obtaining the executable (.run) from a prebuilt image
126
127 .SUFFIXES: .uue .s .S .run
128 .uue.run:
129 head $* | grep $*.run > /dev/null
130 uudecode $*.uue
131 .run.u:
132 uuencode < $*.run $*.run > $*.u
133 .o.run:
134 $(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
135 .s.o:
136 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
137 .S.o:
138 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
139
140
141 Makefile: Makefile.in config.status
142 $(SHELL) ./config.status
143
144 config.status: configure
145 $(SHELL) ./config.status --recheck