]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/common/local.mk
sim: testsuite: integrate common tests into build
[thirdparty/binutils-gdb.git] / sim / testsuite / common / local.mk
1 # Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 EXTRA_PROGRAMS += %D%/bits-gen
17
18 # We don't build this normally as it relies on the Berkeley SoftFloat/TestFloat
19 # projects being installed/available first.
20 EXTRA_PROGRAMS += %D%/fpu-tst
21
22 TESTS = \
23 %D%/bits32m0 \
24 %D%/bits32m31 \
25 %D%/bits64m0 \
26 %D%/bits64m63 \
27 %D%/alu-tst
28 check_PROGRAMS += $(TESTS)
29
30 %C%_CPPFLAGS = \
31 -I$(srcdir)/common \
32 -I$(srcroot)/include
33
34 # These tests are build-time only tools. Override the default rules for them.
35 %D%/%.o: %D%/%.c
36 $(AM_V_CC)$(COMPILE_FOR_BUILD) $(%C%_CPPFLAGS) -c $< -o $@
37
38 %D%/alu-tst$(EXEEXT): $(%C%_alu_tst_OBJECTS) $(%C%_alu_tst_DEPENDENCIES) %D%/$(am__dirstamp)
39 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_alu_tst_OBJECTS) $(%C%_alu_tst_LDADD)
40
41 %D%/fpu-tst$(EXEEXT): $(%C%_fpu_tst_OBJECTS) $(%C%_fpu_tst_DEPENDENCIES) %D%/$(am__dirstamp)
42 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_fpu_tst_OBJECTS) $(%C%_fpu_tst_LDADD)
43
44 %D%/bits-gen$(EXEEXT): $(%C%_bits_gen_OBJECTS) $(%C%_bits_gen_DEPENDENCIES) %D%/$(am__dirstamp)
45 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits_gen_OBJECTS) $(%C%_bits_gen_LDADD)
46
47 %D%/bits32m0$(EXEEXT): $(%C%_bits32m0_OBJECTS) $(%C%_bits32m0_DEPENDENCIES) %D%/$(am__dirstamp)
48 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits32m0_OBJECTS) $(%C%_bits32m0_LDADD)
49
50 %D%/bits32m0.c: %D%/bits-gen %D%/bits-tst.c
51 $< 32 0 big > $@.tmp
52 cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
53 mv $@.tmp $@
54
55 %D%/bits32m31$(EXEEXT): $(%C%_bits32m31_OBJECTS) $(%C%_bits32m31_DEPENDENCIES) %D%/$(am__dirstamp)
56 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits32m31_OBJECTS) $(%C%_bits32m31_LDADD)
57
58 %D%/bits32m31.c: %D%/bits-gen %D%/bits-tst.c
59 $< 32 31 little > $@.tmp
60 cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
61 mv $@.tmp $@
62
63 %D%/bits64m0$(EXEEXT): $(%C%_bits64m0_OBJECTS) $(%C%_bits64m0_DEPENDENCIES) %D%/$(am__dirstamp)
64 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits64m0_OBJECTS) $(%C%_bits64m0_LDADD)
65
66 %D%/bits64m0.c: %D%/bits-gen %D%/bits-tst.c
67 $< 64 0 big > $@.tmp
68 cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
69 mv $@.tmp $@
70
71 %D%/bits64m63$(EXEEXT): $(%C%_bits64m63_OBJECTS) $(%C%_bits64m63_DEPENDENCIES) %D%/$(am__dirstamp)
72 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits64m63_OBJECTS) $(%C%_bits64m63_LDADD)
73
74 %D%/bits64m63.c: %D%/bits-gen %D%/bits-tst.c
75 $< 64 63 little > $@.tmp
76 cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
77 mv $@.tmp $@
78
79 CLEANFILES += \
80 %D%/bits-gen \
81 %D%/bits32m0.c \
82 %D%/bits32m31.c \
83 %D%/bits64m0.c \
84 %D%/bits64m63.c