2002-06-03 Chris Demetriou <cgd@broadcom.com>
[deliverable/binutils-gdb.git] / sim / mips / Makefile.in
1 # Makefile template for Configure for the MIPS simulator.
2 # Written by Cygnus Support.
3
4 ## COMMON_PRE_CONFIG_FRAG
5
6 srcdir=@srcdir@
7 srcroot=$(srcdir)/../../
8
9 # Object files created by various simulator generators.
10
11
12 SIM_IGEN_OBJ = \
13 support.o \
14 itable.o \
15 semantics.o \
16 idecode.o \
17 icache.o \
18 @mips_igen_engine@ \
19 irun.o \
20
21
22 SIM_M16_OBJ = \
23 m16_support.o \
24 m16_semantics.o \
25 m16_idecode.o \
26 m16_icache.o \
27 \
28 m32_support.o \
29 m32_semantics.o \
30 m32_idecode.o \
31 m32_icache.o \
32 \
33 itable.o \
34 m16run.o \
35
36
37 MIPS_EXTRA_OBJS = @mips_extra_objs@
38 MIPS_EXTRA_LIBS = @mips_extra_libs@
39
40 SIM_OBJS = \
41 $(SIM_@sim_gen@_OBJ) \
42 $(SIM_NEW_COMMON_OBJS) \
43 $(MIPS_EXTRA_OBJS) \
44 cp1.o \
45 interp.o \
46 mdmx.o \
47 sim-main.o \
48 sim-hload.o \
49 sim-engine.o \
50 sim-stop.o \
51 sim-resume.o \
52 sim-reason.o \
53
54
55 # List of flags to always pass to $(CC).
56 SIM_SUBTARGET=@SIM_SUBTARGET@
57 SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
58
59 SIM_EXTRA_CLEAN = clean-extra
60
61 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
62
63 SIM_EXTRA_LIBS = $(MIPS_EXTRA_LIBS)
64
65 # List of main object files for `run'.
66 SIM_RUN_OBJS = nrun.o
67
68
69
70 ## COMMON_POST_CONFIG_FRAG
71
72 interp.o: $(srcdir)/interp.c config.h sim-main.h itable.h
73 cp1.o: $(srcdir)/cp1.c config.h sim-main.h
74
75 mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
76
77 ../igen/igen:
78 cd ../igen && $(MAKE)
79
80 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all
81 IGEN_INSN=$(srcdir)/mips.igen
82 IGEN_DC=$(srcdir)/mips.dc
83 M16_DC=$(srcdir)/m16.dc
84 IGEN_INCLUDE=\
85 $(srcdir)/m16.igen \
86 $(srcdir)/mdmx.igen \
87 $(srcdir)/tx.igen \
88 $(srcdir)/vr.igen \
89
90 # NB: Since these can be built by a number of generators, care
91 # must be taken to ensure that they are only dependant on
92 # one of those generators.
93 BUILT_SRC_FROM_GEN = \
94 itable.h \
95 itable.c \
96
97 SIM_IGEN_ALL = tmp-igen
98 SIM_M16_ALL = tmp-m16
99
100 $(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
101
102
103
104 BUILT_SRC_FROM_IGEN = \
105 icache.h \
106 icache.c \
107 idecode.h \
108 idecode.c \
109 semantics.h \
110 semantics.c \
111 model.h \
112 model.c \
113 support.h \
114 support.c \
115 engine.h \
116 engine.c \
117 irun.c \
118
119 $(BUILT_SRC_FROM_IGEN): tmp-igen
120
121 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
122 cd ../igen && $(MAKE)
123 ../igen/igen \
124 $(IGEN_TRACE) \
125 -I $(srcdir) \
126 -Werror \
127 -Wnodiscard \
128 @sim_igen_flags@ \
129 -G gen-direct-access \
130 -G gen-zero-r0 \
131 -B 32 \
132 -H 31 \
133 -i $(IGEN_INSN) \
134 -o $(IGEN_DC) \
135 -x \
136 -n icache.h -hc tmp-icache.h \
137 -n icache.c -c tmp-icache.c \
138 -n semantics.h -hs tmp-semantics.h \
139 -n semantics.c -s tmp-semantics.c \
140 -n idecode.h -hd tmp-idecode.h \
141 -n idecode.c -d tmp-idecode.c \
142 -n model.h -hm tmp-model.h \
143 -n model.c -m tmp-model.c \
144 -n support.h -hf tmp-support.h \
145 -n support.c -f tmp-support.c \
146 -n itable.h -ht tmp-itable.h \
147 -n itable.c -t tmp-itable.c \
148 -n engine.h -he tmp-engine.h \
149 -n engine.c -e tmp-engine.c \
150 -n irun.c -r tmp-irun.c
151 $(srcdir)/../../move-if-change tmp-icache.h icache.h
152 $(srcdir)/../../move-if-change tmp-icache.c icache.c
153 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
154 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
155 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
156 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
157 $(srcdir)/../../move-if-change tmp-model.h model.h
158 $(srcdir)/../../move-if-change tmp-model.c model.c
159 $(srcdir)/../../move-if-change tmp-support.h support.h
160 $(srcdir)/../../move-if-change tmp-support.c support.c
161 $(srcdir)/../../move-if-change tmp-itable.h itable.h
162 $(srcdir)/../../move-if-change tmp-itable.c itable.c
163 $(srcdir)/../../move-if-change tmp-engine.h engine.h
164 $(srcdir)/../../move-if-change tmp-engine.c engine.c
165 $(srcdir)/../../move-if-change tmp-irun.c irun.c
166 touch tmp-igen
167
168 semantics.o: sim-main.h semantics.c $(SIM_EXTRA_DEPS)
169 engine.o: sim-main.h engine.c $(SIM_EXTRA_DEPS)
170 support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
171 idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
172 itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
173
174
175
176
177 BUILT_SRC_FROM_M16 = \
178 m16_icache.h \
179 m16_icache.c \
180 m16_idecode.h \
181 m16_idecode.c \
182 m16_semantics.h \
183 m16_semantics.c \
184 m16_model.h \
185 m16_model.c \
186 m16_support.h \
187 m16_support.c \
188 \
189 m32_icache.h \
190 m32_icache.c \
191 m32_idecode.h \
192 m32_idecode.c \
193 m32_semantics.h \
194 m32_semantics.c \
195 m32_model.h \
196 m32_model.c \
197 m32_support.h \
198 m32_support.c \
199
200 $(BUILT_SRC_FROM_M16): tmp-m16
201
202 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
203 cd ../igen && $(MAKE)
204 ../igen/igen \
205 $(IGEN_TRACE) \
206 -I $(srcdir) \
207 -Werror \
208 -Wnodiscard \
209 @sim_m16_flags@ \
210 -G gen-direct-access \
211 -G gen-zero-r0 \
212 -B 16 \
213 -H 15 \
214 -i $(IGEN_INSN) \
215 -o $(M16_DC) \
216 -P m16_ \
217 -x \
218 -n m16_icache.h -hc tmp-icache.h \
219 -n m16_icache.c -c tmp-icache.c \
220 -n m16_semantics.h -hs tmp-semantics.h \
221 -n m16_semantics.c -s tmp-semantics.c \
222 -n m16_idecode.h -hd tmp-idecode.h \
223 -n m16_idecode.c -d tmp-idecode.c \
224 -n m16_model.h -hm tmp-model.h \
225 -n m16_model.c -m tmp-model.c \
226 -n m16_support.h -hf tmp-support.h \
227 -n m16_support.c -f tmp-support.c \
228 #
229 $(srcdir)/../../move-if-change tmp-icache.h m16_icache.h
230 $(srcdir)/../../move-if-change tmp-icache.c m16_icache.c
231 $(srcdir)/../../move-if-change tmp-idecode.h m16_idecode.h
232 $(srcdir)/../../move-if-change tmp-idecode.c m16_idecode.c
233 $(srcdir)/../../move-if-change tmp-semantics.h m16_semantics.h
234 $(srcdir)/../../move-if-change tmp-semantics.c m16_semantics.c
235 $(srcdir)/../../move-if-change tmp-model.h m16_model.h
236 $(srcdir)/../../move-if-change tmp-model.c m16_model.c
237 $(srcdir)/../../move-if-change tmp-support.h m16_support.h
238 $(srcdir)/../../move-if-change tmp-support.c m16_support.c
239 ../igen/igen \
240 $(IGEN_TRACE) \
241 -I $(srcdir) \
242 -Werror \
243 -Wnodiscard \
244 @sim_igen_flags@ \
245 -G gen-direct-access \
246 -G gen-zero-r0 \
247 -B 32 \
248 -H 31 \
249 -i $(IGEN_INSN) \
250 -o $(IGEN_DC) \
251 -P m32_ \
252 -x \
253 -n m32_icache.h -hc tmp-icache.h \
254 -n m32_icache.c -c tmp-icache.c \
255 -n m32_semantics.h -hs tmp-semantics.h \
256 -n m32_semantics.c -s tmp-semantics.c \
257 -n m32_idecode.h -hd tmp-idecode.h \
258 -n m32_idecode.c -d tmp-idecode.c \
259 -n m32_model.h -hm tmp-model.h \
260 -n m32_model.c -m tmp-model.c \
261 -n m32_support.h -hf tmp-support.h \
262 -n m32_support.c -f tmp-support.c \
263 #
264 $(srcdir)/../../move-if-change tmp-icache.h m32_icache.h
265 $(srcdir)/../../move-if-change tmp-icache.c m32_icache.c
266 $(srcdir)/../../move-if-change tmp-idecode.h m32_idecode.h
267 $(srcdir)/../../move-if-change tmp-idecode.c m32_idecode.c
268 $(srcdir)/../../move-if-change tmp-semantics.h m32_semantics.h
269 $(srcdir)/../../move-if-change tmp-semantics.c m32_semantics.c
270 $(srcdir)/../../move-if-change tmp-model.h m32_model.h
271 $(srcdir)/../../move-if-change tmp-model.c m32_model.c
272 $(srcdir)/../../move-if-change tmp-support.h m32_support.h
273 $(srcdir)/../../move-if-change tmp-support.c m32_support.c
274 ../igen/igen \
275 $(IGEN_TRACE) \
276 -I $(srcdir) \
277 -Werror \
278 -Wnodiscard \
279 -Wnowidth \
280 @sim_igen_flags@ @sim_m16_flags@ \
281 -G gen-direct-access \
282 -G gen-zero-r0 \
283 -i $(IGEN_INSN) \
284 -n itable.h -ht tmp-itable.h \
285 -n itable.c -t tmp-itable.c \
286 #
287 $(srcdir)/../../move-if-change tmp-itable.h itable.h
288 $(srcdir)/../../move-if-change tmp-itable.c itable.c
289 touch tmp-m16
290
291
292 clean-extra:
293 rm -f $(BUILT_SRC_FROM_GEN)
294 rm -f $(BUILT_SRC_FROM_IGEN)
295 rm -f $(BUILT_SRC_FROM_M16)
296 rm -f tmp-*
297 rm -f m16*.o m32*.o itable*.o
298
This page took 0.03558 seconds and 5 git commands to generate.