]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/mips/Makefile.in
sim: move sim-engine.o/sim-hrw.o to the common list
[thirdparty/binutils-gdb.git] / sim / mips / Makefile.in
1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
3
4 SHELL = @SHELL@
5
6 ## COMMON_PRE_CONFIG_FRAG
7
8 srcdir=@srcdir@
9 srcroot=$(srcdir)/../../
10
11 # Object files created by various simulator generators.
12
13
14 SIM_IGEN_OBJ = \
15 support.o \
16 itable.o \
17 semantics.o \
18 idecode.o \
19 icache.o \
20 @mips_igen_engine@ \
21 irun.o \
22
23
24 SIM_M16_OBJ = \
25 m16_support.o \
26 m16_semantics.o \
27 m16_idecode.o \
28 m16_icache.o \
29 \
30 m32_support.o \
31 m32_semantics.o \
32 m32_idecode.o \
33 m32_icache.o \
34 \
35 itable.o \
36 m16run.o \
37
38 SIM_MULTI_OBJ = itable.o @sim_multi_obj@
39
40 MIPS_EXTRA_LIBS = @mips_extra_libs@
41
42 SIM_OBJS = \
43 $(SIM_@sim_gen@_OBJ) \
44 $(SIM_NEW_COMMON_OBJS) \
45 cp1.o \
46 interp.o \
47 mdmx.o \
48 dsp.o \
49 sim-main.o \
50 sim-hload.o \
51 sim-stop.o \
52 sim-resume.o \
53 sim-reason.o \
54
55
56 # List of flags to always pass to $(CC).
57 SIM_SUBTARGET=@SIM_SUBTARGET@
58 SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
59
60 SIM_EXTRA_CLEAN = clean-extra
61 SIM_EXTRA_DISTCLEAN = distclean-extra
62
63 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
64
65 SIM_EXTRA_LIBS = $(MIPS_EXTRA_LIBS)
66
67
68 ## COMMON_POST_CONFIG_FRAG
69
70 interp.o: $(srcdir)/interp.c config.h sim-main.h itable.h
71 cp1.o: $(srcdir)/cp1.c config.h sim-main.h
72
73 mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
74
75 dsp.o: $(srcdir)/dsp.c $(srcdir)/sim-main.h
76
77 multi-run.o: multi-include.h tmp-mach-multi
78
79 ../igen/igen:
80 cd ../igen && $(MAKE)
81
82 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all
83 IGEN_INSN=$(srcdir)/mips.igen
84 IGEN_DC=$(srcdir)/mips.dc
85 M16_DC=$(srcdir)/m16.dc
86 IGEN_INCLUDE=\
87 $(srcdir)/m16.igen \
88 $(srcdir)/m16e.igen \
89 $(srcdir)/mdmx.igen \
90 $(srcdir)/mips3d.igen \
91 $(srcdir)/sb1.igen \
92 $(srcdir)/tx.igen \
93 $(srcdir)/vr.igen \
94 $(srcdir)/dsp.igen \
95 $(srcdir)/dsp2.igen \
96 $(srcdir)/mips3264r2.igen \
97
98 # NB: Since these can be built by a number of generators, care
99 # must be taken to ensure that they are only dependant on
100 # one of those generators.
101 BUILT_SRC_FROM_GEN = \
102 itable.h \
103 itable.c \
104
105 SIM_IGEN_ALL = tmp-igen
106 SIM_M16_ALL = tmp-m16
107 SIM_MULTI_ALL = tmp-multi
108
109 $(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
110
111
112
113 BUILT_SRC_FROM_IGEN = \
114 icache.h \
115 icache.c \
116 idecode.h \
117 idecode.c \
118 semantics.h \
119 semantics.c \
120 model.h \
121 model.c \
122 support.h \
123 support.c \
124 engine.h \
125 engine.c \
126 irun.c \
127
128 $(BUILT_SRC_FROM_IGEN): tmp-igen
129
130 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
131 cd ../igen && $(MAKE)
132 ../igen/igen \
133 $(IGEN_TRACE) \
134 -I $(srcdir) \
135 -Werror \
136 -Wnodiscard \
137 @sim_igen_flags@ \
138 -G gen-direct-access \
139 -G gen-zero-r0 \
140 -B 32 \
141 -H 31 \
142 -i $(IGEN_INSN) \
143 -o $(IGEN_DC) \
144 -x \
145 -n icache.h -hc tmp-icache.h \
146 -n icache.c -c tmp-icache.c \
147 -n semantics.h -hs tmp-semantics.h \
148 -n semantics.c -s tmp-semantics.c \
149 -n idecode.h -hd tmp-idecode.h \
150 -n idecode.c -d tmp-idecode.c \
151 -n model.h -hm tmp-model.h \
152 -n model.c -m tmp-model.c \
153 -n support.h -hf tmp-support.h \
154 -n support.c -f tmp-support.c \
155 -n itable.h -ht tmp-itable.h \
156 -n itable.c -t tmp-itable.c \
157 -n engine.h -he tmp-engine.h \
158 -n engine.c -e tmp-engine.c \
159 -n irun.c -r tmp-irun.c
160 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h icache.h
161 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c icache.c
162 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
163 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
164 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
165 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
166 $(SHELL) $(srcdir)/../../move-if-change tmp-model.h model.h
167 $(SHELL) $(srcdir)/../../move-if-change tmp-model.c model.c
168 $(SHELL) $(srcdir)/../../move-if-change tmp-support.h support.h
169 $(SHELL) $(srcdir)/../../move-if-change tmp-support.c support.c
170 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h
171 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c
172 $(SHELL) $(srcdir)/../../move-if-change tmp-engine.h engine.h
173 $(SHELL) $(srcdir)/../../move-if-change tmp-engine.c engine.c
174 $(SHELL) $(srcdir)/../../move-if-change tmp-irun.c irun.c
175 touch tmp-igen
176
177 semantics.o: sim-main.h semantics.c $(SIM_EXTRA_DEPS)
178 engine.o: sim-main.h engine.c $(SIM_EXTRA_DEPS)
179 support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
180 idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
181 itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
182 m16run.o: sim-main.h m16_idecode.h m32_idecode.h $(SIM_EXTRA_DEPS)
183
184 m16_semantics.o: sim-main.h m16_semantics.c $(SIM_EXTRA_DEPS)
185 m16_support.o: sim-main.h m16_support.c $(SIM_EXTRA_DEPS)
186 m16_idecode.o: sim-main.h m16_idecode.c $(SIM_EXTRA_DEPS)
187 m16_icache.o: sim-main.h m16_icache.c $(SIM_EXTRA_DEPS)
188
189 m32_semantics.o: sim-main.h m32_semantics.c $(SIM_EXTRA_DEPS)
190 m32_support.o: sim-main.h m32_support.c $(SIM_EXTRA_DEPS)
191 m32_idecode.o: sim-main.h m32_idecode.c $(SIM_EXTRA_DEPS)
192 m32_icache.o: sim-main.h m32_icache.c $(SIM_EXTRA_DEPS)
193
194 $(SIM_MULTI_OBJ): sim-main.h $(SIM_EXTRA_DEPS)
195
196 BUILT_SRC_FROM_M16 = \
197 m16_icache.h \
198 m16_icache.c \
199 m16_idecode.h \
200 m16_idecode.c \
201 m16_semantics.h \
202 m16_semantics.c \
203 m16_model.h \
204 m16_model.c \
205 m16_support.h \
206 m16_support.c \
207 \
208 m32_icache.h \
209 m32_icache.c \
210 m32_idecode.h \
211 m32_idecode.c \
212 m32_semantics.h \
213 m32_semantics.c \
214 m32_model.h \
215 m32_model.c \
216 m32_support.h \
217 m32_support.c \
218
219 $(BUILT_SRC_FROM_M16): tmp-m16
220
221 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
222 cd ../igen && $(MAKE)
223 ../igen/igen \
224 $(IGEN_TRACE) \
225 -I $(srcdir) \
226 -Werror \
227 -Wnodiscard \
228 @sim_m16_flags@ \
229 -G gen-direct-access \
230 -G gen-zero-r0 \
231 -B 16 \
232 -H 15 \
233 -i $(IGEN_INSN) \
234 -o $(M16_DC) \
235 -P m16_ \
236 -x \
237 -n m16_icache.h -hc tmp-icache.h \
238 -n m16_icache.c -c tmp-icache.c \
239 -n m16_semantics.h -hs tmp-semantics.h \
240 -n m16_semantics.c -s tmp-semantics.c \
241 -n m16_idecode.h -hd tmp-idecode.h \
242 -n m16_idecode.c -d tmp-idecode.c \
243 -n m16_model.h -hm tmp-model.h \
244 -n m16_model.c -m tmp-model.c \
245 -n m16_support.h -hf tmp-support.h \
246 -n m16_support.c -f tmp-support.c \
247 #
248 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h m16_icache.h
249 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c m16_icache.c
250 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h m16_idecode.h
251 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c m16_idecode.c
252 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h m16_semantics.h
253 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c m16_semantics.c
254 $(SHELL) $(srcdir)/../../move-if-change tmp-model.h m16_model.h
255 $(SHELL) $(srcdir)/../../move-if-change tmp-model.c m16_model.c
256 $(SHELL) $(srcdir)/../../move-if-change tmp-support.h m16_support.h
257 $(SHELL) $(srcdir)/../../move-if-change tmp-support.c m16_support.c
258 ../igen/igen \
259 $(IGEN_TRACE) \
260 -I $(srcdir) \
261 -Werror \
262 -Wnodiscard \
263 @sim_igen_flags@ \
264 -G gen-direct-access \
265 -G gen-zero-r0 \
266 -B 32 \
267 -H 31 \
268 -i $(IGEN_INSN) \
269 -o $(IGEN_DC) \
270 -P m32_ \
271 -x \
272 -n m32_icache.h -hc tmp-icache.h \
273 -n m32_icache.c -c tmp-icache.c \
274 -n m32_semantics.h -hs tmp-semantics.h \
275 -n m32_semantics.c -s tmp-semantics.c \
276 -n m32_idecode.h -hd tmp-idecode.h \
277 -n m32_idecode.c -d tmp-idecode.c \
278 -n m32_model.h -hm tmp-model.h \
279 -n m32_model.c -m tmp-model.c \
280 -n m32_support.h -hf tmp-support.h \
281 -n m32_support.c -f tmp-support.c \
282 #
283 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h m32_icache.h
284 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c m32_icache.c
285 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h m32_idecode.h
286 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c m32_idecode.c
287 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h m32_semantics.h
288 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c m32_semantics.c
289 $(SHELL) $(srcdir)/../../move-if-change tmp-model.h m32_model.h
290 $(SHELL) $(srcdir)/../../move-if-change tmp-model.c m32_model.c
291 $(SHELL) $(srcdir)/../../move-if-change tmp-support.h m32_support.h
292 $(SHELL) $(srcdir)/../../move-if-change tmp-support.c m32_support.c
293 ../igen/igen \
294 $(IGEN_TRACE) \
295 -I $(srcdir) \
296 -Werror \
297 -Wnodiscard \
298 -Wnowidth \
299 @sim_igen_flags@ @sim_m16_flags@ \
300 -G gen-direct-access \
301 -G gen-zero-r0 \
302 -i $(IGEN_INSN) \
303 -n itable.h -ht tmp-itable.h \
304 -n itable.c -t tmp-itable.c \
305 #
306 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h
307 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c
308 touch tmp-m16
309
310
311 BUILT_SRC_FROM_MULTI = @sim_multi_src@
312 SIM_MULTI_IGEN_CONFIGS = @sim_multi_igen_configs@
313
314 $(BUILT_SRC_FROM_MULTI): tmp-multi
315 tmp-multi: tmp-mach-multi tmp-itable-multi tmp-run-multi targ-vals.h
316 tmp-mach-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
317 for t in $(SIM_MULTI_IGEN_CONFIGS); do \
318 p=`echo $${t} | sed -e 's/:.*//'` ; \
319 m=`echo $${t} | sed -e 's/.*:\(.*\):.*/\1/'` ; \
320 f=`echo $${t} | sed -e 's/.*://'` ; \
321 case $${p} in \
322 m16*) e="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
323 *) e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
324 esac; \
325 ../igen/igen \
326 $(IGEN_TRACE) \
327 $${e} \
328 -I $(srcdir) \
329 -Werror \
330 -Wnodiscard \
331 -N 0 \
332 -M $${m} \
333 -G gen-direct-access \
334 -G gen-zero-r0 \
335 -i $(IGEN_INSN) \
336 -P $${p}_ \
337 -x \
338 -n $${p}_icache.h -hc tmp-icache.h \
339 -n $${p}_icache.c -c tmp-icache.c \
340 -n $${p}_semantics.h -hs tmp-semantics.h \
341 -n $${p}_semantics.c -s tmp-semantics.c \
342 -n $${p}_idecode.h -hd tmp-idecode.h \
343 -n $${p}_idecode.c -d tmp-idecode.c \
344 -n $${p}_model.h -hm tmp-model.h \
345 -n $${p}_model.c -m tmp-model.c \
346 -n $${p}_support.h -hf tmp-support.h \
347 -n $${p}_support.c -f tmp-support.c \
348 -n $${p}_engine.h -he tmp-engine.h \
349 -n $${p}_engine.c -e tmp-engine.c \
350 || exit; \
351 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h $${p}_icache.h ; \
352 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c $${p}_icache.c ; \
353 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h $${p}_idecode.h ; \
354 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c $${p}_idecode.c ; \
355 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h $${p}_semantics.h ; \
356 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c $${p}_semantics.c ; \
357 $(SHELL) $(srcdir)/../../move-if-change tmp-model.h $${p}_model.h ; \
358 $(SHELL) $(srcdir)/../../move-if-change tmp-model.c $${p}_model.c ; \
359 $(SHELL) $(srcdir)/../../move-if-change tmp-support.h $${p}_support.h ; \
360 $(SHELL) $(srcdir)/../../move-if-change tmp-support.c $${p}_support.c ; \
361 $(SHELL) $(srcdir)/../../move-if-change tmp-engine.h $${p}_engine.h ; \
362 $(SHELL) $(srcdir)/../../move-if-change tmp-engine.c $${p}_engine.c ; \
363 done
364 touch tmp-mach-multi
365 tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
366 ../igen/igen \
367 $(IGEN_TRACE) \
368 -I $(srcdir) \
369 -Werror \
370 -Wnodiscard \
371 -Wnowidth \
372 -N 0 \
373 @sim_multi_flags@ \
374 -G gen-direct-access \
375 -G gen-zero-r0 \
376 -i $(IGEN_INSN) \
377 -n itable.h -ht tmp-itable.h \
378 -n itable.c -t tmp-itable.c \
379 #
380 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h
381 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c
382 touch tmp-itable-multi
383 tmp-run-multi: $(srcdir)/m16run.c
384 for t in $(SIM_MULTI_IGEN_CONFIGS); do \
385 case $${t} in \
386 m16*) \
387 m=`echo $${t} | sed -e 's/^m16//' -e 's/:.*//'`; \
388 sed < $(srcdir)/m16run.c > tmp-run \
389 -e "s/^sim_/m16$${m}_/" \
390 -e "s/m16_/m16$${m}_/" \
391 -e "s/m32_/m32$${m}_/" ; \
392 $(SHELL) $(srcdir)/../../move-if-change tmp-run m16$${m}_run.c ; \
393 esac \
394 done
395 touch tmp-run-multi
396
397 clean-extra:
398 rm -f $(BUILT_SRC_FROM_GEN)
399 rm -f $(BUILT_SRC_FROM_IGEN)
400 rm -f $(BUILT_SRC_FROM_M16)
401 rm -f $(BUILT_SRC_FROM_MULTI)
402 rm -f tmp-*
403 rm -f m16*.o m32*.o itable*.o
404
405 distclean-extra:
406 rm -f multi-include.h multi-run.c