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