1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
4 ## COMMON_PRE_CONFIG_FRAG
7 srcroot
=$(srcdir)/..
/..
/
48 MIPS_EXTRA_OBJS
= @mips_extra_objs@
49 MIPS_EXTRA_LIBS
= @mips_extra_libs@
52 $(SIM_@sim_gen@_OBJ
) \
53 $(SIM_NEW_COMMON_OBJS
) \
63 # List of flags to always pass to $(CC).
64 SIM_SUBTARGET
=@SIM_SUBTARGET@
66 SIM_NO_CFLAGS
= -DWITH_IGEN
=0
67 SIM_IGEN_CFLAGS
= -DWITH_IGEN
=1
68 SIM_M16_CFLAGS
= -DWITH_IGEN
=1
70 # FIXME: Hack to find syscall.h? Better support for syscall.h
74 -I
$(srcdir)/..
/..
/newlib
/libc
/sys
/idt \
75 $(SIM_@sim_gen@_CFLAGS
)
77 SIM_EXTRA_CLEAN
= clean-extra
79 SIM_EXTRA_ALL
= $(SIM_@sim_gen@_ALL
)
81 SIM_EXTRA_LIBS
= $(MIPS_EXTRA_LIBS
)
83 # List of main object files for `run'.
88 ## COMMON_POST_CONFIG_FRAG
90 SIM_NO_INTERP
= oengine.c
91 interp.o
: $(srcdir)/interp.c config.h sim-main.h
$(SIM_@sim_gen@_INTERP
)
96 # Old deprecated generator
99 SIM_NO_ALL
= oengine.c
102 .
/gencode @SIMCONF@
> tmp-oengine
103 mv tmp-oengine oengine.c
105 gencode
: gencode.o getopt.o getopt1.o
106 $(CC_FOR_BUILD
) -o
$@ gencode.o getopt.o getopt1.o
108 gencode.o
: $(srcdir)/gencode.c
109 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/gencode.c
111 getopt.o
: $(srcdir)/..
/..
/libiberty
/getopt.c
112 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt.c
113 getopt1.o
: $(srcdir)/..
/..
/libiberty
/getopt1.c
114 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt1.c
119 cd ..
/igen
&& $(MAKE
)
121 IGEN_TRACE
= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
122 IGEN_INSN
=$(srcdir)/mips.igen
123 IGEN_DC
=$(srcdir)/mips.dc
124 M16_DC
=$(srcdir)/m16.dc
126 $(start-sanitize-r5900
) \
127 $(srcdir)/r5900.igen \
128 $(end-sanitize-r5900
) \
129 $(start-sanitize-vr5400
) \
130 $(srcdir)/vr5400.igen \
131 $(srcdir)/mdmx.igen \
132 $(end-sanitize-vr5400
) \
133 $(start-sanitize-vr4320
) \
134 $(srcdir)/vr4320.igen \
135 $(end-sanitize-vr4320
) \
138 SIM_IGEN_ALL
= tmp-igen
140 BUILT_SRC_FROM_IGEN
= \
155 # NB: Since these can be built by either tmp-igen or tmp-m16
156 # they are explicitly marked as being dependant on the
157 # dependant on the selected generator.
158 BUILT_SRC_FROM_GEN
= \
162 $(BUILT_SRC_FROM_GEN
): $(SIM_@sim_gen@_ALL
)
165 $(BUILT_SRC_FROM_IGEN
): tmp-igen
167 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
168 cd ..
/igen
&& $(MAKE
)
175 -G gen-direct-access \
182 -n icache.h
-hc tmp-icache.h \
183 -n icache.c
-c tmp-icache.c \
184 -n semantics.h
-hs tmp-semantics.h \
185 -n semantics.c
-s tmp-semantics.c \
186 -n idecode.h
-hd tmp-idecode.h \
187 -n idecode.c
-d tmp-idecode.c \
188 -n model.h
-hm tmp-model.h \
189 -n model.c
-m tmp-model.c \
190 -n support.h
-hf tmp-support.h \
191 -n support.c
-f tmp-support.c \
192 -n itable.h
-ht tmp-itable.h \
193 -n itable.c
-t tmp-itable.c \
194 -n engine.h
-he tmp-engine.h \
195 -n engine.c
-e tmp-engine.c \
196 -n irun.c
-r tmp-irun.c
197 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
198 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
199 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
200 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
201 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
202 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
203 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
204 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
205 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
206 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
207 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
208 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
209 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
210 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
211 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
214 semantics.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
215 engine.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
216 support.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
217 idecode.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
218 itable.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
222 SIM_M16_ALL
= tmp-m16
224 BUILT_SRC_FROM_M16
= \
247 $(BUILT_SRC_FROM_M16
): tmp-m16
249 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
250 cd ..
/igen
&& $(MAKE
)
257 -G gen-direct-access \
265 -n m16_icache.h
-hc tmp-icache.h \
266 -n m16_icache.c
-c tmp-icache.c \
267 -n m16_semantics.h
-hs tmp-semantics.h \
268 -n m16_semantics.c
-s tmp-semantics.c \
269 -n m16_idecode.h
-hd tmp-idecode.h \
270 -n m16_idecode.c
-d tmp-idecode.c \
271 -n m16_model.h
-hm tmp-model.h \
272 -n m16_model.c
-m tmp-model.c \
273 -n m16_support.h
-hf tmp-support.h \
274 -n m16_support.c
-f tmp-support.c \
276 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
277 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
278 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
279 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
280 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
281 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
282 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
283 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
284 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
285 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
292 -G gen-direct-access \
300 -n m32_icache.h
-hc tmp-icache.h \
301 -n m32_icache.c
-c tmp-icache.c \
302 -n m32_semantics.h
-hs tmp-semantics.h \
303 -n m32_semantics.c
-s tmp-semantics.c \
304 -n m32_idecode.h
-hd tmp-idecode.h \
305 -n m32_idecode.c
-d tmp-idecode.c \
306 -n m32_model.h
-hm tmp-model.h \
307 -n m32_model.c
-m tmp-model.c \
308 -n m32_support.h
-hf tmp-support.h \
309 -n m32_support.c
-f tmp-support.c \
311 $(srcdir)/..
/..
/move-if-change tmp-icache.h m32_icache.h
312 $(srcdir)/..
/..
/move-if-change tmp-icache.c m32_icache.c
313 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m32_idecode.h
314 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m32_idecode.c
315 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m32_semantics.h
316 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m32_semantics.c
317 $(srcdir)/..
/..
/move-if-change tmp-model.h m32_model.h
318 $(srcdir)/..
/..
/move-if-change tmp-model.c m32_model.c
319 $(srcdir)/..
/..
/move-if-change tmp-support.h m32_support.h
320 $(srcdir)/..
/..
/move-if-change tmp-support.c m32_support.c
327 @sim_igen_flags@ @sim_m16_flags@ \
328 -G gen-direct-access \
331 -n itable.h
-ht tmp-itable.h \
332 -n itable.c
-t tmp-itable.c \
334 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
335 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
340 rm -f gencode oengine.c tmp.igen
341 rm -f
$(BUILT_SRC_FROM_GEN
)
342 rm -f
$(BUILT_SRC_FROM_IGEN
)
343 rm -f
$(BUILT_SRC_FROM_M16
)