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