1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
4 ## COMMON_PRE_CONFIG_FRAG
7 srcroot
=$(srcdir)/..
/..
/
47 MIPS_EXTRA_OBJS
= @mips_extra_objs@
50 $(SIM_@sim_gen@_OBJ
) \
51 $(SIM_NEW_COMMON_OBJS
) \
61 # List of flags to always pass to $(CC).
62 SIM_SUBTARGET
=@SIM_SUBTARGET@
64 SIM_NO_CFLAGS
= -DWITH_IGEN
=0
65 SIM_IGEN_CFLAGS
= -DWITH_IGEN
=1
66 SIM_M16_CFLAGS
= -DWITH_IGEN
=1
68 # FIXME: Hack to find syscall.h? Better support for syscall.h
72 -I
$(srcdir)/..
/..
/newlib
/libc
/sys
/idt \
73 $(SIM_@sim_gen@_CFLAGS
)
75 SIM_EXTRA_CLEAN
= clean-igen clean-m16 clean-extra
77 SIM_EXTRA_ALL
= $(SIM_@sim_gen@_ALL
)
79 # List of main object files for `run'.
84 ## COMMON_POST_CONFIG_FRAG
86 SIM_NO_INTERP
= oengine.c
87 interp.o
: $(srcdir)/interp.c config.h sim-main.h
$(SIM_@sim_gen@_INTERP
)
92 # Old deprecated generator
95 SIM_NO_ALL
= oengine.c
98 .
/gencode @SIMCONF@
> tmp-oengine
99 mv tmp-oengine oengine.c
101 gencode
: gencode.o getopt.o getopt1.o
102 $(CC_FOR_BUILD
) -o
$@ gencode.o getopt.o getopt1.o
104 gencode.o
: $(srcdir)/gencode.c
105 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/gencode.c
107 getopt.o
: $(srcdir)/..
/..
/libiberty
/getopt.c
108 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt.c
109 getopt1.o
: $(srcdir)/..
/..
/libiberty
/getopt1.c
110 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt1.c
115 cd ..
/igen
&& $(MAKE
)
117 IGEN_TRACE
= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
118 IGEN_INSN
=$(srcdir)/mips.igen
119 IGEN_DC
=$(srcdir)/mips.dc
120 M16_DC
=$(srcdir)/m16.dc
122 $(start-sanitize-r5900
) \
123 $(srcdir)/r5900.igen \
124 $(end-sanitize-r5900
) \
125 $(start-sanitize-vr5400
) \
126 $(srcdir)/vr5400.igen \
127 $(srcdir)/mdmx.igen \
128 $(end-sanitize-vr5400
) \
131 SIM_IGEN_ALL
= tmp-igen
133 BUILT_SRC_FROM_IGEN
= \
150 $(BUILT_SRC_FROM_IGEN
): tmp-igen
154 rm -f
$(BUILT_SRC_FROM_IGEN
)
157 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
158 cd ..
/igen
&& $(MAKE
)
165 -G gen-direct-access \
172 -n icache.h
-hc tmp-icache.h \
173 -n icache.c
-c tmp-icache.c \
174 -n semantics.h
-hs tmp-semantics.h \
175 -n semantics.c
-s tmp-semantics.c \
176 -n idecode.h
-hd tmp-idecode.h \
177 -n idecode.c
-d tmp-idecode.c \
178 -n model.h
-hm tmp-model.h \
179 -n model.c
-m tmp-model.c \
180 -n support.h
-hf tmp-support.h \
181 -n support.c
-f tmp-support.c \
182 -n itable.h
-ht tmp-itable.h \
183 -n itable.c
-t tmp-itable.c \
184 -n engine.h
-he tmp-engine.h \
185 -n engine.c
-e tmp-engine.c \
186 -n irun.c
-r tmp-irun.c
187 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
188 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
189 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
190 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
191 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
192 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
193 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
194 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
195 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
196 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
197 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
198 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
199 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
200 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
201 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
204 semantics.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
205 engine.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
206 support.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
207 idecode.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
208 itable.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
212 SIM_M16_ALL
= tmp-m16
214 BUILT_SRC_FROM_M16
= \
240 $(BUILT_SRC_FROM_M16
): tmp-m16
244 rm -f
$(BUILT_SRC_FROM_M16
)
247 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
248 cd ..
/igen
&& $(MAKE
)
255 -G gen-direct-access \
263 -n m16_icache.h
-hc tmp-icache.h \
264 -n m16_icache.c
-c tmp-icache.c \
265 -n m16_semantics.h
-hs tmp-semantics.h \
266 -n m16_semantics.c
-s tmp-semantics.c \
267 -n m16_idecode.h
-hd tmp-idecode.h \
268 -n m16_idecode.c
-d tmp-idecode.c \
269 -n m16_model.h
-hm tmp-model.h \
270 -n m16_model.c
-m tmp-model.c \
271 -n m16_support.h
-hf tmp-support.h \
272 -n m16_support.c
-f tmp-support.c \
274 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
275 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
276 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
277 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
278 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
279 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
280 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
281 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
282 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
283 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
290 -G gen-direct-access \
298 -n m32_icache.h
-hc tmp-icache.h \
299 -n m32_icache.c
-c tmp-icache.c \
300 -n m32_semantics.h
-hs tmp-semantics.h \
301 -n m32_semantics.c
-s tmp-semantics.c \
302 -n m32_idecode.h
-hd tmp-idecode.h \
303 -n m32_idecode.c
-d tmp-idecode.c \
304 -n m32_model.h
-hm tmp-model.h \
305 -n m32_model.c
-m tmp-model.c \
306 -n m32_support.h
-hf tmp-support.h \
307 -n m32_support.c
-f tmp-support.c \
309 $(srcdir)/..
/..
/move-if-change tmp-icache.h m32_icache.h
310 $(srcdir)/..
/..
/move-if-change tmp-icache.c m32_icache.c
311 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m32_idecode.h
312 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m32_idecode.c
313 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m32_semantics.h
314 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m32_semantics.c
315 $(srcdir)/..
/..
/move-if-change tmp-model.h m32_model.h
316 $(srcdir)/..
/..
/move-if-change tmp-model.c m32_model.c
317 $(srcdir)/..
/..
/move-if-change tmp-support.h m32_support.h
318 $(srcdir)/..
/..
/move-if-change tmp-support.c m32_support.c
325 @sim_igen_flags@ @sim_m16_flags@ \
326 -G gen-direct-access \
329 -n itable.h
-ht tmp-itable.h \
330 -n itable.c
-t tmp-itable.c \
332 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
333 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
338 rm -f gencode oengine.c tmp.igen