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