IGEN likes to cache the current instruction address (CIA). Change the
[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 $(SIM_IGEN_OBJ) = \
22 m16_support.o \
23 m16_itable.o \
24 m16_semantics.o \
25 m16_idecode.o \
26 m16_icache.o \
27 m16_engine.o \
28 m16_irun.o
29
30 SIM_OBJS = \
31 $(SIM_@sim_gen@_OBJ) \
32 interp.o \
33 sim-bits.o \
34 sim-load.o \
35 sim-utils.o \
36 sim-hload.o \
37 sim-io.o \
38 sim-config.o \
39 sim-endian.o \
40 sim-engine.o \
41 sim-memopt.o \
42 sim-stop.o \
43 sim-resume.o \
44 sim-reason.o \
45 sim-events.o \
46 sim-module.o \
47 sim-trace.o \
48 sim-options.o \
49 sim-profile.o \
50 sim-core.o \
51 sim-watch.o
52
53
54
55 # List of flags to always pass to $(CC).
56 SIM_SUBTARGET=@SIM_SUBTARGET@
57
58 SIM_NO_CFLAGS = -DWITH_IGEN=0
59 SIM_IGEN_CFLAGS = -DWITH_IGEN=1
60 SIM_M16_CFLAGS = -DWITH_IGEN=1
61
62 # FIXME: Hack to find syscall.h? Better support for syscall.h
63 # is in progress.
64 SIM_EXTRA_CFLAGS = \
65 $(SIM_SUBTARGET) \
66 -I$(srcdir)/../../newlib/libc/sys/idt \
67 $(SIM_@sim_gen@_CFLAGS)
68
69 SIM_EXTRA_CLEAN = clean-igen clean-m16 clean-extra
70
71 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
72
73 # List of main object files for `run'.
74 SIM_RUN_OBJS = nrun.o
75
76
77
78 ## COMMON_POST_CONFIG_FRAG
79
80 interp.o: $(srcdir)/interp.c config.h sim-main.h oengine.c
81
82 oengine.c: gencode
83 ./gencode @SIMCONF@ > tmp-oengine
84 mv tmp-oengine oengine.c
85
86 gencode: gencode.o getopt.o getopt1.o
87 $(CC_FOR_BUILD) -o $@ gencode.o getopt.o getopt1.o
88
89 gencode.o: $(srcdir)/gencode.c
90 $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/gencode.c
91
92 getopt.o: $(srcdir)/../../libiberty/getopt.c
93 $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/../../libiberty/getopt.c
94 getopt1.o: $(srcdir)/../../libiberty/getopt1.c
95 $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/../../libiberty/getopt1.c
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 IGEN_INCLUDE=\
105 $(start-sanitize-r5900) \
106 $(srcdir)/r5900.igen \
107 $(end-sanitize-r5900) \
108 $(start-sanitize-vr5400) \
109 $(srcdir)/vr5400.igen \
110 $(end-sanitize-vr5400) \
111 $(srcdir)/m16.igen
112
113 SIM_IGEN_ALL = tmp-igen
114
115 BUILT_SRC_FROM_IGEN = \
116 icache.h \
117 icache.c \
118 idecode.h \
119 idecode.c \
120 semantics.h \
121 semantics.c \
122 model.h \
123 model.c \
124 support.h \
125 support.c \
126 itable.h \
127 itable.c \
128 engine.h \
129 engine.c \
130 irun.c
131
132 $(BUILT_SRC_FROM_IGEN): tmp-igen
133
134 .PHONY: clean-igen
135 clean-igen:
136 rm -f $(BUILT_SRC_FROM_IGEN)
137 rm -f tmp-igen
138
139 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
140 cd ../igen && $(MAKE)
141 ../igen/igen \
142 $(IGEN_TRACE) \
143 -I $(srcdir) \
144 -Werror \
145 -Wnodiscard \
146 @sim_igen_flags@ \
147 -G gen-direct-access \
148 -i $(IGEN_INSN) \
149 -o $(IGEN_DC) \
150 -x \
151 -n icache.h -hc tmp-icache.h \
152 -n icache.c -c tmp-icache.c \
153 -n semantics.h -hs tmp-semantics.h \
154 -n semantics.c -s tmp-semantics.c \
155 -n idecode.h -hd tmp-idecode.h \
156 -n idecode.c -d tmp-idecode.c \
157 -n model.h -hm tmp-model.h \
158 -n model.c -m tmp-model.c \
159 -n support.h -hf tmp-support.h \
160 -n support.c -f tmp-support.c \
161 -n itable.h -ht tmp-itable.h \
162 -n itable.c -t tmp-itable.c \
163 -n engine.h -he tmp-engine.h \
164 -n engine.c -e tmp-engine.c \
165 -n irun.c -r tmp-irun.c
166 $(srcdir)/../../move-if-change tmp-icache.h icache.h
167 $(srcdir)/../../move-if-change tmp-icache.c icache.c
168 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
169 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
170 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
171 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
172 $(srcdir)/../../move-if-change tmp-model.h model.h
173 $(srcdir)/../../move-if-change tmp-model.c model.c
174 $(srcdir)/../../move-if-change tmp-support.h support.h
175 $(srcdir)/../../move-if-change tmp-support.c support.c
176 $(srcdir)/../../move-if-change tmp-itable.h itable.h
177 $(srcdir)/../../move-if-change tmp-itable.c itable.c
178 $(srcdir)/../../move-if-change tmp-engine.h engine.h
179 $(srcdir)/../../move-if-change tmp-engine.c engine.c
180 $(srcdir)/../../move-if-change tmp-irun.c irun.c
181 touch tmp-igen
182
183 semantics.o: sim-main.h $(SIM_EXTRA_DEPS)
184 engine.o: sim-main.h $(SIM_EXTRA_DEPS)
185 support.o: sim-main.h $(SIM_EXTRA_DEPS)
186 idecode.o: sim-main.h $(SIM_EXTRA_DEPS)
187 itable.o: sim-main.h $(SIM_EXTRA_DEPS)
188
189
190
191 SIM_M16_ALL = tmp-igen $(SIM_M16_ALL)
192
193 BUILT_SRC_FROM_M16 = \
194 m16_icache.h \
195 m16_icache.c \
196 m16_idecode.h \
197 m16_idecode.c \
198 m16_semantics.h \
199 m16_semantics.c \
200 m16_model.h \
201 m16_model.c \
202 m16_support.h \
203 m16_support.c \
204 m16_itable.h \
205 m16_itable.c \
206 m16_engine.h \
207 m16_engine.c \
208 m16_irun.c
209
210 $(BUILT_SRC_FROM_M16): tmp-m16
211
212 .PHONY: clean-m16
213 clean-m16:
214 rm -f $(BUILT_SRC_FROM_M16)
215 rm -f tmp-m16
216
217 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
218 cd ../igen && $(MAKE)
219 ../igen/igen \
220 $(IGEN_TRACE) \
221 -I $(srcdir) \
222 -Werror \
223 -Wnodiscard \
224 -F 16 \
225 -M mips16 \
226 -G gen-direct-access \
227 -i $(IGEN_INSN) \
228 -o $(IGEN_DC) \
229 -x \
230 -n m16_icache.h -hc tmp-icache.h \
231 -n m16_icache.c -c tmp-icache.c \
232 -n m16_semantics.h -hs tmp-semantics.h \
233 -n m16_semantics.c -s tmp-semantics.c \
234 -n m16_idecode.h -hd tmp-idecode.h \
235 -n m16_idecode.c -d tmp-idecode.c \
236 -n m16_model.h -hm tmp-model.h \
237 -n m16_model.c -m tmp-model.c \
238 -n m16_support.h -hf tmp-support.h \
239 -n m16_support.c -f tmp-support.c \
240 -n m16_itable.h -ht tmp-itable.h \
241 -n m16_itable.c -t tmp-itable.c \
242 -n m16_engine.h -he tmp-engine.h \
243 -n m16_engine.c -e tmp-engine.c \
244 -n m16_irun.c -r tmp-irun.c
245 $(srcdir)/../../move-if-change tmp-icache.h m16_icache.h
246 $(srcdir)/../../move-if-change tmp-icache.c m16_icache.c
247 $(srcdir)/../../move-if-change tmp-idecode.h m16_idecode.h
248 $(srcdir)/../../move-if-change tmp-idecode.c m16_idecode.c
249 $(srcdir)/../../move-if-change tmp-semantics.h m16_semantics.h
250 $(srcdir)/../../move-if-change tmp-semantics.c m16_semantics.c
251 $(srcdir)/../../move-if-change tmp-model.h m16_model.h
252 $(srcdir)/../../move-if-change tmp-model.c m16_model.c
253 $(srcdir)/../../move-if-change tmp-support.h m16_support.h
254 $(srcdir)/../../move-if-change tmp-support.c m16_support.c
255 $(srcdir)/../../move-if-change tmp-itable.h m16_itable.h
256 $(srcdir)/../../move-if-change tmp-itable.c m16_itable.c
257 $(srcdir)/../../move-if-change tmp-engine.h m16_engine.h
258 $(srcdir)/../../move-if-change tmp-engine.c m16_engine.c
259 $(srcdir)/../../move-if-change tmp-irun.c m16_irun.c
260 touch tmp-m16
261
262
263 clean-extra:
264 rm -f gencode oengine.c tmp.igen
This page took 0.034709 seconds and 4 git commands to generate.