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