]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/mips/Makefile.in
2002-06-03 Chris Demetriou <cgd@broadcom.com>
[thirdparty/binutils-gdb.git] / sim / mips / Makefile.in
CommitLineData
c906108c
SS
1# Makefile template for Configure for the MIPS simulator.
2# Written by Cygnus Support.
3
4## COMMON_PRE_CONFIG_FRAG
5
6srcdir=@srcdir@
7srcroot=$(srcdir)/../../
8
9# Object files created by various simulator generators.
10
11
12SIM_IGEN_OBJ = \
13 support.o \
14 itable.o \
15 semantics.o \
16 idecode.o \
17 icache.o \
18 @mips_igen_engine@ \
19 irun.o \
20
21
22SIM_M16_OBJ = \
23 m16_support.o \
24 m16_semantics.o \
25 m16_idecode.o \
26 m16_icache.o \
27 \
28 m32_support.o \
29 m32_semantics.o \
30 m32_idecode.o \
31 m32_icache.o \
32 \
33 itable.o \
34 m16run.o \
35
36
37MIPS_EXTRA_OBJS = @mips_extra_objs@
38MIPS_EXTRA_LIBS = @mips_extra_libs@
39
40SIM_OBJS = \
41 $(SIM_@sim_gen@_OBJ) \
42 $(SIM_NEW_COMMON_OBJS) \
43 $(MIPS_EXTRA_OBJS) \
487f79b7 44 cp1.o \
c906108c 45 interp.o \
f4f1b9f1 46 mdmx.o \
c906108c
SS
47 sim-main.o \
48 sim-hload.o \
49 sim-engine.o \
50 sim-stop.o \
51 sim-resume.o \
52 sim-reason.o \
53
54
55# List of flags to always pass to $(CC).
56SIM_SUBTARGET=@SIM_SUBTARGET@
57SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
58
59SIM_EXTRA_CLEAN = clean-extra
60
61SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
62
63SIM_EXTRA_LIBS = $(MIPS_EXTRA_LIBS)
64
65# List of main object files for `run'.
66SIM_RUN_OBJS = nrun.o
67
68
69
70## COMMON_POST_CONFIG_FRAG
71
72interp.o: $(srcdir)/interp.c config.h sim-main.h itable.h
487f79b7 73cp1.o: $(srcdir)/cp1.c config.h sim-main.h
c906108c 74
f4f1b9f1 75mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
c906108c
SS
76
77../igen/igen:
78 cd ../igen && $(MAKE)
79
80IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all
81IGEN_INSN=$(srcdir)/mips.igen
82IGEN_DC=$(srcdir)/mips.dc
83M16_DC=$(srcdir)/m16.dc
84IGEN_INCLUDE=\
85 $(srcdir)/m16.igen \
909daa82 86 $(srcdir)/mdmx.igen \
7cbea089 87 $(srcdir)/sb1.igen \
c906108c
SS
88 $(srcdir)/tx.igen \
89 $(srcdir)/vr.igen \
90
91# NB: Since these can be built by a number of generators, care
92# must be taken to ensure that they are only dependant on
93# one of those generators.
94BUILT_SRC_FROM_GEN = \
95 itable.h \
96 itable.c \
97
98SIM_IGEN_ALL = tmp-igen
99SIM_M16_ALL = tmp-m16
100
101$(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
102
103
104
105BUILT_SRC_FROM_IGEN = \
106 icache.h \
107 icache.c \
108 idecode.h \
109 idecode.c \
110 semantics.h \
111 semantics.c \
112 model.h \
113 model.c \
114 support.h \
115 support.c \
116 engine.h \
117 engine.c \
118 irun.c \
119
120$(BUILT_SRC_FROM_IGEN): tmp-igen
121
122tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
123 cd ../igen && $(MAKE)
124 ../igen/igen \
125 $(IGEN_TRACE) \
126 -I $(srcdir) \
127 -Werror \
128 -Wnodiscard \
129 @sim_igen_flags@ \
130 -G gen-direct-access \
131 -G gen-zero-r0 \
132 -B 32 \
133 -H 31 \
134 -i $(IGEN_INSN) \
135 -o $(IGEN_DC) \
136 -x \
137 -n icache.h -hc tmp-icache.h \
138 -n icache.c -c tmp-icache.c \
139 -n semantics.h -hs tmp-semantics.h \
140 -n semantics.c -s tmp-semantics.c \
141 -n idecode.h -hd tmp-idecode.h \
142 -n idecode.c -d tmp-idecode.c \
143 -n model.h -hm tmp-model.h \
144 -n model.c -m tmp-model.c \
145 -n support.h -hf tmp-support.h \
146 -n support.c -f tmp-support.c \
147 -n itable.h -ht tmp-itable.h \
148 -n itable.c -t tmp-itable.c \
149 -n engine.h -he tmp-engine.h \
150 -n engine.c -e tmp-engine.c \
151 -n irun.c -r tmp-irun.c
152 $(srcdir)/../../move-if-change tmp-icache.h icache.h
153 $(srcdir)/../../move-if-change tmp-icache.c icache.c
154 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
155 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
156 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
157 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
158 $(srcdir)/../../move-if-change tmp-model.h model.h
159 $(srcdir)/../../move-if-change tmp-model.c model.c
160 $(srcdir)/../../move-if-change tmp-support.h support.h
161 $(srcdir)/../../move-if-change tmp-support.c support.c
162 $(srcdir)/../../move-if-change tmp-itable.h itable.h
163 $(srcdir)/../../move-if-change tmp-itable.c itable.c
164 $(srcdir)/../../move-if-change tmp-engine.h engine.h
165 $(srcdir)/../../move-if-change tmp-engine.c engine.c
166 $(srcdir)/../../move-if-change tmp-irun.c irun.c
167 touch tmp-igen
168
169semantics.o: sim-main.h semantics.c $(SIM_EXTRA_DEPS)
170engine.o: sim-main.h engine.c $(SIM_EXTRA_DEPS)
171support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
172idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
173itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
174
175
176
177
178BUILT_SRC_FROM_M16 = \
179 m16_icache.h \
180 m16_icache.c \
181 m16_idecode.h \
182 m16_idecode.c \
183 m16_semantics.h \
184 m16_semantics.c \
185 m16_model.h \
186 m16_model.c \
187 m16_support.h \
188 m16_support.c \
189 \
190 m32_icache.h \
191 m32_icache.c \
192 m32_idecode.h \
193 m32_idecode.c \
194 m32_semantics.h \
195 m32_semantics.c \
196 m32_model.h \
197 m32_model.c \
198 m32_support.h \
199 m32_support.c \
200
201$(BUILT_SRC_FROM_M16): tmp-m16
202
203tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
204 cd ../igen && $(MAKE)
205 ../igen/igen \
206 $(IGEN_TRACE) \
207 -I $(srcdir) \
208 -Werror \
209 -Wnodiscard \
210 @sim_m16_flags@ \
211 -G gen-direct-access \
212 -G gen-zero-r0 \
213 -B 16 \
214 -H 15 \
215 -i $(IGEN_INSN) \
216 -o $(M16_DC) \
217 -P m16_ \
218 -x \
219 -n m16_icache.h -hc tmp-icache.h \
220 -n m16_icache.c -c tmp-icache.c \
221 -n m16_semantics.h -hs tmp-semantics.h \
222 -n m16_semantics.c -s tmp-semantics.c \
223 -n m16_idecode.h -hd tmp-idecode.h \
224 -n m16_idecode.c -d tmp-idecode.c \
225 -n m16_model.h -hm tmp-model.h \
226 -n m16_model.c -m tmp-model.c \
227 -n m16_support.h -hf tmp-support.h \
228 -n m16_support.c -f tmp-support.c \
229 #
230 $(srcdir)/../../move-if-change tmp-icache.h m16_icache.h
231 $(srcdir)/../../move-if-change tmp-icache.c m16_icache.c
232 $(srcdir)/../../move-if-change tmp-idecode.h m16_idecode.h
233 $(srcdir)/../../move-if-change tmp-idecode.c m16_idecode.c
234 $(srcdir)/../../move-if-change tmp-semantics.h m16_semantics.h
235 $(srcdir)/../../move-if-change tmp-semantics.c m16_semantics.c
236 $(srcdir)/../../move-if-change tmp-model.h m16_model.h
237 $(srcdir)/../../move-if-change tmp-model.c m16_model.c
238 $(srcdir)/../../move-if-change tmp-support.h m16_support.h
239 $(srcdir)/../../move-if-change tmp-support.c m16_support.c
240 ../igen/igen \
241 $(IGEN_TRACE) \
242 -I $(srcdir) \
243 -Werror \
244 -Wnodiscard \
245 @sim_igen_flags@ \
246 -G gen-direct-access \
247 -G gen-zero-r0 \
248 -B 32 \
249 -H 31 \
250 -i $(IGEN_INSN) \
251 -o $(IGEN_DC) \
252 -P m32_ \
253 -x \
254 -n m32_icache.h -hc tmp-icache.h \
255 -n m32_icache.c -c tmp-icache.c \
256 -n m32_semantics.h -hs tmp-semantics.h \
257 -n m32_semantics.c -s tmp-semantics.c \
258 -n m32_idecode.h -hd tmp-idecode.h \
259 -n m32_idecode.c -d tmp-idecode.c \
260 -n m32_model.h -hm tmp-model.h \
261 -n m32_model.c -m tmp-model.c \
262 -n m32_support.h -hf tmp-support.h \
263 -n m32_support.c -f tmp-support.c \
264 #
265 $(srcdir)/../../move-if-change tmp-icache.h m32_icache.h
266 $(srcdir)/../../move-if-change tmp-icache.c m32_icache.c
267 $(srcdir)/../../move-if-change tmp-idecode.h m32_idecode.h
268 $(srcdir)/../../move-if-change tmp-idecode.c m32_idecode.c
269 $(srcdir)/../../move-if-change tmp-semantics.h m32_semantics.h
270 $(srcdir)/../../move-if-change tmp-semantics.c m32_semantics.c
271 $(srcdir)/../../move-if-change tmp-model.h m32_model.h
272 $(srcdir)/../../move-if-change tmp-model.c m32_model.c
273 $(srcdir)/../../move-if-change tmp-support.h m32_support.h
274 $(srcdir)/../../move-if-change tmp-support.c m32_support.c
275 ../igen/igen \
276 $(IGEN_TRACE) \
277 -I $(srcdir) \
278 -Werror \
279 -Wnodiscard \
280 -Wnowidth \
281 @sim_igen_flags@ @sim_m16_flags@ \
282 -G gen-direct-access \
283 -G gen-zero-r0 \
284 -i $(IGEN_INSN) \
285 -n itable.h -ht tmp-itable.h \
286 -n itable.c -t tmp-itable.c \
287 #
288 $(srcdir)/../../move-if-change tmp-itable.h itable.h
289 $(srcdir)/../../move-if-change tmp-itable.c itable.c
290 touch tmp-m16
291
292
293clean-extra:
294 rm -f $(BUILT_SRC_FROM_GEN)
295 rm -f $(BUILT_SRC_FROM_IGEN)
296 rm -f $(BUILT_SRC_FROM_M16)
297 rm -f tmp-*
071da002 298 rm -f m16*.o m32*.o itable*.o
c906108c 299