2 # This file is part of the program psim.
4 # Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
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.
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.
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.
25 srcroot = $(srcdir)/../..
28 exec_prefix = @exec_prefix@
30 host_alias = @host_alias@
31 target_alias = @target_alias@
32 program_transform_name = @program_transform_name@
35 tooldir = $(libdir)/$(target_alias)
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
49 includedir = @includedir@
51 # This can be referenced by the gettext configuration code.
58 INSTALL_PROGRAM = @INSTALL_PROGRAM@
59 INSTALL_DATA = @INSTALL_DATA@
65 CC_FOR_BUILD = @CC_FOR_BUILD@
70 SIM_CFLAGS = @sim_cflags@
71 INLINE_CFLAGS = @sim_inline@
72 BSWAP_CFLAGS = @sim_bswap@
73 ENDIAN_CFLAGS = @sim_endian@
74 REGPARM_CFLAGS = @sim_regparm@
75 STDCALL_CFLAGS = @sim_stdcall@
76 HOSTENDIAN_CFLAGS = @sim_hostendian@
77 SMP_CFLAGS = @sim_smp@
78 XOR_ENDIAN_CFLAGS = @sim_xor_endian@
79 BITSIZE_CFLAGS = @sim_bitsize@
80 HOSTBITSIZE_CFLAGS = @sim_hostbitsize@
81 ENV_CFLAGS = @sim_env@
82 TIMEBASE_CFLAGS = @sim_timebase@
83 ALIGNMENT_CFLAGS = @sim_alignment@
84 FLOAT_CFLAGS = @sim_float@
85 TRACE_CFLAGS = @sim_trace@
86 ASSERT_CFLAGS = @sim_assert@
87 RESERVED_CFLAGS = @sim_reserved@
88 MONITOR_CFLAGS = @sim_monitor@
89 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
90 STDIO_CFLAGS = @sim_stdio@
91 TERMIO_CFLAGS = @sim_termio@
92 WARNING_CFLAGS = @sim_warnings@
93 DEVZERO_CFLAGS = @sim_devzero@
94 CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
98 $(HOSTENDIAN_CFLAGS) \
100 $(XOR_ENDIAN_CFLAGS) \
102 $(HOSTBITSIZE_CFLAGS) \
105 $(ALIGNMENT_CFLAGS) \
115 SIM_FPU_CFLAGS = @sim_fpu_cflags@
117 STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
118 NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS)
119 BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS)
123 CONFIG_FILE = @sim_config@
124 IGEN_OPCODE_RULES = @sim_opcode@
125 IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
126 IGEN_DUPLICATE = @sim_dup@
127 IGEN_JUMP = @sim_jump@
128 IGEN_FILTER = @sim_filter@
129 IGEN_ICACHE = @sim_icache@
130 IGEN_SMP = @sim_igen_smp@
131 IGEN_LINE_NR = @sim_line_nr@
132 DGEN_FLAGS = @sim_switch@
134 HDEFINES = @HDEFINES@
137 $(IGEN_DECODE_MECHANISM) \
148 LIB_INCLUDES = -I$(srcdir)/../../include
149 BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
150 GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
152 INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
154 LIBIBERTY_LIB = ../../libiberty/libiberty.a
155 BFD_LIB = ../../bfd/libbfd.a
157 INTLLIBS = @INTLLIBS@
158 INTLDEPS = @INTLDEPS@
159 INTL_DIR = ../../intl
160 INTL_SRC = $(srcdir)/$(INTL_DIR)
161 INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
166 all: run $(TARGETLIB) $(GDB_OBJ)
169 $(CC) -c $(STD_CFLAGS) $<
172 # Headers outside sim/ppc.
173 ANSIDECL_H = $(srcroot)/include/ansidecl.h
174 BFD_H = ../../bfd/bfd.h
175 GDB_CALLBACK_H = $(srcroot)/include/gdb/callback.h
176 GDB_REMOTE_SIM_H = $(srcroot)/include/gdb/remote-sim.h
177 GDB_SIM_PPC_H = $(srcroot)/include/gdb/sim-ppc.h
178 COMMON_SIM_BASE_H = $(srcroot)/sim/common/sim-base.h
179 COMMON_SIM_BASICS_H = $(srcroot)/sim/common/sim-basics.h
180 COMMON_SIM_FPU_H = $(srcroot)/sim/common/sim-fpu.h
181 COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h
182 COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h
184 # Headers in sim/ppc.
188 ALTIVEC_EXPRESSION_H = \
191 ALTIVEC_REGISTERS_H = \
250 E500_EXPRESSION_H = \
279 FILTER_FILENAME_H = \
312 IDECODE_EXPRESSION_H = \
313 idecode_expression.h \
314 $(ALTIVEC_EXPRESSION_H) \
363 $(E500_REGISTERS_H) \
364 $(ALTIVEC_REGISTERS_H) \
379 $(COMMON_SIM_BASICS_H) \
380 $(COMMON_SIM_SIGNAL_H) \
417 $(IDECODE_EXPRESSION_H) \
418 $(IDECODE_FIELDS_H) \
453 BUILT_SRC_WO_CONFIG = \
455 support.h support.c \
456 idecode.h idecode.c \
457 semantics.h semantics.c \
461 support.h support.c \
468 $(BUILT_SRC_WO_CONFIG) \
505 # NOTE: semantics, idecode and psim put last so smaller files are compiled
543 GDB_OBJ = gdb-sim.o sim_calls.o @sim_callback@
545 HW_SRC = @sim_hw_src@
546 HW_OBJ = @sim_hw_obj@
548 PACKAGE_SRC = @sim_pk_src@
549 PACKAGE_OBJ = @sim_pk_obj@
552 psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(INTLDEPS)
553 $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(INTLLIBS) $(LIBIBERTY_LIB) $(LIBS)
557 ln psim$(EXEEXT) run$(EXEEXT)
559 $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
561 $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
562 $(RANLIB) $(TARGETLIB)
564 psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
566 bits.o: bits.c $(BASICS_H)
568 debug.o: debug.c $(CONFIG_H) $(BASICS_H)
569 filter_filename.o: filter_filename.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
571 sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
573 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)
574 emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
576 emul_bugapi.o: emul_bugapi.c $(EMUL_GENERIC_H) $(EMUL_BUGAPI_H)
577 emul_chirp.o: emul_chirp.c $(EMUL_GENERIC_H) $(EMUL_CHIRP_H)
578 emul_netbsd.o: emul_netbsd.c $(EMUL_GENERIC_H) $(EMUL_NETBSD_H)
579 emul_unix.o: emul_unix.c $(EMUL_GENERIC_H) $(EMUL_UNIX_H)
581 registers.o: registers.c $(BASICS_H) $(REGISTERS_H)
583 cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
585 interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H)
587 # Given that inlines are turned on now, rebuild idecode whenever
589 idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC)
591 # double.o: double.c dp-bit.c
593 vm.o: vm.c $(BASICS_H) $(REGISTERS_H) $(DEVICE_H) $(COREFILE_H) $(VM_H) $(INTERRUPTS_H) $(MON_H) $(CPU_H) $(VM_N_H)
595 corefile.o: corefile.c $(BASICS_H) $(DEVICE_TABLE_H) $(COREFILE_H) $(COREFILE_N_H)
597 model.o: model.c $(CPU_H) $(MON_H)
599 events.o: events.c $(BASICS_H) $(EVENTS_H)
601 sim_calls.o: sim_calls.c $(PSIM_H) $(OPTIONS_H) $(DEFS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
603 gdb-sim.o: gdb-sim.c $(PSIM_H) $(OPTIONS_H) $(REGISTERS_H) $(GDB_REMOTE_SIM_H) $(GDB_SIM_PPC_H) $(SIM_CALLBACK_H)
605 spreg.o: spreg.c $(BASICS_H) $(SPREG_H)
607 main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
609 device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H)
611 tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H)
613 device_table.o: device_table.c $(DEVICE_TABLE_H) hw.c
615 cap.o: cap.c $(CAP_H)
617 semantics.o: semantics.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
619 icache.o: icache.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(ICACHE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
621 support.o: support.c $(CPU_H) $(IDECODE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
623 itable.o: itable.c $(ITABLE_H)
625 mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
627 # GDB after 4.16 expects the default_callback structure to be setup.
628 # As a kludge, build the common stuff here for now.
629 gentmap: ../common/gentmap.c Makefile targ-vals.def
630 $(CC_FOR_BUILD) $(BUILD_FLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS)
632 targ-vals.def: $(srcdir)/../common/nltvals.def
633 rm -f targ-vals.def tmp-def
634 cat $(srcdir)/../common/nltvals.def > tmp-vals.def
635 $(SHELL) $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def
637 targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change
639 ./gentmap -h > tmp-vals.h
640 $(SHELL) $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h
642 targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change
644 ./gentmap -c > tmp-map.c
645 $(SHELL) $(srcdir)/../../move-if-change tmp-map.c targ-map.c
647 callback.o: ../common/callback.c $(TARG_VALS_H) $(CONFIG_H)
648 $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
650 targ-map.o: targ-map.c $(ANSIDECL_H) $(GDB_CALLBACK_H) $(TARG_VALS_H)
652 sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) $(TCONFIG_H)
653 $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
659 # Rebuild options whenever something changes so the date/time is up to date.
660 options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
661 $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
663 defines.h: tmp-defines; @true
664 tmp-defines: config.h Makefile
665 sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
666 $(SHELL) $(srcdir)/../../move-if-change tmp-defines.h defines.h
670 # Rules to create the built c source code files
673 ppc-config.h: $(CONFIG_FILE)
674 cp $(srcdir)/$(CONFIG_FILE) ppc-config.h
677 tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
678 ./dgen $(DGEN_FLAGS) \
679 -r $(srcdir)/ppc-spr-table \
680 -n spreg.h -hp tmp-spreg.h \
681 -n spreg.c -p tmp-spreg.c
682 $(SHELL) $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
683 $(SHELL) $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
686 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
687 ./igen $(IGEN_FLAGS) \
688 -o $(srcdir)/$(IGEN_OPCODE_RULES) \
689 -I $(srcdir) -i $(srcdir)/ppc-instructions \
690 -n icache.h -hc tmp-icache.h \
691 -n icache.c -c tmp-icache.c \
692 -n semantics.h -hs tmp-semantics.h \
693 -n semantics.c -s tmp-semantics.c \
694 -n idecode.h -hd tmp-idecode.h \
695 -n idecode.c -d tmp-idecode.c \
696 -n itable.h -ht tmp-itable.h \
697 -n itable.c -t tmp-itable.c \
698 -n model.h -hm tmp-model.h \
699 -n model.c -m tmp-model.c \
700 -n support.h -hf tmp-support.h \
701 -n support.c -f tmp-support.c
702 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h icache.h
703 $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c icache.c
704 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
705 $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
706 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
707 $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
708 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h
709 $(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c
710 $(SHELL) $(srcdir)/../../move-if-change tmp-model.h model.h
711 $(SHELL) $(srcdir)/../../move-if-change tmp-model.c model.c
712 $(SHELL) $(srcdir)/../../move-if-change tmp-support.h support.h
713 $(SHELL) $(srcdir)/../../move-if-change tmp-support.c support.c
716 # NOTE: Some versions of make don't handle files created as side-effects
717 # uncomment the below if that is the case.
719 $(TARGETLIB): tmp-igen tmp-dgen
720 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
721 spreg.h spreg.c: tmp-dgen
723 dgen: dgen.o table.o lf.o misc.o filter_host.o
724 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_host.o $(BUILD_LIBS)
726 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
727 $(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)
729 filter_host.c: filter_filename.c
730 cat $(srcdir)/filter_filename.c > filter_host.c
732 filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
733 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
735 table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
736 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
738 lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H)
739 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
741 filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H)
742 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
743 tmp-filter: filter.c $(MISC_H) misc.o
744 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
746 ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H)
747 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
748 tmp-ld-decode: ld-decode.o misc.o lf.o table.o filter_host.o
749 $(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)
751 ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H)
752 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
753 tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
754 $(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)
756 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)
757 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
758 tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
759 $(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)
761 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)
762 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
764 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)
765 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
767 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)
768 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
770 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)
771 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
773 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)
774 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
776 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)
777 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
779 dgen.o: dgen.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
780 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
782 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)
783 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
785 misc.o: misc.c $(CONFIG_H) $(MISC_H)
786 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
791 hw.c hw.h: tmp-hw; @true
792 tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change
793 # The first for loop is to remove duplicates.
795 for i in $(HW_SRC) ; do \
801 for hw in $$f ; do echo $$hw ; done \
802 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
803 -e 's/^/extern const device_descriptor /' \
804 -e 's/$$/_device_descriptor\[\];/' \
807 for i in $(HW_SRC) ; do \
813 for hw in $$f ; do echo $$hw ; done \
814 | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
816 -e 's/$$/_device_descriptor,/' \
818 $(SHELL) $(srcdir)/../../move-if-change tmp-hw.h hw.h
819 $(SHELL) $(srcdir)/../../move-if-change tmp-hw.c hw.c
822 hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H)
823 hw_com.o: hw_com.c $(DEVICE_TABLE_H)
824 hw_core.o: hw_core.c $(DEVICE_TABLE_H) $(COREFILE_H)
825 hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) $(PK_H)
826 hw_eeprom.o: hw_eeprom.c $(DEVICE_TABLE_H)
827 hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
828 hw_htab.o: hw_htab.c $(DEVICE_TABLE_H) $(BFD_H)
829 hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
830 hw_init.o: hw_init.c $(DEVICE_TABLE_H) $(BFD_H) $(PSIM_H)
831 hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
832 hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
833 hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
834 hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
835 hw_pal.o: hw_pal.c $(DEVICE_TABLE_H) $(CPU_H)
836 hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) $(HW_PHB_H) $(COREFILE_H)
837 hw_register.o: hw_register.c $(DEVICE_TABLE_H) $(PSIM_H)
838 hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
839 hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H)
840 # ignore this line, it stops make from getting confused
846 tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change
847 # The first for loop is to remove duplicates.
849 for i in $(PACKAGE_SRC) ; do \
855 for pk in $$f ; do echo $$pk ; done \
856 | sed -e 's/^.*pk_\(.*\)\.c/\1/' \
857 -e 's/^/extern package_create_instance_callback pk_/' \
858 -e 's/$$/_create_instance;/' \
860 $(SHELL) $(srcdir)/../../move-if-change tmp-pk.h pk.h
863 pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H)
864 # ignore this line, it stops make from getting confused
871 etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
874 rm -f tmp-* *.[oasi] core psim$(EXEEXT) run$(EXEEXT) igen dgen $(BUILT_SRC_WO_CONFIG) gentmap
876 distclean realclean: clean
877 rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
879 maintainer-clean: distclean
880 rm -f *~ *.log ppc-config.h core *.core
882 Makefile: Makefile.in config.status
883 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
885 config.h: stamp-h ; @true
886 stamp-h: config.in config.status
887 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
889 config.status: configure
890 $(SHELL) ./config.status --recheck
893 n=`echo run | sed '$(program_transform_name)'`; \
894 $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
897 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)