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