1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
4 ## COMMON_PRE_CONFIG_FRAG
7 srcroot
=$(srcdir)/..
/..
/
31 $(SIM_@sim_gen@_OBJ
) \
54 # List of flags to always pass to $(CC).
55 SIM_SUBTARGET
=@SIM_SUBTARGET@
57 SIM_NO_CFLAGS
= -DWITH_IGEN
=0
58 SIM_IGEN_CFLAGS
= -DWITH_IGEN
=1
59 SIM_M16_CFLAGS
= -DWITH_IGEN
=1
61 # FIXME: Hack to find syscall.h? Better support for syscall.h
65 -I
$(srcdir)/..
/..
/newlib
/libc
/sys
/idt \
66 $(SIM_@sim_gen@_CFLAGS
)
68 SIM_EXTRA_CLEAN
= clean-igen clean-m16 clean-extra
70 SIM_EXTRA_ALL
= $(SIM_@sim_gen@_ALL
)
72 # List of main object files for `run'.
77 ## COMMON_POST_CONFIG_FRAG
79 interp.o
: $(srcdir)/interp.c config.h sim-main.h 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
100 IGEN_TRACE
= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
101 IGEN_INSN
=$(srcdir)/mips.igen
102 IGEN_DC
=$(srcdir)/mips.dc
104 $(start-sanitize-r5900
) \
105 $(srcdir)/r5900.igen \
106 $(end-sanitize-r5900
) \
107 $(start-sanitize-vr5400
) \
108 $(srcdir)/vr5400.igen \
109 $(end-sanitize-vr5400
) \
112 SIM_IGEN_ALL
= tmp-igen
114 BUILT_SRC_FROM_IGEN
= \
131 $(BUILT_SRC_FROM_IGEN
): tmp-igen
135 rm -f
$(BUILT_SRC_FROM_IGEN
)
138 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
139 cd ..
/igen
&& $(MAKE
)
146 -G gen-direct-access \
150 -n icache.h
-hc tmp-icache.h \
151 -n icache.c
-c tmp-icache.c \
152 -n semantics.h
-hs tmp-semantics.h \
153 -n semantics.c
-s tmp-semantics.c \
154 -n idecode.h
-hd tmp-idecode.h \
155 -n idecode.c
-d tmp-idecode.c \
156 -n model.h
-hm tmp-model.h \
157 -n model.c
-m tmp-model.c \
158 -n support.h
-hf tmp-support.h \
159 -n support.c
-f tmp-support.c \
160 -n itable.h
-ht tmp-itable.h \
161 -n itable.c
-t tmp-itable.c \
162 -n engine.h
-he tmp-engine.h \
163 -n engine.c
-e tmp-engine.c \
164 -n irun.c
-r tmp-irun.c
165 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
166 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
167 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
168 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
169 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
170 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
171 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
172 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
173 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
174 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
175 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
176 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
177 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
178 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
179 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
184 SIM_M16_ALL
= tmp-igen
$(SIM_M16_ALL
)
186 BUILT_SRC_FROM_M16
= \
203 $(BUILT_SRC_FROM_M16
): tmp-m16
207 rm -f
$(BUILT_SRC_FROM_M16
)
210 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
211 cd ..
/igen
&& $(MAKE
)
219 -G gen-direct-access \
223 -n m16_icache.h
-hc tmp-icache.h \
224 -n m16_icache.c
-c tmp-icache.c \
225 -n m16_semantics.h
-hs tmp-semantics.h \
226 -n m16_semantics.c
-s tmp-semantics.c \
227 -n m16_idecode.h
-hd tmp-idecode.h \
228 -n m16_idecode.c
-d tmp-idecode.c \
229 -n m16_model.h
-hm tmp-model.h \
230 -n m16_model.c
-m tmp-model.c \
231 -n m16_support.h
-hf tmp-support.h \
232 -n m16_support.c
-f tmp-support.c \
233 -n m16_itable.h
-ht tmp-itable.h \
234 -n m16_itable.c
-t tmp-itable.c \
235 -n m16_engine.h
-he tmp-engine.h \
236 -n m16_engine.c
-e tmp-engine.c \
237 -n m16_irun.c
-r tmp-irun.c
238 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
239 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
240 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
241 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
242 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
243 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
244 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
245 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
246 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
247 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
248 $(srcdir)/..
/..
/move-if-change tmp-itable.h m16_itable.h
249 $(srcdir)/..
/..
/move-if-change tmp-itable.c m16_itable.c
250 $(srcdir)/..
/..
/move-if-change tmp-engine.h m16_engine.h
251 $(srcdir)/..
/..
/move-if-change tmp-engine.c m16_engine.c
252 $(srcdir)/..
/..
/move-if-change tmp-irun.c m16_irun.c
257 rm -f gencode oengine.c tmp.igen