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