sim: nltvals: unify common syscall tables
[binutils-gdb.git] / sim / igen / local.mk
1 # The IGEN simulator generator for GDB, the GNU Debugger.
2 #
3 # Copyright 2002-2021 Free Software Foundation, Inc.
4 #
5 # Contributed by Andrew Cagney.
6 #
7 # This file is part of GDB.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # This makes sure igen is available before building the arch-subdirs which
23 # need to run the igen tool.
24 all-recursive: igen/igen$(EXEEXT)
25
26 # Alias for developers.
27 igen: %D%/igen$(EXEEXT)
28
29 noinst_LIBRARIES += %D%/libigen.a
30 %C%_libigen_a_SOURCES = \
31 %D%/table.c \
32 %D%/lf.c \
33 %D%/misc.c \
34 %D%/filter_host.c \
35 %D%/ld-decode.c \
36 %D%/ld-cache.c \
37 %D%/filter.c \
38 %D%/ld-insn.c \
39 %D%/gen-model.c \
40 %D%/gen-itable.c \
41 %D%/gen-icache.c \
42 %D%/gen-semantics.c \
43 %D%/gen-idecode.c \
44 %D%/gen-support.c \
45 %D%/gen-engine.c \
46 %D%/gen.c
47
48 %C%_igen_SOURCES = %D%/igen.c
49 %C%_igen_LDADD = %D%/libigen.a
50
51 %D%/igen$(EXEEXT): $(%C%_igen_OBJECTS) $(%C%_igen_DEPENDENCIES) %D%/$(am__dirstamp)
52 $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_igen_OBJECTS) $(%C%_igen_LDADD)
53
54 # igen is a build-time only tool. Override the default rules for it.
55 %D%/%.o: %D%/%.c
56 $(AM_V_CC)$(COMPILE_FOR_BUILD) -c $< -o $@
57
58 # Build some of the files in standalone mode for developers of igen itself.
59 %D%/%-main.o: %D%/%.c
60 $(AM_V_CC)$(COMPILE_FOR_BUILD) -DMAIN -c $< -o $@
61
62 %C%_filter_SOURCES =
63 %C%_filter_LDADD = %D%/filter-main.o %D%/libigen.a
64
65 %C%_gen_SOURCES =
66 %C%_gen_LDADD = %D%/gen-main.o %D%/libigen.a
67
68 %C%_ld_cache_SOURCES =
69 %C%_ld_cache_LDADD = %D%/ld-cache-main.o %D%/libigen.a
70
71 %C%_ld_decode_SOURCES =
72 %C%_ld_decode_LDADD = %D%/ld-decode-main.o %D%/libigen.a
73
74 %C%_ld_insn_SOURCES =
75 %C%_ld_insn_LDADD = %D%/ld-insn-main.o %D%/libigen.a
76
77 %C%_table_SOURCES =
78 %C%_table_LDADD = %D%/table-main.o %D%/libigen.a
79
80 %C%_IGEN_TOOLS = \
81 %D%/igen \
82 %D%/filter \
83 %D%/gen \
84 %D%/ld-cache \
85 %D%/ld-decode \
86 %D%/ld-insn \
87 %D%/table
88 EXTRA_PROGRAMS += $(%C%_IGEN_TOOLS)
89 MOSTLYCLEANFILES += $(%C%_IGEN_TOOLS)