1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
4 ## COMMON_PRE_CONFIG_FRAG
7 srcroot
=$(srcdir)/..
/..
/
35 $(SIM_@sim_gen@_OBJ
) \
36 $(SIM_NEW_COMMON_OBJS
) \
45 # List of flags to always pass to $(CC).
46 SIM_SUBTARGET
=@SIM_SUBTARGET@
48 SIM_NO_CFLAGS
= -DWITH_IGEN
=0
49 SIM_IGEN_CFLAGS
= -DWITH_IGEN
=1
50 SIM_M16_CFLAGS
= -DWITH_IGEN
=1
52 # FIXME: Hack to find syscall.h? Better support for syscall.h
56 -I
$(srcdir)/..
/..
/newlib
/libc
/sys
/idt \
57 $(SIM_@sim_gen@_CFLAGS
)
59 SIM_EXTRA_CLEAN
= clean-igen clean-m16 clean-extra
61 SIM_EXTRA_ALL
= $(SIM_@sim_gen@_ALL
)
63 # List of main object files for `run'.
68 ## COMMON_POST_CONFIG_FRAG
70 SIM_NO_INTERP
= oengine.c
71 interp.o
: $(srcdir)/interp.c config.h sim-main.h
$(SIM_@sim_gen@_INTERP
)
76 # Old deprecated generator
79 SIM_NO_ALL
= oengine.c
82 .
/gencode @SIMCONF@
> tmp-oengine
83 mv tmp-oengine oengine.c
85 gencode
: gencode.o getopt.o getopt1.o
86 $(CC_FOR_BUILD
) -o
$@ gencode.o getopt.o getopt1.o
88 gencode.o
: $(srcdir)/gencode.c
89 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/gencode.c
91 getopt.o
: $(srcdir)/..
/..
/libiberty
/getopt.c
92 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt.c
93 getopt1.o
: $(srcdir)/..
/..
/libiberty
/getopt1.c
94 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt1.c
101 IGEN_TRACE
= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
102 IGEN_INSN
=$(srcdir)/mips.igen
103 IGEN_DC
=$(srcdir)/mips.dc
104 M16_DC
=$(srcdir)/m16.dc
106 $(start-sanitize-r5900
) \
107 $(srcdir)/r5900.igen \
108 $(end-sanitize-r5900
) \
109 $(start-sanitize-vr5400
) \
110 $(srcdir)/vr5400.igen \
111 $(srcdir)/mdmx.igen \
112 $(end-sanitize-vr5400
) \
115 SIM_IGEN_ALL
= tmp-igen
117 BUILT_SRC_FROM_IGEN
= \
134 $(BUILT_SRC_FROM_IGEN
): tmp-igen
138 rm -f
$(BUILT_SRC_FROM_IGEN
)
141 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
142 cd ..
/igen
&& $(MAKE
)
149 -G gen-direct-access \
156 -n icache.h
-hc tmp-icache.h \
157 -n icache.c
-c tmp-icache.c \
158 -n semantics.h
-hs tmp-semantics.h \
159 -n semantics.c
-s tmp-semantics.c \
160 -n idecode.h
-hd tmp-idecode.h \
161 -n idecode.c
-d tmp-idecode.c \
162 -n model.h
-hm tmp-model.h \
163 -n model.c
-m tmp-model.c \
164 -n support.h
-hf tmp-support.h \
165 -n support.c
-f tmp-support.c \
166 -n itable.h
-ht tmp-itable.h \
167 -n itable.c
-t tmp-itable.c \
168 -n engine.h
-he tmp-engine.h \
169 -n engine.c
-e tmp-engine.c \
170 -n irun.c
-r tmp-irun.c
171 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
172 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
173 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
174 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
175 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
176 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
177 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
178 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
179 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
180 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
181 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
182 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
183 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
184 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
185 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
188 semantics.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
189 engine.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
190 support.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
191 idecode.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
192 itable.o
: sim-main.h
$(SIM_EXTRA_DEPS
)
196 SIM_M16_ALL
= tmp-m16
198 BUILT_SRC_FROM_M16
= \
224 $(BUILT_SRC_FROM_M16
): tmp-m16
228 rm -f
$(BUILT_SRC_FROM_M16
)
231 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
232 cd ..
/igen
&& $(MAKE
)
239 -G gen-direct-access \
247 -n m16_icache.h
-hc tmp-icache.h \
248 -n m16_icache.c
-c tmp-icache.c \
249 -n m16_semantics.h
-hs tmp-semantics.h \
250 -n m16_semantics.c
-s tmp-semantics.c \
251 -n m16_idecode.h
-hd tmp-idecode.h \
252 -n m16_idecode.c
-d tmp-idecode.c \
253 -n m16_model.h
-hm tmp-model.h \
254 -n m16_model.c
-m tmp-model.c \
255 -n m16_support.h
-hf tmp-support.h \
256 -n m16_support.c
-f tmp-support.c \
258 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
259 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
260 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
261 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
262 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
263 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
264 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
265 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
266 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
267 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
274 -G gen-direct-access \
282 -n m32_icache.h
-hc tmp-icache.h \
283 -n m32_icache.c
-c tmp-icache.c \
284 -n m32_semantics.h
-hs tmp-semantics.h \
285 -n m32_semantics.c
-s tmp-semantics.c \
286 -n m32_idecode.h
-hd tmp-idecode.h \
287 -n m32_idecode.c
-d tmp-idecode.c \
288 -n m32_model.h
-hm tmp-model.h \
289 -n m32_model.c
-m tmp-model.c \
290 -n m32_support.h
-hf tmp-support.h \
291 -n m32_support.c
-f tmp-support.c \
293 $(srcdir)/..
/..
/move-if-change tmp-icache.h m32_icache.h
294 $(srcdir)/..
/..
/move-if-change tmp-icache.c m32_icache.c
295 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m32_idecode.h
296 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m32_idecode.c
297 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m32_semantics.h
298 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m32_semantics.c
299 $(srcdir)/..
/..
/move-if-change tmp-model.h m32_model.h
300 $(srcdir)/..
/..
/move-if-change tmp-model.c m32_model.c
301 $(srcdir)/..
/..
/move-if-change tmp-support.h m32_support.h
302 $(srcdir)/..
/..
/move-if-change tmp-support.c m32_support.c
309 @sim_igen_flags@ @sim_m16_flags@ \
310 -G gen-direct-access \
313 -n itable.h
-ht tmp-itable.h \
314 -n itable.c
-t tmp-itable.c \
316 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
317 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
322 rm -f gencode oengine.c tmp.igen