* MONSTER sky -> devo merge
[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 SIM_NO_OBJ =
10
11 # start-sanitize-sky
12 SIM_SKY_OBJS = \
13 sky-console.o \
14 sky-device.o \
15 sky-dma.o \
16 sky-engine.o \
17 sky-interact.o \
18 sky-gpuif.o \
19 sky-hardware.o \
20 sky-indebug.o \
21 sky-libvpe.o \
22 sky-vif.o \
23 sky-psio.o \
24 sky-vu.o \
25 sky-vudis.o \
26 sky-gs.o \
27 sky-gdb.o
28 # end-sanitize-sky
29
30 SIM_IGEN_OBJ = \
31 support.o \
32 itable.o \
33 semantics.o \
34 idecode.o \
35 icache.o \
36 @mips_igen_engine@ \
37 irun.o \
38
39 SIM_M16_OBJ = \
40 m16_support.o \
41 m16_semantics.o \
42 m16_idecode.o \
43 m16_icache.o \
44 \
45 m32_support.o \
46 m32_semantics.o \
47 m32_idecode.o \
48 m32_icache.o \
49 \
50 itable.o \
51 m16run.o \
52
53 MIPS_EXTRA_OBJS = @mips_extra_objs@
54 MIPS_EXTRA_LIBS = @mips_extra_libs@
55
56 SIM_OBJS = \
57 $(SIM_@sim_gen@_OBJ) \
58 $(SIM_NEW_COMMON_OBJS) \
59 $(MIPS_EXTRA_OBJS) \
60 interp.o \
61 sim-main.o \
62 sim-hload.o \
63 sim-engine.o \
64 sim-stop.o \
65 sim-resume.o \
66 sim-reason.o \
67
68
69 # List of flags to always pass to $(CC).
70 SIM_SUBTARGET=@SIM_SUBTARGET@
71
72 SIM_NO_CFLAGS = -DWITH_IGEN=0
73 SIM_IGEN_CFLAGS = -DWITH_IGEN=1
74 SIM_M16_CFLAGS = -DWITH_IGEN=1
75
76 # FIXME: Hack to find syscall.h? Better support for syscall.h
77 # is in progress.
78 SIM_EXTRA_CFLAGS = \
79 $(SIM_SUBTARGET) \
80 -I$(srcdir)/../../newlib/libc/sys/idt \
81 $(SIM_@sim_gen@_CFLAGS)
82
83 SIM_EXTRA_CLEAN = clean-extra
84
85 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
86
87 SIM_EXTRA_LIBS = $(MIPS_EXTRA_LIBS)
88
89 # List of main object files for `run'.
90 SIM_RUN_OBJS = nrun.o
91
92
93
94 ## COMMON_POST_CONFIG_FRAG
95
96 SIM_NO_INTERP = oengine.c
97 interp.o: $(srcdir)/interp.c config.h sim-main.h $(SIM_@sim_gen@_INTERP)
98
99
100
101 #
102 # Old deprecated generator
103 #
104
105 SIM_NO_ALL = oengine.c
106
107 oengine.c: gencode
108 ./gencode @SIMCONF@ > tmp-oengine
109 mv tmp-oengine oengine.c
110
111 gencode: gencode.o getopt.o getopt1.o
112 $(CC_FOR_BUILD) -o $@ gencode.o getopt.o getopt1.o
113
114 gencode.o: $(srcdir)/gencode.c
115 $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/gencode.c
116
117 getopt.o: $(srcdir)/../../libiberty/getopt.c
118 $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/../../libiberty/getopt.c
119 getopt1.o: $(srcdir)/../../libiberty/getopt1.c
120 $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/../../libiberty/getopt1.c
121
122
123
124 ../igen/igen:
125 cd ../igen && $(MAKE)
126
127 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all
128 IGEN_INSN=$(srcdir)/mips.igen
129 IGEN_DC=$(srcdir)/mips.dc
130 M16_DC=$(srcdir)/m16.dc
131 IGEN_INCLUDE=\
132 $(start-sanitize-r5900) \
133 $(srcdir)/r5900.igen \
134 $(end-sanitize-r5900) \
135 $(start-sanitize-cygnus) \
136 $(srcdir)/mdmx.igen \
137 $(end-sanitize-cygnus) \
138 $(srcdir)/m16.igen \
139 $(srcdir)/tx.igen \
140 $(srcdir)/vr.igen \
141
142 SIM_IGEN_ALL = tmp-igen
143
144 BUILT_SRC_FROM_IGEN = \
145 icache.h \
146 icache.c \
147 idecode.h \
148 idecode.c \
149 semantics.h \
150 semantics.c \
151 model.h \
152 model.c \
153 support.h \
154 support.c \
155 engine.h \
156 engine.c \
157 irun.c \
158
159 # NB: Since these can be built by either tmp-igen or tmp-m16
160 # they are explicitly marked as being dependant on the
161 # dependant on the selected generator.
162 BUILT_SRC_FROM_GEN = \
163 itable.h \
164 itable.c \
165
166 $(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
167
168
169 $(BUILT_SRC_FROM_IGEN): tmp-igen
170
171 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
172 cd ../igen && $(MAKE)
173 ../igen/igen \
174 $(IGEN_TRACE) \
175 -I $(srcdir) \
176 -Werror \
177 -Wnodiscard \
178 @sim_igen_flags@ \
179 -G gen-direct-access \
180 -G gen-zero-r0 \
181 -B 32 \
182 -H 31 \
183 -i $(IGEN_INSN) \
184 -o $(IGEN_DC) \
185 -x \
186 -n icache.h -hc tmp-icache.h \
187 -n icache.c -c tmp-icache.c \
188 -n semantics.h -hs tmp-semantics.h \
189 -n semantics.c -s tmp-semantics.c \
190 -n idecode.h -hd tmp-idecode.h \
191 -n idecode.c -d tmp-idecode.c \
192 -n model.h -hm tmp-model.h \
193 -n model.c -m tmp-model.c \
194 -n support.h -hf tmp-support.h \
195 -n support.c -f tmp-support.c \
196 -n itable.h -ht tmp-itable.h \
197 -n itable.c -t tmp-itable.c \
198 -n engine.h -he tmp-engine.h \
199 -n engine.c -e tmp-engine.c \
200 -n irun.c -r tmp-irun.c
201 $(srcdir)/../../move-if-change tmp-icache.h icache.h
202 $(srcdir)/../../move-if-change tmp-icache.c icache.c
203 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
204 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
205 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
206 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
207 $(srcdir)/../../move-if-change tmp-model.h model.h
208 $(srcdir)/../../move-if-change tmp-model.c model.c
209 $(srcdir)/../../move-if-change tmp-support.h support.h
210 $(srcdir)/../../move-if-change tmp-support.c support.c
211 $(srcdir)/../../move-if-change tmp-itable.h itable.h
212 $(srcdir)/../../move-if-change tmp-itable.c itable.c
213 $(srcdir)/../../move-if-change tmp-engine.h engine.h
214 $(srcdir)/../../move-if-change tmp-engine.c engine.c
215 $(srcdir)/../../move-if-change tmp-irun.c irun.c
216 touch tmp-igen
217
218 semantics.o: sim-main.h semantics.c $(SIM_EXTRA_DEPS)
219 engine.o: sim-main.h engine.c $(SIM_EXTRA_DEPS)
220 support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
221 idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
222 itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
223
224
225
226 SIM_M16_ALL = tmp-m16
227
228 BUILT_SRC_FROM_M16 = \
229 m16_icache.h \
230 m16_icache.c \
231 m16_idecode.h \
232 m16_idecode.c \
233 m16_semantics.h \
234 m16_semantics.c \
235 m16_model.h \
236 m16_model.c \
237 m16_support.h \
238 m16_support.c \
239 \
240 m32_icache.h \
241 m32_icache.c \
242 m32_idecode.h \
243 m32_idecode.c \
244 m32_semantics.h \
245 m32_semantics.c \
246 m32_model.h \
247 m32_model.c \
248 m32_support.h \
249 m32_support.c \
250
251 $(BUILT_SRC_FROM_M16): tmp-m16
252
253 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
254 cd ../igen && $(MAKE)
255 ../igen/igen \
256 $(IGEN_TRACE) \
257 -I $(srcdir) \
258 -Werror \
259 -Wnodiscard \
260 @sim_m16_flags@ \
261 -G gen-direct-access \
262 -G gen-zero-r0 \
263 -B 16 \
264 -H 15 \
265 -i $(IGEN_INSN) \
266 -o $(M16_DC) \
267 -P m16_ \
268 -x \
269 -n m16_icache.h -hc tmp-icache.h \
270 -n m16_icache.c -c tmp-icache.c \
271 -n m16_semantics.h -hs tmp-semantics.h \
272 -n m16_semantics.c -s tmp-semantics.c \
273 -n m16_idecode.h -hd tmp-idecode.h \
274 -n m16_idecode.c -d tmp-idecode.c \
275 -n m16_model.h -hm tmp-model.h \
276 -n m16_model.c -m tmp-model.c \
277 -n m16_support.h -hf tmp-support.h \
278 -n m16_support.c -f tmp-support.c \
279 #
280 $(srcdir)/../../move-if-change tmp-icache.h m16_icache.h
281 $(srcdir)/../../move-if-change tmp-icache.c m16_icache.c
282 $(srcdir)/../../move-if-change tmp-idecode.h m16_idecode.h
283 $(srcdir)/../../move-if-change tmp-idecode.c m16_idecode.c
284 $(srcdir)/../../move-if-change tmp-semantics.h m16_semantics.h
285 $(srcdir)/../../move-if-change tmp-semantics.c m16_semantics.c
286 $(srcdir)/../../move-if-change tmp-model.h m16_model.h
287 $(srcdir)/../../move-if-change tmp-model.c m16_model.c
288 $(srcdir)/../../move-if-change tmp-support.h m16_support.h
289 $(srcdir)/../../move-if-change tmp-support.c m16_support.c
290 ../igen/igen \
291 $(IGEN_TRACE) \
292 -I $(srcdir) \
293 -Werror \
294 -Wnodiscard \
295 @sim_igen_flags@ \
296 -G gen-direct-access \
297 -G gen-zero-r0 \
298 -B 32 \
299 -H 31 \
300 -i $(IGEN_INSN) \
301 -o $(IGEN_DC) \
302 -P m32_ \
303 -x \
304 -n m32_icache.h -hc tmp-icache.h \
305 -n m32_icache.c -c tmp-icache.c \
306 -n m32_semantics.h -hs tmp-semantics.h \
307 -n m32_semantics.c -s tmp-semantics.c \
308 -n m32_idecode.h -hd tmp-idecode.h \
309 -n m32_idecode.c -d tmp-idecode.c \
310 -n m32_model.h -hm tmp-model.h \
311 -n m32_model.c -m tmp-model.c \
312 -n m32_support.h -hf tmp-support.h \
313 -n m32_support.c -f tmp-support.c \
314 #
315 $(srcdir)/../../move-if-change tmp-icache.h m32_icache.h
316 $(srcdir)/../../move-if-change tmp-icache.c m32_icache.c
317 $(srcdir)/../../move-if-change tmp-idecode.h m32_idecode.h
318 $(srcdir)/../../move-if-change tmp-idecode.c m32_idecode.c
319 $(srcdir)/../../move-if-change tmp-semantics.h m32_semantics.h
320 $(srcdir)/../../move-if-change tmp-semantics.c m32_semantics.c
321 $(srcdir)/../../move-if-change tmp-model.h m32_model.h
322 $(srcdir)/../../move-if-change tmp-model.c m32_model.c
323 $(srcdir)/../../move-if-change tmp-support.h m32_support.h
324 $(srcdir)/../../move-if-change tmp-support.c m32_support.c
325 ../igen/igen \
326 $(IGEN_TRACE) \
327 -I $(srcdir) \
328 -Werror \
329 -Wnodiscard \
330 -Wnowidth \
331 @sim_igen_flags@ @sim_m16_flags@ \
332 -G gen-direct-access \
333 -G gen-zero-r0 \
334 -i $(IGEN_INSN) \
335 -n itable.h -ht tmp-itable.h \
336 -n itable.c -t tmp-itable.c \
337 #
338 $(srcdir)/../../move-if-change tmp-itable.h itable.h
339 $(srcdir)/../../move-if-change tmp-itable.c itable.c
340 touch tmp-m16
341
342
343 clean-extra:
344 rm -f gencode oengine.c tmp.igen
345 rm -f $(BUILT_SRC_FROM_GEN)
346 rm -f $(BUILT_SRC_FROM_IGEN)
347 rm -f $(BUILT_SRC_FROM_M16)
348 rm -f tmp-igen
349 rm -f tmp-m16
This page took 0.036522 seconds and 5 git commands to generate.