1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
6 ## COMMON_PRE_CONFIG_FRAG
9 srcroot
=$(srcdir)/..
/..
/
11 # Object files created by various simulator generators.
38 SIM_MULTI_OBJ
= itable.o @sim_multi_obj@
40 MIPS_EXTRA_OBJS
= @mips_extra_objs@
41 MIPS_EXTRA_LIBS
= @mips_extra_libs@
44 $(SIM_@sim_gen@_OBJ
) \
45 $(SIM_NEW_COMMON_OBJS
) \
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'.
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
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
97 $(srcdir)/mips3d.igen \
102 $(srcdir)/dsp2.igen \
103 $(srcdir)/mips3264r2.igen \
105 # NB: Since these can be built by a number of generators, care
106 # must be taken to ensure that they are only dependant on
107 # one of those generators.
108 BUILT_SRC_FROM_GEN
= \
112 SIM_IGEN_ALL
= tmp-igen
113 SIM_M16_ALL
= tmp-m16
114 SIM_MULTI_ALL
= tmp-multi
116 $(BUILT_SRC_FROM_GEN
): $(SIM_@sim_gen@_ALL
)
120 BUILT_SRC_FROM_IGEN
= \
135 $(BUILT_SRC_FROM_IGEN
): tmp-igen
137 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
138 cd ..
/igen
&& $(MAKE
)
145 -G gen-direct-access \
152 -n icache.h
-hc tmp-icache.h \
153 -n icache.c
-c tmp-icache.c \
154 -n semantics.h
-hs tmp-semantics.h \
155 -n semantics.c
-s tmp-semantics.c \
156 -n idecode.h
-hd tmp-idecode.h \
157 -n idecode.c
-d tmp-idecode.c \
158 -n model.h
-hm tmp-model.h \
159 -n model.c
-m tmp-model.c \
160 -n support.h
-hf tmp-support.h \
161 -n support.c
-f tmp-support.c \
162 -n itable.h
-ht tmp-itable.h \
163 -n itable.c
-t tmp-itable.c \
164 -n engine.h
-he tmp-engine.h \
165 -n engine.c
-e tmp-engine.c \
166 -n irun.c
-r tmp-irun.c
167 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
168 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
169 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
170 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
171 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
172 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
173 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
174 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
175 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
176 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
177 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
178 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
179 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
180 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
181 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
184 semantics.o
: sim-main.h semantics.c
$(SIM_EXTRA_DEPS
)
185 engine.o
: sim-main.h engine.c
$(SIM_EXTRA_DEPS
)
186 support.o
: sim-main.h support.c
$(SIM_EXTRA_DEPS
)
187 idecode.o
: sim-main.h idecode.c
$(SIM_EXTRA_DEPS
)
188 itable.o
: sim-main.h itable.c
$(SIM_EXTRA_DEPS
)
190 m16_semantics.o
: sim-main.h m16_semantics.c
$(SIM_EXTRA_DEPS
)
191 m16_support.o
: sim-main.h m16_support.c
$(SIM_EXTRA_DEPS
)
192 m16_idecode.o
: sim-main.h m16_idecode.c
$(SIM_EXTRA_DEPS
)
193 m16_icache.o
: sim-main.h m16_icache.c
$(SIM_EXTRA_DEPS
)
195 m32_semantics.o
: sim-main.h m32_semantics.c
$(SIM_EXTRA_DEPS
)
196 m32_support.o
: sim-main.h m32_support.c
$(SIM_EXTRA_DEPS
)
197 m32_idecode.o
: sim-main.h m32_idecode.c
$(SIM_EXTRA_DEPS
)
198 m32_icache.o
: sim-main.h m32_icache.c
$(SIM_EXTRA_DEPS
)
200 BUILT_SRC_FROM_M16
= \
223 $(BUILT_SRC_FROM_M16
): tmp-m16
225 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
226 cd ..
/igen
&& $(MAKE
)
233 -G gen-direct-access \
241 -n m16_icache.h
-hc tmp-icache.h \
242 -n m16_icache.c
-c tmp-icache.c \
243 -n m16_semantics.h
-hs tmp-semantics.h \
244 -n m16_semantics.c
-s tmp-semantics.c \
245 -n m16_idecode.h
-hd tmp-idecode.h \
246 -n m16_idecode.c
-d tmp-idecode.c \
247 -n m16_model.h
-hm tmp-model.h \
248 -n m16_model.c
-m tmp-model.c \
249 -n m16_support.h
-hf tmp-support.h \
250 -n m16_support.c
-f tmp-support.c \
252 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
253 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
254 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
255 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
256 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
257 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
258 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
259 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
260 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
261 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
268 -G gen-direct-access \
276 -n m32_icache.h
-hc tmp-icache.h \
277 -n m32_icache.c
-c tmp-icache.c \
278 -n m32_semantics.h
-hs tmp-semantics.h \
279 -n m32_semantics.c
-s tmp-semantics.c \
280 -n m32_idecode.h
-hd tmp-idecode.h \
281 -n m32_idecode.c
-d tmp-idecode.c \
282 -n m32_model.h
-hm tmp-model.h \
283 -n m32_model.c
-m tmp-model.c \
284 -n m32_support.h
-hf tmp-support.h \
285 -n m32_support.c
-f tmp-support.c \
287 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.h m32_icache.h
288 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.c m32_icache.c
289 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.h m32_idecode.h
290 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.c m32_idecode.c
291 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.h m32_semantics.h
292 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.c m32_semantics.c
293 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.h m32_model.h
294 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.c m32_model.c
295 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.h m32_support.h
296 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.c m32_support.c
303 @sim_igen_flags@ @sim_m16_flags@ \
304 -G gen-direct-access \
307 -n itable.h
-ht tmp-itable.h \
308 -n itable.c
-t tmp-itable.c \
310 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
311 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
315 BUILT_SRC_FROM_MULTI
= @sim_multi_src@
316 SIM_MULTI_IGEN_CONFIGS
= @sim_multi_igen_configs@
318 $(BUILT_SRC_FROM_MULTI
): tmp-multi
319 tmp-multi
: tmp-mach-multi tmp-itable-multi tmp-run-multi targ-vals.h
320 tmp-mach-multi
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
321 for t in
$(SIM_MULTI_IGEN_CONFIGS
); do \
322 p
=`echo $${t} | sed -e 's/:.*//'` ; \
323 m
=`echo $${t} | sed -e 's/.*:\(.*\):.*/\1/'` ; \
324 f
=`echo $${t} | sed -e 's/.*://'` ; \
326 m16
*) e
="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
327 *) e
="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
337 -G gen-direct-access \
342 -n
$${p}_icache.h
-hc tmp-icache.h \
343 -n
$${p}_icache.c
-c tmp-icache.c \
344 -n
$${p}_semantics.h
-hs tmp-semantics.h \
345 -n
$${p}_semantics.c
-s tmp-semantics.c \
346 -n
$${p}_idecode.h
-hd tmp-idecode.h \
347 -n
$${p}_idecode.c
-d tmp-idecode.c \
348 -n
$${p}_model.h
-hm tmp-model.h \
349 -n
$${p}_model.c
-m tmp-model.c \
350 -n
$${p}_support.h
-hf tmp-support.h \
351 -n
$${p}_support.c
-f tmp-support.c \
352 -n
$${p}_engine.h
-he tmp-engine.h \
353 -n
$${p}_engine.c
-e tmp-engine.c \
355 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.h
$${p}_icache.h
; \
356 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-icache.c
$${p}_icache.c
; \
357 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.h
$${p}_idecode.h
; \
358 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-idecode.c
$${p}_idecode.c
; \
359 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.h
$${p}_semantics.h
; \
360 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-semantics.c
$${p}_semantics.c
; \
361 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.h
$${p}_model.h
; \
362 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-model.c
$${p}_model.c
; \
363 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.h
$${p}_support.h
; \
364 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-support.c
$${p}_support.c
; \
365 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-engine.h
$${p}_engine.h
; \
366 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-engine.c
$${p}_engine.c
; \
369 tmp-itable-multi
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
378 -G gen-direct-access \
381 -n itable.h
-ht tmp-itable.h \
382 -n itable.c
-t tmp-itable.c \
384 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
385 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
386 touch tmp-itable-multi
387 tmp-run-multi
: $(srcdir)/m16run.c
388 for t in
$(SIM_MULTI_IGEN_CONFIGS
); do \
391 m
=`echo $${t} | sed -e 's/^m16//' -e 's/:.*//'`; \
392 sed
< $(srcdir)/m16run.c
> tmp-run \
393 -e
"s/^sim_/m16$${m}_/" \
394 -e
"s/m16_/m16$${m}_/" \
395 -e
"s/m32_/m32$${m}_/" ; \
396 $(SHELL
) $(srcdir)/..
/..
/move-if-change tmp-run m16
$${m}_run.c
; \
402 rm -f
$(BUILT_SRC_FROM_GEN
)
403 rm -f
$(BUILT_SRC_FROM_IGEN
)
404 rm -f
$(BUILT_SRC_FROM_M16
)
405 rm -f
$(BUILT_SRC_FROM_MULTI
)
407 rm -f m16
*.o m32
*.o itable
*.o
410 rm -f multi-include.h multi-run.c