1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
4 ## COMMON_PRE_CONFIG_FRAG
7 srcroot
=$(srcdir)/..
/..
/
53 MIPS_EXTRA_OBJS
= @mips_extra_objs@
54 MIPS_EXTRA_LIBS
= @mips_extra_libs@
57 $(SIM_@sim_gen@_OBJ
) \
58 $(SIM_NEW_COMMON_OBJS
) \
69 # List of flags to always pass to $(CC).
70 SIM_SUBTARGET
=@SIM_SUBTARGET@
72 SIM_NO_CFLAGS
= -DWITH_IGEN
=0
73 SIM_IGEN_CFLAGS
= -DWITH_IGEN
=1
74 SIM_M16_CFLAGS
= -DWITH_IGEN
=1
76 # FIXME: Hack to find syscall.h? Better support for syscall.h
80 -I
$(srcdir)/..
/..
/newlib
/libc
/sys
/idt \
81 $(SIM_@sim_gen@_CFLAGS
)
83 SIM_EXTRA_CLEAN
= clean-extra
85 SIM_EXTRA_ALL
= $(SIM_@sim_gen@_ALL
)
87 SIM_EXTRA_LIBS
= $(MIPS_EXTRA_LIBS
)
89 # List of main object files for `run'.
94 ## COMMON_POST_CONFIG_FRAG
96 SIM_NO_INTERP
= oengine.c
97 interp.o
: $(srcdir)/interp.c config.h sim-main.h
$(SIM_@sim_gen@_INTERP
)
102 # Old deprecated generator
105 SIM_NO_ALL
= oengine.c
108 .
/gencode @SIMCONF@
> tmp-oengine
109 mv tmp-oengine oengine.c
111 gencode
: gencode.o getopt.o getopt1.o
112 $(CC_FOR_BUILD
) -o
$@ gencode.o getopt.o getopt1.o
114 gencode.o
: $(srcdir)/gencode.c
115 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/gencode.c
117 getopt.o
: $(srcdir)/..
/..
/libiberty
/getopt.c
118 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt.c
119 getopt1.o
: $(srcdir)/..
/..
/libiberty
/getopt1.c
120 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt1.c
125 cd ..
/igen
&& $(MAKE
)
127 IGEN_TRACE
= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all
128 IGEN_INSN
=$(srcdir)/mips.igen
129 IGEN_DC
=$(srcdir)/mips.dc
130 M16_DC
=$(srcdir)/m16.dc
132 $(start-sanitize-r5900
) \
133 $(srcdir)/r5900.igen \
134 $(end-sanitize-r5900
) \
135 $(start-sanitize-cygnus
) \
136 $(srcdir)/mdmx.igen \
137 $(end-sanitize-cygnus
) \
142 SIM_IGEN_ALL
= tmp-igen
144 BUILT_SRC_FROM_IGEN
= \
159 # NB: Since these can be built by either tmp-igen or tmp-m16
160 # they are explicitly marked as being dependant on the
161 # dependant on the selected generator.
162 BUILT_SRC_FROM_GEN
= \
166 $(BUILT_SRC_FROM_GEN
): $(SIM_@sim_gen@_ALL
)
169 $(BUILT_SRC_FROM_IGEN
): tmp-igen
171 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
172 cd ..
/igen
&& $(MAKE
)
179 -G gen-direct-access \
186 -n icache.h
-hc tmp-icache.h \
187 -n icache.c
-c tmp-icache.c \
188 -n semantics.h
-hs tmp-semantics.h \
189 -n semantics.c
-s tmp-semantics.c \
190 -n idecode.h
-hd tmp-idecode.h \
191 -n idecode.c
-d tmp-idecode.c \
192 -n model.h
-hm tmp-model.h \
193 -n model.c
-m tmp-model.c \
194 -n support.h
-hf tmp-support.h \
195 -n support.c
-f tmp-support.c \
196 -n itable.h
-ht tmp-itable.h \
197 -n itable.c
-t tmp-itable.c \
198 -n engine.h
-he tmp-engine.h \
199 -n engine.c
-e tmp-engine.c \
200 -n irun.c
-r tmp-irun.c
201 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
202 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
203 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
204 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
205 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
206 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
207 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
208 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
209 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
210 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
211 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
212 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
213 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
214 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
215 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
218 semantics.o
: sim-main.h semantics.c
$(SIM_EXTRA_DEPS
)
219 engine.o
: sim-main.h engine.c
$(SIM_EXTRA_DEPS
)
220 support.o
: sim-main.h support.c
$(SIM_EXTRA_DEPS
)
221 idecode.o
: sim-main.h idecode.c
$(SIM_EXTRA_DEPS
)
222 itable.o
: sim-main.h itable.c
$(SIM_EXTRA_DEPS
)
226 SIM_M16_ALL
= tmp-m16
228 BUILT_SRC_FROM_M16
= \
251 $(BUILT_SRC_FROM_M16
): tmp-m16
253 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
254 cd ..
/igen
&& $(MAKE
)
261 -G gen-direct-access \
269 -n m16_icache.h
-hc tmp-icache.h \
270 -n m16_icache.c
-c tmp-icache.c \
271 -n m16_semantics.h
-hs tmp-semantics.h \
272 -n m16_semantics.c
-s tmp-semantics.c \
273 -n m16_idecode.h
-hd tmp-idecode.h \
274 -n m16_idecode.c
-d tmp-idecode.c \
275 -n m16_model.h
-hm tmp-model.h \
276 -n m16_model.c
-m tmp-model.c \
277 -n m16_support.h
-hf tmp-support.h \
278 -n m16_support.c
-f tmp-support.c \
280 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
281 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
282 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
283 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
284 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
285 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
286 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
287 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
288 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
289 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
296 -G gen-direct-access \
304 -n m32_icache.h
-hc tmp-icache.h \
305 -n m32_icache.c
-c tmp-icache.c \
306 -n m32_semantics.h
-hs tmp-semantics.h \
307 -n m32_semantics.c
-s tmp-semantics.c \
308 -n m32_idecode.h
-hd tmp-idecode.h \
309 -n m32_idecode.c
-d tmp-idecode.c \
310 -n m32_model.h
-hm tmp-model.h \
311 -n m32_model.c
-m tmp-model.c \
312 -n m32_support.h
-hf tmp-support.h \
313 -n m32_support.c
-f tmp-support.c \
315 $(srcdir)/..
/..
/move-if-change tmp-icache.h m32_icache.h
316 $(srcdir)/..
/..
/move-if-change tmp-icache.c m32_icache.c
317 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m32_idecode.h
318 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m32_idecode.c
319 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m32_semantics.h
320 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m32_semantics.c
321 $(srcdir)/..
/..
/move-if-change tmp-model.h m32_model.h
322 $(srcdir)/..
/..
/move-if-change tmp-model.c m32_model.c
323 $(srcdir)/..
/..
/move-if-change tmp-support.h m32_support.h
324 $(srcdir)/..
/..
/move-if-change tmp-support.c m32_support.c
331 @sim_igen_flags@ @sim_m16_flags@ \
332 -G gen-direct-access \
335 -n itable.h
-ht tmp-itable.h \
336 -n itable.c
-t tmp-itable.c \
338 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
339 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
344 rm -f gencode oengine.c tmp.igen
345 rm -f
$(BUILT_SRC_FROM_GEN
)
346 rm -f
$(BUILT_SRC_FROM_IGEN
)
347 rm -f
$(BUILT_SRC_FROM_M16
)