Separate r5900 specifoc and mips16 instructions.
[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-stop.o \
42 sim-resume.o \
43 sim-reason.o \
44 sim-events.o \
45 sim-module.o \
46 sim-trace.o \
47 sim-options.o \
48 sim-profile.o \
49 sim-core.o \
50 sim-watch.o
51
52
53
54 # List of flags to always pass to $(CC).
55 SIM_SUBTARGET=@SIM_SUBTARGET@
56
57 SIM_NO_CFLAGS = -DWITH_IGEN=0
58 SIM_IGEN_CFLAGS = -DWITH_IGEN=1
59 SIM_M16_CFLAGS = -DWITH_IGEN=1
60
61 # FIXME: Hack to find syscall.h? Better support for syscall.h
62 # is in progress.
63 SIM_EXTRA_CFLAGS = \
64 $(SIM_SUBTARGET) \
65 -I$(srcdir)/../../newlib/libc/sys/idt \
66 $(SIM_@sim_gen@_CFLAGS)
67
68 SIM_EXTRA_CLEAN = clean-igen clean-m16 clean-extra
69
70 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
71
72 # List of main object files for `run'.
73 SIM_RUN_OBJS = nrun.o
74
75
76
77 ## COMMON_POST_CONFIG_FRAG
78
79 interp.o: $(srcdir)/interp.c config.h sim-main.h 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 ../igen/igen:
98 cd ../igen && $(MAKE)
99
100 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
101 IGEN_INSN=$(srcdir)/mips.igen
102 IGEN_DC=$(srcdir)/mips.dc
103
104
105 SIM_IGEN_ALL = tmp-igen
106
107 BUILT_SRC_FROM_IGEN = \
108 icache.h \
109 icache.c \
110 idecode.h \
111 idecode.c \
112 semantics.h \
113 semantics.c \
114 model.h \
115 model.c \
116 support.h \
117 support.c \
118 itable.h \
119 itable.c \
120 engine.h \
121 engine.c \
122 irun.c
123
124 $(BUILT_SRC_FROM_IGEN): tmp-igen
125
126 .PHONY: clean-igen
127 clean-igen:
128 rm -f $(BUILT_SRC_FROM_IGEN)
129 rm -f tmp-igen
130
131 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
132 cd ../igen && $(MAKE)
133 ../igen/igen \
134 $(IGEN_TRACE) \
135 -I $(srcdir) \
136 -Werror \
137 -Wnodiscard \
138 @sim_igen_flags@ \
139 -G gen-direct-access \
140 -i $(IGEN_INSN) \
141 -o $(IGEN_DC) \
142 -x \
143 -n icache.h -hc tmp-icache.h \
144 -n icache.c -c tmp-icache.c \
145 -n semantics.h -hs tmp-semantics.h \
146 -n semantics.c -s tmp-semantics.c \
147 -n idecode.h -hd tmp-idecode.h \
148 -n idecode.c -d tmp-idecode.c \
149 -n model.h -hm tmp-model.h \
150 -n model.c -m tmp-model.c \
151 -n support.h -hf tmp-support.h \
152 -n support.c -f tmp-support.c \
153 -n itable.h -ht tmp-itable.h \
154 -n itable.c -t tmp-itable.c \
155 -n engine.h -he tmp-engine.h \
156 -n engine.c -e tmp-engine.c \
157 -n irun.c -r tmp-irun.c
158 $(srcdir)/../../move-if-change tmp-icache.h icache.h
159 $(srcdir)/../../move-if-change tmp-icache.c icache.c
160 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
161 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
162 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
163 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
164 $(srcdir)/../../move-if-change tmp-model.h model.h
165 $(srcdir)/../../move-if-change tmp-model.c model.c
166 $(srcdir)/../../move-if-change tmp-support.h support.h
167 $(srcdir)/../../move-if-change tmp-support.c support.c
168 $(srcdir)/../../move-if-change tmp-itable.h itable.h
169 $(srcdir)/../../move-if-change tmp-itable.c itable.c
170 $(srcdir)/../../move-if-change tmp-engine.h engine.h
171 $(srcdir)/../../move-if-change tmp-engine.c engine.c
172 $(srcdir)/../../move-if-change tmp-irun.c irun.c
173 touch tmp-igen
174
175
176
177 SIM_M16_ALL = tmp-igen $(SIM_M16_ALL)
178
179 BUILT_SRC_FROM_M16 = \
180 m16_icache.h \
181 m16_icache.c \
182 m16_idecode.h \
183 m16_idecode.c \
184 m16_semantics.h \
185 m16_semantics.c \
186 m16_model.h \
187 m16_model.c \
188 m16_support.h \
189 m16_support.c \
190 m16_itable.h \
191 m16_itable.c \
192 m16_engine.h \
193 m16_engine.c \
194 m16_irun.c
195
196 $(BUILT_SRC_FROM_M16): tmp-m16
197
198 .PHONY: clean-m16
199 clean-m16:
200 rm -f $(BUILT_SRC_FROM_M16)
201 rm -f tmp-m16
202
203 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
204 cd ../igen && $(MAKE)
205 ../igen/igen \
206 $(IGEN_TRACE) \
207 -I $(srcdir) \
208 -Werror \
209 -Wnodiscard \
210 -F 16 \
211 -M mips16 \
212 -G gen-direct-access \
213 -i $(IGEN_INSN) \
214 -o $(IGEN_DC) \
215 -x \
216 -n m16_icache.h -hc tmp-icache.h \
217 -n m16_icache.c -c tmp-icache.c \
218 -n m16_semantics.h -hs tmp-semantics.h \
219 -n m16_semantics.c -s tmp-semantics.c \
220 -n m16_idecode.h -hd tmp-idecode.h \
221 -n m16_idecode.c -d tmp-idecode.c \
222 -n m16_model.h -hm tmp-model.h \
223 -n m16_model.c -m tmp-model.c \
224 -n m16_support.h -hf tmp-support.h \
225 -n m16_support.c -f tmp-support.c \
226 -n m16_itable.h -ht tmp-itable.h \
227 -n m16_itable.c -t tmp-itable.c \
228 -n m16_engine.h -he tmp-engine.h \
229 -n m16_engine.c -e tmp-engine.c \
230 -n m16_irun.c -r tmp-irun.c
231 $(srcdir)/../../move-if-change tmp-icache.h m16_icache.h
232 $(srcdir)/../../move-if-change tmp-icache.c m16_icache.c
233 $(srcdir)/../../move-if-change tmp-idecode.h m16_idecode.h
234 $(srcdir)/../../move-if-change tmp-idecode.c m16_idecode.c
235 $(srcdir)/../../move-if-change tmp-semantics.h m16_semantics.h
236 $(srcdir)/../../move-if-change tmp-semantics.c m16_semantics.c
237 $(srcdir)/../../move-if-change tmp-model.h m16_model.h
238 $(srcdir)/../../move-if-change tmp-model.c m16_model.c
239 $(srcdir)/../../move-if-change tmp-support.h m16_support.h
240 $(srcdir)/../../move-if-change tmp-support.c m16_support.c
241 $(srcdir)/../../move-if-change tmp-itable.h m16_itable.h
242 $(srcdir)/../../move-if-change tmp-itable.c m16_itable.c
243 $(srcdir)/../../move-if-change tmp-engine.h m16_engine.h
244 $(srcdir)/../../move-if-change tmp-engine.c m16_engine.c
245 $(srcdir)/../../move-if-change tmp-irun.c m16_irun.c
246 touch tmp-m16
247
248
249 clean-extra:
250 rm -f gencode oengine.c tmp.igen
This page took 0.054191 seconds and 5 git commands to generate.