1 |
131 |
jeremybenn |
#
|
2 |
|
|
# This file is part of the program psim.
|
3 |
|
|
#
|
4 |
|
|
# Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
|
5 |
|
|
#
|
6 |
|
|
# This program is free software; you can redistribute it and/or modify
|
7 |
|
|
# it under the terms of the GNU General Public License as published by
|
8 |
|
|
# the Free Software Foundation; either version 2 of the License, or
|
9 |
|
|
# (at your option) any later version.
|
10 |
|
|
#
|
11 |
|
|
# This program is distributed in the hope that it will be useful,
|
12 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
|
|
# GNU General Public License for more details.
|
15 |
|
|
#
|
16 |
|
|
# You should have received a copy of the GNU General Public License
|
17 |
|
|
# along with this program; if not, write to the Free Software
|
18 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
19 |
|
|
#
|
20 |
|
|
|
21 |
|
|
default: all
|
22 |
|
|
|
23 |
|
|
VPATH = @srcdir@
|
24 |
|
|
srcdir = @srcdir@
|
25 |
|
|
srcroot = $(srcdir)/../..
|
26 |
|
|
|
27 |
|
|
prefix = @prefix@
|
28 |
|
|
exec_prefix = @exec_prefix@
|
29 |
|
|
|
30 |
|
|
host_alias = @host_alias@
|
31 |
|
|
target_alias = @target_alias@
|
32 |
|
|
program_transform_name = @program_transform_name@
|
33 |
|
|
bindir = @bindir@
|
34 |
|
|
libdir = @libdir@
|
35 |
|
|
tooldir = $(libdir)/$(target_alias)
|
36 |
|
|
|
37 |
|
|
datadir = @datadir@
|
38 |
|
|
mandir = @mandir@
|
39 |
|
|
man1dir = $(mandir)/man1
|
40 |
|
|
man2dir = $(mandir)/man2
|
41 |
|
|
man3dir = $(mandir)/man3
|
42 |
|
|
man4dir = $(mandir)/man4
|
43 |
|
|
man5dir = $(mandir)/man5
|
44 |
|
|
man6dir = $(mandir)/man6
|
45 |
|
|
man7dir = $(mandir)/man7
|
46 |
|
|
man8dir = $(mandir)/man8
|
47 |
|
|
man9dir = $(mandir)/man9
|
48 |
|
|
infodir = @infodir@
|
49 |
|
|
includedir = @includedir@
|
50 |
|
|
|
51 |
|
|
# This can be referenced by the gettext configuration code.
|
52 |
|
|
top_builddir = ..
|
53 |
|
|
|
54 |
|
|
EXEEXT = @EXEEXT@
|
55 |
|
|
SHELL = /bin/sh
|
56 |
|
|
|
57 |
|
|
INSTALL = @INSTALL@
|
58 |
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
59 |
|
|
INSTALL_DATA = @INSTALL_DATA@
|
60 |
|
|
|
61 |
|
|
AR = @AR@
|
62 |
|
|
AR_FLAGS = rc
|
63 |
|
|
CC = @CC@
|
64 |
|
|
CFLAGS = @CFLAGS@
|
65 |
|
|
CC_FOR_BUILD = @CC_FOR_BUILD@
|
66 |
|
|
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
67 |
|
|
BISON = bison
|
68 |
|
|
MAKEINFO = makeinfo
|
69 |
|
|
RANLIB = @RANLIB@
|
70 |
|
|
|
71 |
|
|
SIM_CFLAGS = @sim_cflags@
|
72 |
|
|
INLINE_CFLAGS = @sim_inline@
|
73 |
|
|
BSWAP_CFLAGS = @sim_bswap@
|
74 |
|
|
ENDIAN_CFLAGS = @sim_endian@
|
75 |
|
|
REGPARM_CFLAGS = @sim_regparm@
|
76 |
|
|
STDCALL_CFLAGS = @sim_stdcall@
|
77 |
|
|
HOSTENDIAN_CFLAGS = @sim_hostendian@
|
78 |
|
|
SMP_CFLAGS = @sim_smp@
|
79 |
|
|
XOR_ENDIAN_CFLAGS = @sim_xor_endian@
|
80 |
|
|
BITSIZE_CFLAGS = @sim_bitsize@
|
81 |
|
|
HOSTBITSIZE_CFLAGS = @sim_hostbitsize@
|
82 |
|
|
ENV_CFLAGS = @sim_env@
|
83 |
|
|
TIMEBASE_CFLAGS = @sim_timebase@
|
84 |
|
|
ALIGNMENT_CFLAGS = @sim_alignment@
|
85 |
|
|
FLOAT_CFLAGS = @sim_float@
|
86 |
|
|
TRACE_CFLAGS = @sim_trace@
|
87 |
|
|
ASSERT_CFLAGS = @sim_assert@
|
88 |
|
|
RESERVED_CFLAGS = @sim_reserved@
|
89 |
|
|
MONITOR_CFLAGS = @sim_monitor@
|
90 |
|
|
MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
|
91 |
|
|
STDIO_CFLAGS = @sim_stdio@
|
92 |
|
|
TERMIO_CFLAGS = @sim_termio@
|
93 |
|
|
WARNING_CFLAGS = @sim_warnings@
|
94 |
|
|
DEVZERO_CFLAGS = @sim_devzero@
|
95 |
|
|
CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
|
96 |
|
|
$(ENDIAN_CFLAGS) \
|
97 |
|
|
$(REGPARM_CFLAGS) \
|
98 |
|
|
$(STDCALL_CFLAGS) \
|
99 |
|
|
$(HOSTENDIAN_CFLAGS) \
|
100 |
|
|
$(SMP_CFLAGS) \
|
101 |
|
|
$(XOR_ENDIAN_CFLAGS) \
|
102 |
|
|
$(BITSIZE_CFLAGS) \
|
103 |
|
|
$(HOSTBITSIZE_CFLAGS) \
|
104 |
|
|
$(ENV_CFLAGS) \
|
105 |
|
|
$(TIMEBASE_CFLAGS) \
|
106 |
|
|
$(ALIGNMENT_CFLAGS) \
|
107 |
|
|
$(FLOAT_CFLAGS) \
|
108 |
|
|
$(TRACE_CFLAGS) \
|
109 |
|
|
$(ASSERT_CFLAGS) \
|
110 |
|
|
$(RESERVED_CFLAGS) \
|
111 |
|
|
$(MONITOR_CFLAGS) \
|
112 |
|
|
$(MODEL_CFLAGS) \
|
113 |
|
|
$(STDIO_CFLAGS) \
|
114 |
|
|
$(TERMIO_CFLAGS) \
|
115 |
|
|
$(DEVZERO_CFLAGS)
|
116 |
|
|
SIM_FPU_CFLAGS = @sim_fpu_cflags@
|
117 |
|
|
|
118 |
|
|
STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
|
119 |
|
|
NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS)
|
120 |
|
|
BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS)
|
121 |
|
|
|
122 |
|
|
BUILD_LDFLAGS =
|
123 |
|
|
|
124 |
|
|
CONFIG_FILE = @sim_config@
|
125 |
|
|
IGEN_OPCODE_RULES = @sim_opcode@
|
126 |
|
|
IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
|
127 |
|
|
IGEN_DUPLICATE = @sim_dup@
|
128 |
|
|
IGEN_JUMP = @sim_jump@
|
129 |
|
|
IGEN_FILTER = @sim_filter@
|
130 |
|
|
IGEN_ICACHE = @sim_icache@
|
131 |
|
|
IGEN_SMP = @sim_igen_smp@
|
132 |
|
|
IGEN_LINE_NR = @sim_line_nr@
|
133 |
|
|
DGEN_FLAGS = @sim_switch@
|
134 |
|
|
|
135 |
|
|
HDEFINES = @HDEFINES@
|
136 |
|
|
TDEFINES =
|
137 |
|
|
IGEN_FLAGS = \
|
138 |
|
|
$(IGEN_DECODE_MECHANISM) \
|
139 |
|
|
$(IGEN_DUPLICATE) \
|
140 |
|
|
$(IGEN_JUMP) \
|
141 |
|
|
$(IGEN_FILTER) \
|
142 |
|
|
$(IGEN_ICACHE) \
|
143 |
|
|
$(IGEN_SMP) \
|
144 |
|
|
$(IGEN_LINE_NR)
|
145 |
|
|
|
146 |
|
|
.NOEXPORT:
|
147 |
|
|
MAKEOVERRIDES=
|
148 |
|
|
|
149 |
|
|
LIB_INCLUDES = -I$(srcdir)/../../include
|
150 |
|
|
BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
|
151 |
|
|
GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
|
152 |
|
|
|
153 |
|
|
INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
|
154 |
|
|
|
155 |
|
|
LIBIBERTY_LIB = ../../libiberty/libiberty.a
|
156 |
|
|
BFD_LIB = ../../bfd/libbfd.a
|
157 |
|
|
|
158 |
|
|
LIBINTL = @LIBINTL@
|
159 |
|
|
LIBINTL_DEP = @LIBINTL_DEP@
|
160 |
|
|
INTL_CFLAGS = @INCINTL@
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
TARGETLIB = libsim.a
|
164 |
|
|
|
165 |
|
|
all: run $(TARGETLIB) $(GDB_OBJ)
|
166 |
|
|
|
167 |
|
|
.c.o:
|
168 |
|
|
$(CC) -c $(STD_CFLAGS) $<
|
169 |
|
|
|
170 |
|
|
|
171 |
|
|
# Headers outside sim/ppc.
|
172 |
|
|
ANSIDECL_H = $(srcroot)/include/ansidecl.h
|
173 |
|
|
BFD_H = ../../bfd/bfd.h
|
174 |
|
|
GDB_CALLBACK_H = $(srcroot)/include/gdb/callback.h
|
175 |
|
|
GDB_REMOTE_SIM_H = $(srcroot)/include/gdb/remote-sim.h
|
176 |
|
|
GDB_SIM_PPC_H = $(srcroot)/include/gdb/sim-ppc.h
|
177 |
|
|
COMMON_SIM_BASE_H = $(srcroot)/sim/common/sim-base.h
|
178 |
|
|
COMMON_SIM_BASICS_H = $(srcroot)/sim/common/sim-basics.h
|
179 |
|
|
COMMON_SIM_FPU_H = $(srcroot)/sim/common/sim-fpu.h
|
180 |
|
|
COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h
|
181 |
|
|
COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h
|
182 |
|
|
|
183 |
|
|
# Headers in sim/ppc.
|
184 |
|
|
ACCONFIG_H = \
|
185 |
|
|
acconfig.h
|
186 |
|
|
|
187 |
|
|
ALTIVEC_EXPRESSION_H = \
|
188 |
|
|
altivec_expression.h
|
189 |
|
|
|
190 |
|
|
ALTIVEC_REGISTERS_H = \
|
191 |
|
|
altivec_registers.h
|
192 |
|
|
|
193 |
|
|
BASICS_H = \
|
194 |
|
|
basics.h \
|
195 |
|
|
$(CONFIG_H) \
|
196 |
|
|
$(PPC_CONFIG_H) \
|
197 |
|
|
$(INLINE_H) \
|
198 |
|
|
$(SIM_CALLBACKS_H) \
|
199 |
|
|
$(DEBUG_H) \
|
200 |
|
|
$(WORDS_H) \
|
201 |
|
|
$(BITS_H) \
|
202 |
|
|
$(SIM_ENDIAN_H)
|
203 |
|
|
|
204 |
|
|
BITS_H = \
|
205 |
|
|
bits.h \
|
206 |
|
|
bits.c
|
207 |
|
|
|
208 |
|
|
CAP_H = \
|
209 |
|
|
cap.h \
|
210 |
|
|
$(BASICS_H)
|
211 |
|
|
|
212 |
|
|
COREFILE_H = \
|
213 |
|
|
corefile.h
|
214 |
|
|
|
215 |
|
|
COREFILE_N_H = \
|
216 |
|
|
corefile-n.h
|
217 |
|
|
|
218 |
|
|
CPU_H = \
|
219 |
|
|
cpu.h \
|
220 |
|
|
$(BASICS_H) \
|
221 |
|
|
$(REGISTERS_H) \
|
222 |
|
|
$(DEVICE_H) \
|
223 |
|
|
$(COREFILE_H) \
|
224 |
|
|
$(VM_H) \
|
225 |
|
|
$(EVENTS_H) \
|
226 |
|
|
$(INTERRUPTS_H) \
|
227 |
|
|
$(PSIM_H) \
|
228 |
|
|
$(IDECODE_H) \
|
229 |
|
|
$(ITABLE_H) \
|
230 |
|
|
$(OS_EMUL_H) \
|
231 |
|
|
$(MON_H) \
|
232 |
|
|
$(MODEL_H) \
|
233 |
|
|
cpu.c
|
234 |
|
|
|
235 |
|
|
DEBUG_H = \
|
236 |
|
|
debug.h \
|
237 |
|
|
$(FILTER_FILENAME_H)
|
238 |
|
|
|
239 |
|
|
DEVICE_H = \
|
240 |
|
|
device.h
|
241 |
|
|
|
242 |
|
|
DEVICE_TABLE_H = \
|
243 |
|
|
device_table.h \
|
244 |
|
|
$(BASICS_H) \
|
245 |
|
|
$(DEVICE_H) \
|
246 |
|
|
$(TREE_H) \
|
247 |
|
|
$(HW_H)
|
248 |
|
|
|
249 |
|
|
E500_EXPRESSION_H = \
|
250 |
|
|
e500_expression.h
|
251 |
|
|
|
252 |
|
|
E500_REGISTERS_H = \
|
253 |
|
|
e500_registers.h
|
254 |
|
|
|
255 |
|
|
EMUL_BUGAPI_H = \
|
256 |
|
|
emul_bugapi.h
|
257 |
|
|
|
258 |
|
|
EMUL_CHIRP_H = \
|
259 |
|
|
emul_chirp.h
|
260 |
|
|
|
261 |
|
|
EMUL_GENERIC_H = \
|
262 |
|
|
emul_generic.h \
|
263 |
|
|
$(CPU_H) \
|
264 |
|
|
$(IDECODE_H) \
|
265 |
|
|
$(OS_EMUL_H) \
|
266 |
|
|
$(TREE_H) \
|
267 |
|
|
$(BFD_H)
|
268 |
|
|
|
269 |
|
|
EMUL_NETBSD_H = \
|
270 |
|
|
emul_netbsd.h
|
271 |
|
|
|
272 |
|
|
EMUL_UNIX_H = \
|
273 |
|
|
emul_unix.h
|
274 |
|
|
|
275 |
|
|
EVENTS_H = \
|
276 |
|
|
events.h
|
277 |
|
|
|
278 |
|
|
FILTER_FILENAME_H = \
|
279 |
|
|
filter_filename.h
|
280 |
|
|
|
281 |
|
|
FILTER_H = \
|
282 |
|
|
filter.h
|
283 |
|
|
|
284 |
|
|
GEN_ICACHE_H = \
|
285 |
|
|
gen-icache.h
|
286 |
|
|
|
287 |
|
|
GEN_IDECODE_H = \
|
288 |
|
|
gen-idecode.h
|
289 |
|
|
|
290 |
|
|
GEN_ITABLE_H = \
|
291 |
|
|
gen-itable.h
|
292 |
|
|
|
293 |
|
|
GEN_MODEL_H = \
|
294 |
|
|
gen-model.h
|
295 |
|
|
|
296 |
|
|
GEN_SEMANTICS_H = \
|
297 |
|
|
gen-semantics.h
|
298 |
|
|
|
299 |
|
|
GEN_SUPPORT_H = \
|
300 |
|
|
gen-support.h
|
301 |
|
|
|
302 |
|
|
HW_CPU_H = \
|
303 |
|
|
hw_cpu.h
|
304 |
|
|
|
305 |
|
|
HW_PHB_H = \
|
306 |
|
|
hw_phb.h
|
307 |
|
|
|
308 |
|
|
IDECODE_BRANCH_H = \
|
309 |
|
|
idecode_branch.h
|
310 |
|
|
|
311 |
|
|
IDECODE_EXPRESSION_H = \
|
312 |
|
|
idecode_expression.h \
|
313 |
|
|
$(ALTIVEC_EXPRESSION_H) \
|
314 |
|
|
$(E500_EXPRESSION_H)
|
315 |
|
|
|
316 |
|
|
IDECODE_FIELDS_H = \
|
317 |
|
|
idecode_fields.h
|
318 |
|
|
|
319 |
|
|
IGEN_H = \
|
320 |
|
|
igen.h
|
321 |
|
|
|
322 |
|
|
INLINE_H = \
|
323 |
|
|
inline.h
|
324 |
|
|
|
325 |
|
|
INTERRUPTS_H = \
|
326 |
|
|
interrupts.h
|
327 |
|
|
|
328 |
|
|
LD_CACHE_H = \
|
329 |
|
|
ld-cache.h
|
330 |
|
|
|
331 |
|
|
LD_DECODE_H = \
|
332 |
|
|
ld-decode.h
|
333 |
|
|
|
334 |
|
|
LD_INSN_H = \
|
335 |
|
|
ld-insn.h
|
336 |
|
|
|
337 |
|
|
LF_H = \
|
338 |
|
|
lf.h
|
339 |
|
|
|
340 |
|
|
MISC_H = \
|
341 |
|
|
misc.h \
|
342 |
|
|
$(CONFIG_H) \
|
343 |
|
|
$(FILTER_FILENAME_H)
|
344 |
|
|
|
345 |
|
|
MON_H = \
|
346 |
|
|
mon.h \
|
347 |
|
|
$(BASICS_H) \
|
348 |
|
|
$(ITABLE_H)
|
349 |
|
|
|
350 |
|
|
OPTIONS_H = \
|
351 |
|
|
options.h
|
352 |
|
|
|
353 |
|
|
OS_EMUL_H = \
|
354 |
|
|
os_emul.h
|
355 |
|
|
|
356 |
|
|
PSIM_H = \
|
357 |
|
|
psim.h \
|
358 |
|
|
$(BASICS_H)
|
359 |
|
|
|
360 |
|
|
REGISTERS_H = \
|
361 |
|
|
registers.h \
|
362 |
|
|
$(E500_REGISTERS_H) \
|
363 |
|
|
$(ALTIVEC_REGISTERS_H) \
|
364 |
|
|
$(SPREG_H)
|
365 |
|
|
|
366 |
|
|
SIM_CALLBACKS_H = \
|
367 |
|
|
sim_callbacks.h
|
368 |
|
|
|
369 |
|
|
SIM_ENDIAN_H = \
|
370 |
|
|
sim-endian.h \
|
371 |
|
|
sim-endian.c
|
372 |
|
|
|
373 |
|
|
SIM_ENDIAN_N_H = \
|
374 |
|
|
sim-endian-n.h
|
375 |
|
|
|
376 |
|
|
SIM_MAIN_H = \
|
377 |
|
|
sim-main.h \
|
378 |
|
|
$(COMMON_SIM_BASICS_H) \
|
379 |
|
|
$(COMMON_SIM_SIGNAL_H) \
|
380 |
|
|
$(COMMON_SIM_BASE_H)
|
381 |
|
|
|
382 |
|
|
STD_CONFIG_H = \
|
383 |
|
|
std-config.h
|
384 |
|
|
|
385 |
|
|
TABLE_H = \
|
386 |
|
|
table.h
|
387 |
|
|
|
388 |
|
|
TREE_H = \
|
389 |
|
|
tree.h
|
390 |
|
|
|
391 |
|
|
VM_H = \
|
392 |
|
|
vm.h
|
393 |
|
|
|
394 |
|
|
VM_N_H = \
|
395 |
|
|
vm_n.h
|
396 |
|
|
|
397 |
|
|
WORDS_H = \
|
398 |
|
|
words.h
|
399 |
|
|
|
400 |
|
|
|
401 |
|
|
# Generated headers.
|
402 |
|
|
CONFIG_H = \
|
403 |
|
|
config.h
|
404 |
|
|
|
405 |
|
|
DEFINES_H = \
|
406 |
|
|
defines.h
|
407 |
|
|
|
408 |
|
|
HW_H = \
|
409 |
|
|
hw.h
|
410 |
|
|
|
411 |
|
|
ICACHE_H = \
|
412 |
|
|
icache.h
|
413 |
|
|
|
414 |
|
|
IDECODE_H = \
|
415 |
|
|
idecode.h \
|
416 |
|
|
$(IDECODE_EXPRESSION_H) \
|
417 |
|
|
$(IDECODE_FIELDS_H) \
|
418 |
|
|
$(IDECODE_BRANCH_H)
|
419 |
|
|
|
420 |
|
|
ITABLE_H = \
|
421 |
|
|
itable.h
|
422 |
|
|
|
423 |
|
|
MODEL_H = \
|
424 |
|
|
model.h
|
425 |
|
|
|
426 |
|
|
PK_H = \
|
427 |
|
|
pk.h
|
428 |
|
|
|
429 |
|
|
PPC_CONFIG_H = \
|
430 |
|
|
ppc-config.h
|
431 |
|
|
|
432 |
|
|
SEMANTICS_H = \
|
433 |
|
|
semantics.h
|
434 |
|
|
|
435 |
|
|
SPREG_H = \
|
436 |
|
|
spreg.h
|
437 |
|
|
|
438 |
|
|
SUPPORT_H = \
|
439 |
|
|
support.h \
|
440 |
|
|
support.c
|
441 |
|
|
|
442 |
|
|
TARG_VALS_H = \
|
443 |
|
|
targ-vals.h
|
444 |
|
|
|
445 |
|
|
TCONFIG_H = \
|
446 |
|
|
tconfig.h
|
447 |
|
|
|
448 |
|
|
INLINE = \
|
449 |
|
|
inline.h \
|
450 |
|
|
inline.c
|
451 |
|
|
|
452 |
|
|
BUILT_SRC_WO_CONFIG = \
|
453 |
|
|
icache.h icache.c \
|
454 |
|
|
support.h support.c \
|
455 |
|
|
idecode.h idecode.c \
|
456 |
|
|
semantics.h semantics.c \
|
457 |
|
|
itable.h itable.c \
|
458 |
|
|
spreg.h spreg.c \
|
459 |
|
|
model.h model.c \
|
460 |
|
|
support.h support.c \
|
461 |
|
|
pk.h \
|
462 |
|
|
hw.h hw.c \
|
463 |
|
|
filter_host.c \
|
464 |
|
|
@sim_targ_vals@
|
465 |
|
|
|
466 |
|
|
BUILT_SRC = \
|
467 |
|
|
$(BUILT_SRC_WO_CONFIG) \
|
468 |
|
|
config.h \
|
469 |
|
|
ppc-config.h
|
470 |
|
|
|
471 |
|
|
LIB_INLINE_SRC = \
|
472 |
|
|
psim.c \
|
473 |
|
|
bits.c \
|
474 |
|
|
debug.c \
|
475 |
|
|
sim-endian.c \
|
476 |
|
|
sim-endian.h \
|
477 |
|
|
sim-endian-n.h \
|
478 |
|
|
vm.c \
|
479 |
|
|
vm_n.h \
|
480 |
|
|
corefile.c \
|
481 |
|
|
events.c \
|
482 |
|
|
os_emul.c \
|
483 |
|
|
registers.c \
|
484 |
|
|
cpu.c \
|
485 |
|
|
interrupts.c \
|
486 |
|
|
device.c \
|
487 |
|
|
tree.c \
|
488 |
|
|
device_table.c \
|
489 |
|
|
cap.c \
|
490 |
|
|
mon.c \
|
491 |
|
|
options.c
|
492 |
|
|
|
493 |
|
|
LIB_SRC = \
|
494 |
|
|
$(PACKAGE_SRC) \
|
495 |
|
|
$(HW_SRC) \
|
496 |
|
|
$(LIB_INLINE_SRC)
|
497 |
|
|
|
498 |
|
|
MAIN_SRC = \
|
499 |
|
|
main.c \
|
500 |
|
|
gdb-sim.c \
|
501 |
|
|
sim_calls.c
|
502 |
|
|
|
503 |
|
|
|
504 |
|
|
# NOTE: semantics, idecode and psim put last so smaller files are compiled
|
505 |
|
|
# first
|
506 |
|
|
LIB_OBJ = \
|
507 |
|
|
debug.o \
|
508 |
|
|
filter_filename.o \
|
509 |
|
|
bits.o \
|
510 |
|
|
sim-endian.o \
|
511 |
|
|
os_emul.o \
|
512 |
|
|
emul_generic.o \
|
513 |
|
|
emul_bugapi.o \
|
514 |
|
|
emul_chirp.o \
|
515 |
|
|
emul_netbsd.o \
|
516 |
|
|
emul_unix.o \
|
517 |
|
|
registers.o \
|
518 |
|
|
vm.o \
|
519 |
|
|
corefile.o \
|
520 |
|
|
model.o \
|
521 |
|
|
spreg.o \
|
522 |
|
|
cpu.o \
|
523 |
|
|
interrupts.o \
|
524 |
|
|
events.o \
|
525 |
|
|
cap.o \
|
526 |
|
|
device.o \
|
527 |
|
|
tree.o \
|
528 |
|
|
device_table.o \
|
529 |
|
|
itable.o \
|
530 |
|
|
mon.o \
|
531 |
|
|
icache.o \
|
532 |
|
|
semantics.o \
|
533 |
|
|
idecode.o \
|
534 |
|
|
support.o \
|
535 |
|
|
@sim_fpu@ \
|
536 |
|
|
psim.o \
|
537 |
|
|
$(PACKAGE_OBJ) \
|
538 |
|
|
$(HW_OBJ) \
|
539 |
|
|
options.o
|
540 |
|
|
|
541 |
|
|
|
542 |
|
|
GDB_OBJ = gdb-sim.o sim_calls.o @sim_callback@
|
543 |
|
|
|
544 |
|
|
HW_SRC = @sim_hw_src@
|
545 |
|
|
HW_OBJ = @sim_hw_obj@
|
546 |
|
|
|
547 |
|
|
PACKAGE_SRC = @sim_pk_src@
|
548 |
|
|
PACKAGE_OBJ = @sim_pk_obj@
|
549 |
|
|
|
550 |
|
|
|
551 |
|
|
psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP)
|
552 |
|
|
$(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
|
553 |
|
|
|
554 |
|
|
run: psim
|
555 |
|
|
rm -f run$(EXEEXT)
|
556 |
|
|
ln psim$(EXEEXT) run$(EXEEXT)
|
557 |
|
|
|
558 |
|
|
$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
|
559 |
|
|
rm -f $(TARGETLIB)
|
560 |
|
|
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
|
561 |
|
|
$(RANLIB) $(TARGETLIB)
|
562 |
|
|
|
563 |
|
|
psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
|
564 |
|
|
|
565 |
|
|
bits.o: bits.c $(BASICS_H)
|
566 |
|
|
|
567 |
|
|
debug.o: debug.c $(CONFIG_H) $(BASICS_H)
|
568 |
|
|
filter_filename.o: filter_filename.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
|
569 |
|
|
|
570 |
|
|
sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
|
571 |
|
|
|
572 |
|
|
os_emul.o: os_emul.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) $(EMUL_GENERIC_H) $(EMUL_NETBSD_H) $(EMUL_UNIX_H) $(EMUL_CHIRP_H) $(EMUL_BUGAPI_H)
|
573 |
|
|
emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
|
574 |
|
|
|
575 |
|
|
emul_bugapi.o: emul_bugapi.c $(EMUL_GENERIC_H) $(EMUL_BUGAPI_H)
|
576 |
|
|
emul_chirp.o: emul_chirp.c $(EMUL_GENERIC_H) $(EMUL_CHIRP_H)
|
577 |
|
|
emul_netbsd.o: emul_netbsd.c $(EMUL_GENERIC_H) $(EMUL_NETBSD_H)
|
578 |
|
|
emul_unix.o: emul_unix.c $(EMUL_GENERIC_H) $(EMUL_UNIX_H)
|
579 |
|
|
|
580 |
|
|
registers.o: registers.c $(BASICS_H) $(REGISTERS_H)
|
581 |
|
|
|
582 |
|
|
cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
|
583 |
|
|
|
584 |
|
|
interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H)
|
585 |
|
|
|
586 |
|
|
# Given that inlines are turned on now, rebuild idecode whenever
|
587 |
|
|
# anything changes.
|
588 |
|
|
idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC)
|
589 |
|
|
|
590 |
|
|
# double.o: double.c dp-bit.c
|
591 |
|
|
|
592 |
|
|
vm.o: vm.c $(BASICS_H) $(REGISTERS_H) $(DEVICE_H) $(COREFILE_H) $(VM_H) $(INTERRUPTS_H) $(MON_H) $(CPU_H) $(VM_N_H)
|
593 |
|
|
|
594 |
|
|
corefile.o: corefile.c $(BASICS_H) $(DEVICE_TABLE_H) $(COREFILE_H) $(COREFILE_N_H)
|
595 |
|
|
|
596 |
|
|
model.o: model.c $(CPU_H) $(MON_H)
|
597 |
|
|
|
598 |
|
|
events.o: events.c $(BASICS_H) $(EVENTS_H)
|
599 |
|
|
|
600 |
|
|
sim_calls.o: sim_calls.c $(PSIM_H) $(OPTIONS_H) $(DEFS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
|
601 |
|
|
|
602 |
|
|
gdb-sim.o: gdb-sim.c $(PSIM_H) $(OPTIONS_H) $(REGISTERS_H) $(GDB_REMOTE_SIM_H) $(GDB_SIM_PPC_H) $(SIM_CALLBACK_H)
|
603 |
|
|
|
604 |
|
|
spreg.o: spreg.c $(BASICS_H) $(SPREG_H)
|
605 |
|
|
|
606 |
|
|
main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
|
607 |
|
|
|
608 |
|
|
device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H)
|
609 |
|
|
|
610 |
|
|
tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H)
|
611 |
|
|
|
612 |
|
|
device_table.o: device_table.c $(DEVICE_TABLE_H) hw.c
|
613 |
|
|
|
614 |
|
|
cap.o: cap.c $(CAP_H)
|
615 |
|
|
|
616 |
|
|
semantics.o: semantics.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
|
617 |
|
|
|
618 |
|
|
icache.o: icache.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(ICACHE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
|
619 |
|
|
|
620 |
|
|
support.o: support.c $(CPU_H) $(IDECODE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
|
621 |
|
|
|
622 |
|
|
itable.o: itable.c $(ITABLE_H)
|
623 |
|
|
|
624 |
|
|
mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
|
625 |
|
|
|
626 |
|
|
# GDB after 4.16 expects the default_callback structure to be setup.
|
627 |
|
|
# As a kludge, build the common stuff here for now.
|
628 |
|
|
gentmap: ../common/gentmap.c Makefile targ-vals.def
|
629 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS)
|
630 |
|
|
|
631 |
|
|
targ-vals.def: $(srcdir)/../common/nltvals.def
|
632 |
|
|
rm -f targ-vals.def tmp-def
|
633 |
|
|
cat $(srcdir)/../common/nltvals.def > tmp-vals.def
|
634 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def
|
635 |
|
|
|
636 |
|
|
targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change
|
637 |
|
|
rm -f tmp-vals.h
|
638 |
|
|
./gentmap -h > tmp-vals.h
|
639 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h
|
640 |
|
|
|
641 |
|
|
targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change
|
642 |
|
|
rm -f tmp-map.c
|
643 |
|
|
./gentmap -c > tmp-map.c
|
644 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-map.c targ-map.c
|
645 |
|
|
|
646 |
|
|
callback.o: ../common/callback.c $(TARG_VALS_H) $(CONFIG_H)
|
647 |
|
|
$(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
|
648 |
|
|
|
649 |
|
|
targ-map.o: targ-map.c $(ANSIDECL_H) $(GDB_CALLBACK_H) $(TARG_VALS_H)
|
650 |
|
|
|
651 |
|
|
sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) $(TCONFIG_H)
|
652 |
|
|
$(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
|
653 |
|
|
|
654 |
|
|
tconfig.h:
|
655 |
|
|
rm -f tconfig.h
|
656 |
|
|
echo > tconfig.h
|
657 |
|
|
|
658 |
|
|
# Rebuild options whenever something changes so the date/time is up to date.
|
659 |
|
|
options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
|
660 |
|
|
$(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
|
661 |
|
|
|
662 |
|
|
defines.h: tmp-defines; @true
|
663 |
|
|
tmp-defines: config.h Makefile
|
664 |
|
|
sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
|
665 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-defines.h defines.h
|
666 |
|
|
touch tmp-defines
|
667 |
|
|
|
668 |
|
|
#
|
669 |
|
|
# Rules to create the built c source code files
|
670 |
|
|
#
|
671 |
|
|
|
672 |
|
|
ppc-config.h: $(CONFIG_FILE)
|
673 |
|
|
cp $(srcdir)/$(CONFIG_FILE) ppc-config.h
|
674 |
|
|
|
675 |
|
|
|
676 |
|
|
tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
|
677 |
|
|
./dgen $(DGEN_FLAGS) \
|
678 |
|
|
-r $(srcdir)/ppc-spr-table \
|
679 |
|
|
-n spreg.h -hp tmp-spreg.h \
|
680 |
|
|
-n spreg.c -p tmp-spreg.c
|
681 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
|
682 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
|
683 |
|
|
touch tmp-dgen
|
684 |
|
|
|
685 |
|
|
tmp-igen: igen $(srcdir)/ppc-instructions $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
|
686 |
|
|
./igen $(IGEN_FLAGS) \
|
687 |
|
|
-o $(srcdir)/$(IGEN_OPCODE_RULES) \
|
688 |
|
|
-I $(srcdir) -i $(srcdir)/ppc-instructions \
|
689 |
|
|
-n icache.h -hc tmp-icache.h \
|
690 |
|
|
-n icache.c -c tmp-icache.c \
|
691 |
|
|
-n semantics.h -hs tmp-semantics.h \
|
692 |
|
|
-n semantics.c -s tmp-semantics.c \
|
693 |
|
|
-n idecode.h -hd tmp-idecode.h \
|
694 |
|
|
-n idecode.c -d tmp-idecode.c \
|
695 |
|
|
-n itable.h -ht tmp-itable.h \
|
696 |
|
|
-n itable.c -t tmp-itable.c \
|
697 |
|
|
-n model.h -hm tmp-model.h \
|
698 |
|
|
-n model.c -m tmp-model.c \
|
699 |
|
|
-n support.h -hf tmp-support.h \
|
700 |
|
|
-n support.c -f tmp-support.c
|
701 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-icache.h icache.h
|
702 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-icache.c icache.c
|
703 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
|
704 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
|
705 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
|
706 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
|
707 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h
|
708 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c
|
709 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-model.h model.h
|
710 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-model.c model.c
|
711 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-support.h support.h
|
712 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-support.c support.c
|
713 |
|
|
touch tmp-igen
|
714 |
|
|
|
715 |
|
|
# NOTE: Some versions of make don't handle files created as side-effects
|
716 |
|
|
# uncomment the below if that is the case.
|
717 |
|
|
|
718 |
|
|
$(TARGETLIB): tmp-igen tmp-dgen
|
719 |
|
|
itable.h itable.c icache.h icache.c idecode.h idecode.c semantics.h semantics.c model.h model.c support.h support.c: tmp-igen
|
720 |
|
|
spreg.h spreg.c: tmp-dgen
|
721 |
|
|
|
722 |
|
|
dgen: dgen.o table.o lf.o misc.o filter_host.o
|
723 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_host.o $(BUILD_LIBS)
|
724 |
|
|
|
725 |
|
|
igen: igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o
|
726 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o $(BUILD_LIBS)
|
727 |
|
|
|
728 |
|
|
filter_host.c: filter_filename.c
|
729 |
|
|
cat $(srcdir)/filter_filename.c > filter_host.c
|
730 |
|
|
|
731 |
|
|
filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
|
732 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
|
733 |
|
|
|
734 |
|
|
table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
|
735 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
|
736 |
|
|
|
737 |
|
|
lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H)
|
738 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
|
739 |
|
|
|
740 |
|
|
filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H)
|
741 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
|
742 |
|
|
tmp-filter: filter.c $(MISC_H) misc.o
|
743 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
|
744 |
|
|
|
745 |
|
|
ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H)
|
746 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
|
747 |
|
|
tmp-ld-decode: ld-decode.c misc.o lf.o table.o filter_host.o
|
748 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
|
749 |
|
|
|
750 |
|
|
ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H)
|
751 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
|
752 |
|
|
tmp-ld-cache: ld-cache.c misc.o lf.o table.o filter_host.o
|
753 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
|
754 |
|
|
|
755 |
|
|
ld-insn.o: ld-insn.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H)
|
756 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
|
757 |
|
|
tmp-ld-insn: ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
|
758 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
|
759 |
|
|
|
760 |
|
|
gen-model.o: gen-model.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(GEN_MODEL_H)
|
761 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
|
762 |
|
|
|
763 |
|
|
gen-itable.o: gen-itable.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_ITABLE_H)
|
764 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
|
765 |
|
|
|
766 |
|
|
gen-icache.o: gen-icache.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H)
|
767 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
|
768 |
|
|
|
769 |
|
|
gen-semantics.o: gen-semantics.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_ICACHE_H) $(GEN_IDECODE_H)
|
770 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
|
771 |
|
|
|
772 |
|
|
gen-idecode.o: gen-idecode.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H) $(GEN_SEMANTICS_H)
|
773 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
|
774 |
|
|
|
775 |
|
|
gen-support.o: gen-support.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
|
776 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
|
777 |
|
|
|
778 |
|
|
dgen.o: dgen.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
|
779 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
|
780 |
|
|
|
781 |
|
|
igen.o: igen.c $(MISC_H) $(LF_H) $(TABLE_H) $(CONFIG_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_MODEL_H) $(GEN_ICACHE_H) $(GEN_ITABLE_H) $(GEN_IDECODE_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
|
782 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
|
783 |
|
|
|
784 |
|
|
misc.o: misc.c $(CONFIG_H) $(MISC_H)
|
785 |
|
|
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
|
786 |
|
|
|
787 |
|
|
|
788 |
|
|
|
789 |
|
|
# real hardware
|
790 |
|
|
hw.c hw.h: tmp-hw; @true
|
791 |
|
|
tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change
|
792 |
|
|
# The first for loop is to remove duplicates.
|
793 |
|
|
f=""; \
|
794 |
|
|
for i in $(HW_SRC) ; do \
|
795 |
|
|
case " $$f " in \
|
796 |
|
|
*" $$i "*) ;; \
|
797 |
|
|
*) f="$$f $$i" ;; \
|
798 |
|
|
esac ; \
|
799 |
|
|
done ; \
|
800 |
|
|
for hw in $$f ; do echo $$hw ; done \
|
801 |
|
|
| sed -e 's/^.*\(hw_.*\)\.c/\1/' \
|
802 |
|
|
-e 's/^/extern const device_descriptor /' \
|
803 |
|
|
-e 's/$$/_device_descriptor\[\];/' \
|
804 |
|
|
> tmp-hw.h
|
805 |
|
|
f=""; \
|
806 |
|
|
for i in $(HW_SRC) ; do \
|
807 |
|
|
case " $$f " in \
|
808 |
|
|
*" $$i "*) ;; \
|
809 |
|
|
*) f="$$f $$i" ;; \
|
810 |
|
|
esac ; \
|
811 |
|
|
done ; \
|
812 |
|
|
for hw in $$f ; do echo $$hw ; done \
|
813 |
|
|
| sed -e 's/^.*\(hw_.*\)\.c/\1/' \
|
814 |
|
|
-e 's/^/ /' \
|
815 |
|
|
-e 's/$$/_device_descriptor,/' \
|
816 |
|
|
> tmp-hw.c
|
817 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-hw.h hw.h
|
818 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-hw.c hw.c
|
819 |
|
|
touch tmp-hw
|
820 |
|
|
|
821 |
|
|
hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H)
|
822 |
|
|
hw_com.o: hw_com.c $(DEVICE_TABLE_H)
|
823 |
|
|
hw_core.o: hw_core.c $(DEVICE_TABLE_H) $(COREFILE_H)
|
824 |
|
|
hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) $(PK_H)
|
825 |
|
|
hw_eeprom.o: hw_eeprom.c $(DEVICE_TABLE_H)
|
826 |
|
|
hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
|
827 |
|
|
hw_htab.o: hw_htab.c $(DEVICE_TABLE_H) $(BFD_H)
|
828 |
|
|
hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
|
829 |
|
|
hw_init.o: hw_init.c $(DEVICE_TABLE_H) $(BFD_H) $(PSIM_H)
|
830 |
|
|
hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
|
831 |
|
|
hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
|
832 |
|
|
hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
|
833 |
|
|
hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
|
834 |
|
|
hw_pal.o: hw_pal.c $(DEVICE_TABLE_H) $(CPU_H)
|
835 |
|
|
hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) $(HW_PHB_H) $(COREFILE_H)
|
836 |
|
|
hw_register.o: hw_register.c $(DEVICE_TABLE_H) $(PSIM_H)
|
837 |
|
|
hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
|
838 |
|
|
hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H)
|
839 |
|
|
# ignore this line, it stops make from getting confused
|
840 |
|
|
|
841 |
|
|
|
842 |
|
|
|
843 |
|
|
# real packages
|
844 |
|
|
pk.h: tmp-pk; @true
|
845 |
|
|
tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change
|
846 |
|
|
# The first for loop is to remove duplicates.
|
847 |
|
|
f=""; \
|
848 |
|
|
for i in $(PACKAGE_SRC) ; do \
|
849 |
|
|
case " $$f " in \
|
850 |
|
|
*" $$i "*) ;; \
|
851 |
|
|
*) f="$$f $$i" ;; \
|
852 |
|
|
esac ; \
|
853 |
|
|
done ; \
|
854 |
|
|
for pk in $$f ; do echo $$pk ; done \
|
855 |
|
|
| sed -e 's/^.*pk_\(.*\)\.c/\1/' \
|
856 |
|
|
-e 's/^/extern package_create_instance_callback pk_/' \
|
857 |
|
|
-e 's/$$/_create_instance;/' \
|
858 |
|
|
> tmp-pk.h
|
859 |
|
|
$(SHELL) $(srcdir)/../../move-if-change tmp-pk.h pk.h
|
860 |
|
|
touch tmp-pk
|
861 |
|
|
|
862 |
|
|
pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H)
|
863 |
|
|
# ignore this line, it stops make from getting confused
|
864 |
|
|
|
865 |
|
|
|
866 |
|
|
|
867 |
|
|
tags etags: TAGS
|
868 |
|
|
|
869 |
|
|
TAGS: $(BUILT_SRC)
|
870 |
|
|
etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
|
871 |
|
|
|
872 |
|
|
clean mostlyclean:
|
873 |
|
|
rm -f tmp-* *.[oasi] core psim$(EXEEXT) run$(EXEEXT) igen dgen $(BUILT_SRC_WO_CONFIG) gentmap
|
874 |
|
|
|
875 |
|
|
distclean realclean: clean
|
876 |
|
|
rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
|
877 |
|
|
|
878 |
|
|
maintainer-clean: distclean
|
879 |
|
|
rm -f *~ *.log ppc-config.h core *.core
|
880 |
|
|
|
881 |
|
|
Makefile: Makefile.in config.status
|
882 |
|
|
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
|
883 |
|
|
|
884 |
|
|
config.h: stamp-h ; @true
|
885 |
|
|
stamp-h: config.in config.status
|
886 |
|
|
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
|
887 |
|
|
|
888 |
|
|
config.status: configure
|
889 |
|
|
$(SHELL) ./config.status --recheck
|
890 |
|
|
|
891 |
|
|
install: installdirs
|
892 |
|
|
n=`echo run | sed '$(program_transform_name)'`; \
|
893 |
|
|
$(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
|
894 |
|
|
|
895 |
|
|
installdirs:
|
896 |
|
|
$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
|