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