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
105 SIM_IGEN_ALL
= tmp-igen
107 BUILT_SRC_FROM_IGEN
= \
124 $(BUILT_SRC_FROM_IGEN
): tmp-igen
128 rm -f
$(BUILT_SRC_FROM_IGEN
)
131 tmp-igen
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
132 cd ..
/igen
&& $(MAKE
)
139 -G gen-direct-access \
143 -n icache.h
-hc tmp-icache.h \
144 -n icache.c
-c tmp-icache.c \
145 -n semantics.h
-hs tmp-semantics.h \
146 -n semantics.c
-s tmp-semantics.c \
147 -n idecode.h
-hd tmp-idecode.h \
148 -n idecode.c
-d tmp-idecode.c \
149 -n model.h
-hm tmp-model.h \
150 -n model.c
-m tmp-model.c \
151 -n support.h
-hf tmp-support.h \
152 -n support.c
-f tmp-support.c \
153 -n itable.h
-ht tmp-itable.h \
154 -n itable.c
-t tmp-itable.c \
155 -n engine.h
-he tmp-engine.h \
156 -n engine.c
-e tmp-engine.c \
157 -n irun.c
-r tmp-irun.c
158 $(srcdir)/..
/..
/move-if-change tmp-icache.h icache.h
159 $(srcdir)/..
/..
/move-if-change tmp-icache.c icache.c
160 $(srcdir)/..
/..
/move-if-change tmp-idecode.h idecode.h
161 $(srcdir)/..
/..
/move-if-change tmp-idecode.c idecode.c
162 $(srcdir)/..
/..
/move-if-change tmp-semantics.h semantics.h
163 $(srcdir)/..
/..
/move-if-change tmp-semantics.c semantics.c
164 $(srcdir)/..
/..
/move-if-change tmp-model.h model.h
165 $(srcdir)/..
/..
/move-if-change tmp-model.c model.c
166 $(srcdir)/..
/..
/move-if-change tmp-support.h support.h
167 $(srcdir)/..
/..
/move-if-change tmp-support.c support.c
168 $(srcdir)/..
/..
/move-if-change tmp-itable.h itable.h
169 $(srcdir)/..
/..
/move-if-change tmp-itable.c itable.c
170 $(srcdir)/..
/..
/move-if-change tmp-engine.h engine.h
171 $(srcdir)/..
/..
/move-if-change tmp-engine.c engine.c
172 $(srcdir)/..
/..
/move-if-change tmp-irun.c irun.c
177 SIM_M16_ALL
= tmp-igen
$(SIM_M16_ALL
)
179 BUILT_SRC_FROM_M16
= \
196 $(BUILT_SRC_FROM_M16
): tmp-m16
200 rm -f
$(BUILT_SRC_FROM_M16
)
203 tmp-m16
: $(IGEN_INSN
) $(IGEN_DC
) ..
/igen
/igen
204 cd ..
/igen
&& $(MAKE
)
212 -G gen-direct-access \
216 -n m16_icache.h
-hc tmp-icache.h \
217 -n m16_icache.c
-c tmp-icache.c \
218 -n m16_semantics.h
-hs tmp-semantics.h \
219 -n m16_semantics.c
-s tmp-semantics.c \
220 -n m16_idecode.h
-hd tmp-idecode.h \
221 -n m16_idecode.c
-d tmp-idecode.c \
222 -n m16_model.h
-hm tmp-model.h \
223 -n m16_model.c
-m tmp-model.c \
224 -n m16_support.h
-hf tmp-support.h \
225 -n m16_support.c
-f tmp-support.c \
226 -n m16_itable.h
-ht tmp-itable.h \
227 -n m16_itable.c
-t tmp-itable.c \
228 -n m16_engine.h
-he tmp-engine.h \
229 -n m16_engine.c
-e tmp-engine.c \
230 -n m16_irun.c
-r tmp-irun.c
231 $(srcdir)/..
/..
/move-if-change tmp-icache.h m16_icache.h
232 $(srcdir)/..
/..
/move-if-change tmp-icache.c m16_icache.c
233 $(srcdir)/..
/..
/move-if-change tmp-idecode.h m16_idecode.h
234 $(srcdir)/..
/..
/move-if-change tmp-idecode.c m16_idecode.c
235 $(srcdir)/..
/..
/move-if-change tmp-semantics.h m16_semantics.h
236 $(srcdir)/..
/..
/move-if-change tmp-semantics.c m16_semantics.c
237 $(srcdir)/..
/..
/move-if-change tmp-model.h m16_model.h
238 $(srcdir)/..
/..
/move-if-change tmp-model.c m16_model.c
239 $(srcdir)/..
/..
/move-if-change tmp-support.h m16_support.h
240 $(srcdir)/..
/..
/move-if-change tmp-support.c m16_support.c
241 $(srcdir)/..
/..
/move-if-change tmp-itable.h m16_itable.h
242 $(srcdir)/..
/..
/move-if-change tmp-itable.c m16_itable.c
243 $(srcdir)/..
/..
/move-if-change tmp-engine.h m16_engine.h
244 $(srcdir)/..
/..
/move-if-change tmp-engine.c m16_engine.c
245 $(srcdir)/..
/..
/move-if-change tmp-irun.c m16_irun.c
250 rm -f gencode oengine.c tmp.igen