1 # Mitsubishi Electric Corp. D30V Simulator.
2 # Copyright (C) 1997, Free Software Foundation, Inc.
3 # Contributed by Cygnus Support.
5 # This file is part of GDB, the GNU debugger.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 ## COMMON_PRE_CONFIG_FRAG
26 # These variables are given default values in COMMON_PRE_CONFIG_FRAG.
27 # We override the ones we need to here.
28 # Not all of these need to be mentioned, only the necessary ones.
30 # List of object files, less common parts.
32 $(SIM_NEW_COMMON_OBJS) \
34 s_support.o l_support.o \
35 s_idecode.o l_idecode.o \
36 s_semantics.o l_semantics.o \
37 sim-calls.o itable.o \
45 # List of extra dependencies.
46 # Generally this consists of simulator specific files included by sim-main.h.
47 SIM_EXTRA_DEPS = itable.h s_idecode.h l_idecode.h cpu.h alu.h
52 # List of extra flags to always pass to $(CC).
53 SIM_EXTRA_CFLAGS = @sim_trapdump@
55 # List of main object files for `run'.
58 # Dependency of `clean' to clean any extra files.
59 SIM_EXTRA_CLEAN = clean-igen
61 # This selects the d30v newlib/libgloss syscall definitions.
62 NL_TARGET=-DNL_TARGET_d30v
64 ## COMMON_POST_CONFIG_FRAG
66 MAIN_INCLUDE_DEPS = tconfig.h
67 INCLUDE_DEPS = $(MAIN_INCLUDE_DEPS) $(SIM_EXTRA_DEPS)
69 # Rules need to build $(SIM_OBJS), plus whatever else the target wants.
71 # ... target specific rules ...
73 # Filter to eliminate known warnings
74 FILTER = 2>&1 | egrep -v "Discarding instruction|instruction field of type \`compute\' changed to \`cache\'|Instruction format is not 64 bits wide"
76 BUILT_SRC_FROM_IGEN = \
98 $(BUILT_SRC_FROM_IGEN): tmp-igen
103 rm -f $(BUILT_SRC_FROM_IGEN)
104 rm -f tmp-igen tmp-insns
107 cd ../igen && $(MAKE)
109 tmp-igen: $(srcdir)/dc-short $(srcdir)/d30v-insns $(srcdir)/ic-d30v ../igen/igen
110 cd ../igen && $(MAKE)
111 echo "# 1 \"$(srcdir)/d30v-insns\"" > tmp-insns
112 $(M4) < $(srcdir)/d30v-insns >> tmp-insns
113 @echo "Generating short version ..."
117 -G default-nia-minus-one \
118 -G conditional-issue \
124 -o $(srcdir)/dc-short \
125 -k $(srcdir)/ic-d30v \
126 -n $(srcdir)/d30v-insns -i tmp-insns \
127 -n s_icache.h -hc tmp-icache.h \
128 -n s_icache.c -c tmp-icache.c \
129 -n s_semantics.h -hs tmp-semantics.h \
130 -n s_semantics.c -s tmp-semantics.c \
131 -n s_idecode.h -hd tmp-idecode.h \
132 -n s_idecode.c -d tmp-idecode.c \
133 -n s_model.h -hm tmp-model.h \
134 -n s_model.c -m tmp-model.c \
135 -n s_support.h -hf tmp-support.h \
136 -n s_support.c -f tmp-support.c $(FILTER)
137 $(srcdir)/../../move-if-change tmp-icache.h s_icache.h
138 $(srcdir)/../../move-if-change tmp-icache.c s_icache.c
139 $(srcdir)/../../move-if-change tmp-idecode.h s_idecode.h
140 $(srcdir)/../../move-if-change tmp-idecode.c s_idecode.c
141 $(srcdir)/../../move-if-change tmp-semantics.h s_semantics.h
142 $(srcdir)/../../move-if-change tmp-semantics.c s_semantics.c
143 $(srcdir)/../../move-if-change tmp-model.h s_model.h
144 $(srcdir)/../../move-if-change tmp-model.c s_model.c
145 $(srcdir)/../../move-if-change tmp-support.h s_support.h
146 $(srcdir)/../../move-if-change tmp-support.c s_support.c
147 @echo "Generating long version ..."
151 -G default-nia-minus-one \
152 -G conditional-issue \
157 -o $(srcdir)/dc-short \
158 -k $(srcdir)/ic-d30v \
160 -n l_icache.h -hc tmp-icache.h \
161 -n l_icache.c -c tmp-icache.c \
162 -n l_semantics.h -hs tmp-semantics.h \
163 -n l_semantics.c -s tmp-semantics.c \
164 -n l_idecode.h -hd tmp-idecode.h \
165 -n l_idecode.c -d tmp-idecode.c \
166 -n l_model.h -hm tmp-model.h \
167 -n l_model.c -m tmp-model.c \
168 -n l_support.h -hf tmp-support.h \
169 -n l_support.c -f tmp-support.c $(FILTER)
170 $(srcdir)/../../move-if-change tmp-icache.h l_icache.h
171 $(srcdir)/../../move-if-change tmp-icache.c l_icache.c
172 $(srcdir)/../../move-if-change tmp-idecode.h l_idecode.h
173 $(srcdir)/../../move-if-change tmp-idecode.c l_idecode.c
174 $(srcdir)/../../move-if-change tmp-semantics.h l_semantics.h
175 $(srcdir)/../../move-if-change tmp-semantics.c l_semantics.c
176 $(srcdir)/../../move-if-change tmp-model.h l_model.h
177 $(srcdir)/../../move-if-change tmp-model.c l_model.c
178 $(srcdir)/../../move-if-change tmp-support.h l_support.h
179 $(srcdir)/../../move-if-change tmp-support.c l_support.c
180 @echo "Generating instruction database ..."
185 -o $(srcdir)/dc-short \
186 -k $(srcdir)/ic-d30v \
188 -n itable.h -ht tmp-itable.h \
189 -n itable.c -t tmp-itable.c $(FILTER)
190 $(srcdir)/../../move-if-change tmp-itable.h itable.h
191 $(srcdir)/../../move-if-change tmp-itable.c itable.c
196 $(srcdir)/../common/sim-basics.h \
198 $(srcdir)/../common/sim-config.h \
199 $(srcdir)/../common/sim-inline.h \
200 $(srcdir)/../common/sim-types.h \
201 $(srcdir)/../common/sim-bits.h \
202 $(srcdir)/../common/sim-endian.h \
204 l_idecode.h s_idecode.h \
207 $(srcdir)/../common/sim-alu.h \
208 $(srcdir)/../common/sim-core.h \
209 $(srcdir)/../common/sim-events.h \
211 engine.o: engine.c $(ENGINE_H)
212 sim-calls.o: sim-calls.c $(ENGINE_H) $(srcdir)/../common/sim-utils.h $(srcdir)/../common/sim-options.h
213 cpu.o: cpu.c $(ENGINE_H)
214 s_support.o: s_support.c $(ENGINE_H)
215 l_support.o: l_support.c $(ENGINE_H)
216 s_semantics.o: s_semantics.c $(ENGINE_H)
217 l_semantics.o: l_semantics.c $(ENGINE_H)