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
) \
55 # List of flags to always pass to $(CC).
56 SIM_SUBTARGET
=@SIM_SUBTARGET@
58 SIM_NO_CFLAGS
= -DWITH_IGEN
=0
59 SIM_IGEN_CFLAGS
= -DWITH_IGEN
=1
60 SIM_M16_CFLAGS
= -DWITH_IGEN
=1
62 # FIXME: Hack to find syscall.h? Better support for syscall.h
66 -I
$(srcdir)/..
/..
/newlib
/libc
/sys
/idt \
67 $(SIM_@sim_gen@_CFLAGS
)
69 SIM_EXTRA_CLEAN
= clean-igen clean-m16 clean-extra
71 SIM_EXTRA_ALL
= $(SIM_@sim_gen@_ALL
)
73 # List of main object files for `run'.
78 ## COMMON_POST_CONFIG_FRAG
80 interp.o
: $(srcdir)/interp.c config.h sim-main.h oengine.c
83 .
/gencode @SIMCONF@
> tmp-oengine
84 mv tmp-oengine oengine.c
86 gencode
: gencode.o getopt.o getopt1.o
87 $(CC_FOR_BUILD
) -o
$@ gencode.o getopt.o getopt1.o
89 gencode.o
: $(srcdir)/gencode.c
90 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/gencode.c
92 getopt.o
: $(srcdir)/..
/..
/libiberty
/getopt.c
93 $(CC_FOR_BUILD
) -c
-g
-I
${srcroot}/include $(srcdir)/..
/..
/libiberty
/getopt.c
94 getopt1.o
: $(srcdir)/..
/..
/libiberty
/getopt1.c
95 $(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
105 $(start-sanitize-r5900
) \
106 $(srcdir)/r5900.igen \
107 $(end-sanitize-r5900
) \
108 $(start-sanitize-vr5400
) \
109 $(srcdir)/vr5400.igen \
110 $(end-sanitize-vr5400
) \
113 SIM_IGEN_ALL
= tmp-igen
115 BUILT_SRC_FROM_IGEN
= \
132 $(BUILT_SRC_FROM_IGEN
): tmp-igen
136 rm -f
$(BUILT_SRC_FROM_IGEN
)
139 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
140 cd ..
/igen
&& $(MAKE
)
147 -G gen-direct-access \
151 -n icache.h
-hc tmp-icache.h \
152 -n icache.c
-c tmp-icache.c \
153 -n semantics.h
-hs tmp-semantics.h \
154 -n semantics.c
-s tmp-semantics.c \
155 -n idecode.h
-hd tmp-idecode.h \
156 -n idecode.c
-d tmp-idecode.c \
157 -n model.h
-hm tmp-model.h \
158 -n model.c
-m tmp-model.c \
159 -n support.h
-hf tmp-support.h \
160 -n support.c
-f tmp-support.c \
161 -n itable.h
-ht tmp-itable.h \
162 -n itable.c
-t tmp-itable.c \
163 -n engine.h
-he tmp-engine.h \
164 -n engine.c
-e tmp-engine.c \
165 -n irun.c
-r tmp-irun.c
166 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
167 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
168 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
169 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
170 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
171 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
172 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
173 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
174 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
175 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
176 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
177 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
178 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
179 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
180 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
185 SIM_M16_ALL
= tmp-igen
$(SIM_M16_ALL
)
187 BUILT_SRC_FROM_M16
= \
204 $(BUILT_SRC_FROM_M16
): tmp-m16
208 rm -f
$(BUILT_SRC_FROM_M16
)
211 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
$(IGEN_INCLUDE
)
212 cd ..
/igen
&& $(MAKE
)
220 -G gen-direct-access \
224 -n m16_icache.h
-hc tmp-icache.h \
225 -n m16_icache.c
-c tmp-icache.c \
226 -n m16_semantics.h
-hs tmp-semantics.h \
227 -n m16_semantics.c
-s tmp-semantics.c \
228 -n m16_idecode.h
-hd tmp-idecode.h \
229 -n m16_idecode.c
-d tmp-idecode.c \
230 -n m16_model.h
-hm tmp-model.h \
231 -n m16_model.c
-m tmp-model.c \
232 -n m16_support.h
-hf tmp-support.h \
233 -n m16_support.c
-f tmp-support.c \
234 -n m16_itable.h
-ht tmp-itable.h \
235 -n m16_itable.c
-t tmp-itable.c \
236 -n m16_engine.h
-he tmp-engine.h \
237 -n m16_engine.c
-e tmp-engine.c \
238 -n m16_irun.c
-r tmp-irun.c
239 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
240 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
241 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
242 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
243 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
244 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
245 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
246 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
247 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
248 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
249 $(srcdir)/..
/..
/move-if-change tmp-itable.h m16_itable.h
250 $(srcdir)/..
/..
/move-if-change tmp-itable.c m16_itable.c
251 $(srcdir)/..
/..
/move-if-change tmp-engine.h m16_engine.h
252 $(srcdir)/..
/..
/move-if-change tmp-engine.c m16_engine.c
253 $(srcdir)/..
/..
/move-if-change tmp-irun.c m16_irun.c
258 rm -f gencode oengine.c tmp.igen