#
# This file is part of the program psim.
#
-# Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+# Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$(STDIO_CFLAGS) \
$(TERMIO_CFLAGS) \
$(DEVZERO_CFLAGS)
+SIM_FPU_CFLAGS = @sim_fpu_cflags@
-STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
-NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
+STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
+NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS)
BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS)
BUILD_LDFLAGS =
LIB_INCLUDES = -I$(srcdir)/../../include
BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -I$(srcdir)/../../mmalloc
+
INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
LIBIBERTY_LIB = ../../libiberty/libiberty.a
INTLLIBS = @INTLLIBS@
INTLDEPS = @INTLDEPS@
+INTL_DIR = ../../intl
+INTL_SRC = $(srcdir)/$(INTL_DIR)
+INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
+
TARGETLIB = libsim.a
$(CC) -c $(STD_CFLAGS) $<
+# Headers outside sim/ppc.
+ANSIDECL_H = $(srcroot)/include/ansidecl.h
+BFD_H = ../../bfd/bfd.h
+DEFS_H = $(srcroot)/gdb/defs.h
+GDB_CALLBACK_H = $(srcroot)/include/gdb/callback.h
+GDB_REMOTE_SIM_H = $(srcroot)/include/gdb/remote-sim.h
+COMMON_SIM_BASE_H = $(srcroot)/sim/common/sim-base.h
+COMMON_SIM_BASICS_H = $(srcroot)/sim/common/sim-basics.h
+COMMON_SIM_FPU_H = $(srcroot)/sim/common/sim-fpu.h
+COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h
+COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h
+
+# Headers in sim/ppc.
+ACCONFIG_H = \
+ acconfig.h
+
+ALTIVEC_EXPRESSION_H = \
+ altivec_expression.h
+
+ALTIVEC_REGISTERS_H = \
+ altivec_registers.h
BASICS_H = \
basics.h \
- config.h \
- ppc-config.h \
- inline.h \
- sim_callbacks.h \
- debug.h filter_filename.h \
- words.h \
+ $(CONFIG_H) \
+ $(PPC_CONFIG_H) \
+ $(INLINE_H) \
+ $(SIM_CALLBACKS_H) \
+ $(DEBUG_H) \
+ $(WORDS_H) \
+ $(BITS_H) \
+ $(SIM_ENDIAN_H)
+
+BITS_H = \
bits.h \
- sim-endian.h
+ bits.c
-PSIM_H = \
- psim.h \
+CAP_H = \
+ cap.h \
$(BASICS_H)
-IDECODE_H = \
- idecode.h \
- idecode_expression.h \
- idecode_branch.h \
- idecode_fields.h \
- icache.h
+COREFILE_H = \
+ corefile.h
-REGISTERS_H = \
- registers.h \
- spreg.h
+COREFILE_N_H = \
+ corefile-n.h
CPU_H = \
cpu.h \
$(BASICS_H) \
$(REGISTERS_H) \
+ $(DEVICE_H) \
+ $(COREFILE_H) \
+ $(VM_H) \
+ $(EVENTS_H) \
+ $(INTERRUPTS_H) \
+ $(PSIM_H) \
$(IDECODE_H) \
- device.h \
- corefile.h \
- vm.h \
- events.h \
- interrupts.h \
- psim.h \
- itable.h \
- mon.h \
- model.h
+ $(ITABLE_H) \
+ $(OS_EMUL_H) \
+ $(MON_H) \
+ $(MODEL_H) \
+ cpu.c
+
+DEBUG_H = \
+ debug.h \
+ $(FILTER_FILENAME_H)
+
+DEVICE_H = \
+ device.h
DEVICE_TABLE_H = \
- $(BASICS_H) \
device_table.h \
- device.h \
- tree.h \
- hw.h
+ $(BASICS_H) \
+ $(DEVICE_H) \
+ $(TREE_H) \
+ $(HW_H)
+
+E500_EXPRESSION_H = \
+ e500_expression.h
+
+E500_REGISTERS_H = \
+ e500_registers.h
+
+EMUL_BUGAPI_H = \
+ emul_bugapi.h
+
+EMUL_CHIRP_H = \
+ emul_chirp.h
EMUL_GENERIC_H = \
+ emul_generic.h \
$(CPU_H) \
$(IDECODE_H) \
- emul_generic.h \
- tree.h \
+ $(OS_EMUL_H) \
+ $(TREE_H) \
+ $(BFD_H)
+
+EMUL_NETBSD_H = \
+ emul_netbsd.h
+
+EMUL_UNIX_H = \
+ emul_unix.h
+
+EVENTS_H = \
+ events.h
+
+FILTER_FILENAME_H = \
+ filter_filename.h
+
+FILTER_H = \
+ filter.h
+
+GEN_ICACHE_H = \
+ gen-icache.h
+
+GEN_IDECODE_H = \
+ gen-idecode.h
+
+GEN_ITABLE_H = \
+ gen-itable.h
+
+GEN_MODEL_H = \
+ gen-model.h
+
+GEN_SEMANTICS_H = \
+ gen-semantics.h
+
+GEN_SUPPORT_H = \
+ gen-support.h
+
+HW_CPU_H = \
+ hw_cpu.h
+
+HW_PHB_H = \
+ hw_phb.h
+
+IDECODE_BRANCH_H = \
+ idecode_branch.h
+
+IDECODE_EXPRESSION_H = \
+ idecode_expression.h \
+ $(ALTIVEC_EXPRESSION_H) \
+ $(E500_EXPRESSION_H)
+
+IDECODE_FIELDS_H = \
+ idecode_fields.h
+
+IGEN_H = \
+ igen.h
+
+INLINE_H = \
+ inline.h
+
+INTERRUPTS_H = \
+ interrupts.h
+
+LD_CACHE_H = \
+ ld-cache.h
+
+LD_DECODE_H = \
+ ld-decode.h
+
+LD_INSN_H = \
+ ld-insn.h
+
+LF_H = \
+ lf.h
+
+MISC_H = \
+ misc.h \
+ $(CONFIG_H) \
+ $(FILTER_FILENAME_H)
+
+MON_H = \
+ mon.h \
+ $(BASICS_H) \
+ $(ITABLE_H)
+
+OPTIONS_H = \
+ options.h
+
+OS_EMUL_H = \
os_emul.h
+PSIM_H = \
+ psim.h \
+ $(BASICS_H)
+
+REGISTERS_H = \
+ registers.h \
+ $(E500_REGISTERS_H) \
+ $(ALTIVEC_REGISTERS_H) \
+ $(SPREG_H)
+
+SIM_CALLBACKS_H = \
+ sim_callbacks.h
+
+SIM_ENDIAN_H = \
+ sim-endian.h \
+ sim-endian.c
+
+SIM_ENDIAN_N_H = \
+ sim-endian-n.h
+
+SIM_MAIN_H = \
+ sim-main.h \
+ $(COMMON_SIM_BASICS_H) \
+ $(COMMON_SIM_SIGNAL_H) \
+ $(COMMON_SIM_BASE_H)
+
+STD_CONFIG_H = \
+ std-config.h
+
+TABLE_H = \
+ table.h
+
+TREE_H = \
+ tree.h
+
+VM_H = \
+ vm.h
+
+VM_N_H = \
+ vm_n.h
+
+WORDS_H = \
+ words.h
+
+
+# Generated headers.
+CONFIG_H = \
+ config.h
+
+DEFINES_H = \
+ defines.h
+
+HW_H = \
+ hw.h
+
+ICACHE_H = \
+ icache.h
+
+IDECODE_H = \
+ idecode.h \
+ $(IDECODE_EXPRESSION_H) \
+ $(IDECODE_FIELDS_H) \
+ $(IDECODE_BRANCH_H)
+
+ITABLE_H = \
+ itable.h
+
+MODEL_H = \
+ model.h
+
+PK_H = \
+ pk.h
+
+PPC_CONFIG_H = \
+ ppc-config.h
+
+SEMANTICS_H = \
+ semantics.h
+
+SPREG_H = \
+ spreg.h
+
+SUPPORT_H = \
+ support.h \
+ support.c
+
+TARG_VALS_H = \
+ targ-vals.h
+
+TCONFIG_H = \
+ tconfig.h
INLINE = \
inline.h \
semantics.o \
idecode.o \
support.o \
+ @sim_fpu@ \
psim.o \
$(PACKAGE_OBJ) \
$(HW_OBJ) \
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(RANLIB) $(TARGETLIB)
-psim.o: psim.c psim.h tree.h $(CPU_H) $(IDECODE_H)
+psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
bits.o: bits.c $(BASICS_H)
-debug.o: debug.c $(BASICS_H)
-filter_filename.o: filter_filename.c filter_filename.h config.h ppc-config.h
+debug.o: debug.c $(CONFIG_H) $(BASICS_H)
+filter_filename.o: filter_filename.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
-sim-endian.o: sim-endian.c sim-endian-n.h $(BASICS_H)
+sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
-os_emul.o: os_emul.c emul_netbsd.h emul_unix.h emul_chirp.h emul_bugapi.h $(EMUL_GENERIC_H)
+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)
emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
-emul_bugapi.o: emul_bugapi.c emul_bugapi.h $(EMUL_GENERIC_H)
-emul_chirp.o: emul_chirp.c emul_chirp.h $(EMUL_GENERIC_H)
-emul_netbsd.o: emul_netbsd.c emul_netbsd.h $(EMUL_GENERIC_H)
-emul_unix.o: emul_unix.c emul_unix.h $(EMUL_GENERIC_H)
+emul_bugapi.o: emul_bugapi.c $(EMUL_GENERIC_H) $(EMUL_BUGAPI_H)
+emul_chirp.o: emul_chirp.c $(EMUL_GENERIC_H) $(EMUL_CHIRP_H)
+emul_netbsd.o: emul_netbsd.c $(EMUL_GENERIC_H) $(EMUL_NETBSD_H)
+emul_unix.o: emul_unix.c $(EMUL_GENERIC_H) $(EMUL_UNIX_H)
-registers.o: registers.c $(REGISTERS_H) $(BASICS_H)
+registers.o: registers.c $(BASICS_H) $(REGISTERS_H)
cpu.o: cpu.c $(CPU_H) $(IDECODE_H)
-interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) os_emul.h
+interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H)
# Given that inlines are turned on now, rebuild idecode whenever
# anything changes.
-idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h $(LIB_INLINE_SRC) $(BUILT_SRC)
- $(CC) -c $(NOWARN_CFLAGS) $<
+idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC)
# double.o: double.c dp-bit.c
-vm.o: vm.c vm.h vm_n.h $(CPU_H)
+vm.o: vm.c $(BASICS_H) $(REGISTERS_H) $(DEVICE_H) $(COREFILE_H) $(VM_H) $(INTERRUPTS_H) $(MON_H) $(CPU_H) $(VM_N_H)
-corefile.o: corefile.c corefile.h corefile-n.h $(BASICS_H) $(DEVICE_TABLE_H)
+corefile.o: corefile.c $(BASICS_H) $(DEVICE_TABLE_H) $(COREFILE_H) $(COREFILE_N_H)
-model.o: model.c $(CPU_H)
+model.o: model.c $(CPU_H) $(MON_H)
-events.o: events.c events.h $(BASICS_H)
+events.o: events.c $(BASICS_H) $(EVENTS_H)
-sim_calls.o: sim_calls.c $(PSIM_H) itable.h ../../gdb/tm.h options.h
+sim_calls.o: sim_calls.c $(PSIM_H) $(OPTIONS_H) $(DEFS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
-spreg.o: spreg.c spreg.h spreg.c $(BASICS_H)
+spreg.o: spreg.c $(BASICS_H) $(SPREG_H)
-main.o: main.c $(PSIM_H) itable.h options.h
+main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
-device.o: device.c $(DEVICE_TABLE_H) cap.h
+device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H)
-tree.o: tree.c tree.h device.h $(DEVICE_TABLE_H)
+tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H)
-device_table.o: device_table.c $(DEVICE_TABLE_H) events.h hw.c
+device_table.o: device_table.c $(DEVICE_TABLE_H) hw.c
-cap.o: cap.c cap.h $(BASICS_H)
+cap.o: cap.c $(CAP_H)
-semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
- $(CC) -c $(NOWARN_CFLAGS) $<
+semantics.o: semantics.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
-icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
- $(CC) -c $(NOWARN_CFLAGS) $<
+icache.o: icache.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(ICACHE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
-support.o: support.c support.h $(IDECODE_H) $(CPU_H)
+support.o: support.c $(CPU_H) $(IDECODE_H) $(COMMON_SIM_INLINE_H) $(COMMON_SIM_FPU_H) $(SUPPORT_H)
-itable.o: itable.c itable.h
+itable.o: itable.c $(ITABLE_H)
-mon.o: mon.c $(CPU_H)
+mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
# GDB after 4.16 expects the default_callback structure to be setup.
# As a kludge, build the common stuff here for now.
targ-vals.def: $(srcdir)/../common/nltvals.def
rm -f targ-vals.def tmp-def
cat $(srcdir)/../common/nltvals.def > tmp-vals.def
- $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def
+ $(SHELL) $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def
targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change
rm -f tmp-vals.h
./gentmap -h > tmp-vals.h
- $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h
targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change
rm -f tmp-map.c
./gentmap -c > tmp-map.c
- $(srcdir)/../../move-if-change tmp-map.c targ-map.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-map.c targ-map.c
-callback.o: ../common/callback.c targ-vals.h config.h
+callback.o: ../common/callback.c $(TARG_VALS_H) $(CONFIG_H)
$(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
-targ-map.o: targ-map.c targ-vals.h
+targ-map.o: targ-map.c $(ANSIDECL_H) $(GDB_CALLBACK_H) $(TARG_VALS_H)
+
+sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) $(TCONFIG_H)
+ $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
+
+tconfig.h:
+ rm -f tconfig.h
+ echo > tconfig.h
# Rebuild options whenever something changes so the date/time is up to date.
-options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h
+options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
$(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
tmp-defines: config.h Makefile
sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
- $(srcdir)/../../move-if-change tmp-defines.h defines.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-defines.h defines.h
touch tmp-defines
#
-r $(srcdir)/ppc-spr-table \
-n spreg.h -hp tmp-spreg.h \
-n spreg.c -p tmp-spreg.c
- $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
- $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-spreg.h spreg.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
touch tmp-dgen
-
-tmp-igen: igen ppc-instructions $(IGEN_OPCODE_RULES) ppc-cache-rules $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
+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
./igen $(IGEN_FLAGS) \
-o $(srcdir)/$(IGEN_OPCODE_RULES) \
- -k $(srcdir)/ppc-cache-rules \
- -i $(srcdir)/ppc-instructions \
+ -I $(srcdir) -i $(srcdir)/ppc-instructions \
-n icache.h -hc tmp-icache.h \
-n icache.c -c tmp-icache.c \
-n semantics.h -hs tmp-semantics.h \
-n model.c -m tmp-model.c \
-n support.h -hf tmp-support.h \
-n support.c -f tmp-support.c
- $(srcdir)/../../move-if-change tmp-icache.h icache.h
- $(srcdir)/../../move-if-change tmp-icache.c icache.c
- $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
- $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
- $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
- $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
- $(srcdir)/../../move-if-change tmp-itable.h itable.h
- $(srcdir)/../../move-if-change tmp-itable.c itable.c
- $(srcdir)/../../move-if-change tmp-model.h model.h
- $(srcdir)/../../move-if-change tmp-model.c model.c
- $(srcdir)/../../move-if-change tmp-support.h support.h
- $(srcdir)/../../move-if-change tmp-support.c support.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h icache.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c icache.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-itable.h itable.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-itable.c itable.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-model.h model.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-model.c model.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-support.h support.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-support.c support.c
touch tmp-igen
# NOTE: Some versions of make don't handle files created as side-effects
filter_host.c: filter_filename.c
cat $(srcdir)/filter_filename.c > filter_host.c
-filter_host.o: filter_host.c filter_filename.h config.h ppc-config.h
+filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
-table.o: table.c misc.h filter_filename.h lf.h table.h
+table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
-lf.o: lf.c misc.h filter_filename.h lf.h
+lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
-filter.o: filter.c misc.h lf.h table.h filter.h
+filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
-tmp-filter: filter.c misc.h misc.o
+tmp-filter: filter.c $(MISC_H) misc.o
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
-ld-decode.o: ld-decode.c misc.h lf.h table.h ld-decode.h
+ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
tmp-ld-decode: ld-decode.o misc.o lf.o table.o filter_host.o
$(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)
-ld-cache.o: ld-cache.c misc.h lf.h table.h ld-cache.h
+ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
$(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)
-ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
+ $(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)
-gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
-gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
-gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
-gen-semantics.o: gen-semantics.c misc.h lf.h table.h gen-semantics.h ld-decode.h igen.h ld-insn.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
-gen-idecode.o: gen-idecode.c misc.h lf.h table.h gen-idecode.h gen-icache.h gen-semantics.h ld-decode.h igen.h ld-insn.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
-gen-support.o: gen-support.c misc.h lf.h table.h gen-support.h ld-decode.h igen.h ld-insn.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
-dgen.o: dgen.c misc.h filter_filename.h lf.h table.h
+dgen.o: dgen.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
-igen.o: igen.c misc.h filter_filename.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-semantics.h gen-support.h igen.h
+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)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
-misc.o: misc.c misc.h filter_filename.h
+misc.o: misc.c $(CONFIG_H) $(MISC_H)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
-e 's/^/ /' \
-e 's/$$/_device_descriptor,/' \
> tmp-hw.c
- $(srcdir)/../../move-if-change tmp-hw.h hw.h
- $(srcdir)/../../move-if-change tmp-hw.c hw.c
+ $(SHELL) $(srcdir)/../../move-if-change tmp-hw.h hw.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-hw.c hw.c
touch tmp-hw
-hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H)
-hw_core.o: hw_core.c $(DEVICE_TABLE_H)
-hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) pk.h
+hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H)
+hw_core.o: hw_core.c $(DEVICE_TABLE_H) $(COREFILE_H)
+hw_disk.o: hw_disk.c $(DEVICE_TABLE_H) $(PK_H)
hw_glue.o: hw_glue.c $(DEVICE_TABLE_H)
-hw_htab.o: hw_htab.c $(DEVICE_TABLE_H)
+hw_htab.o: hw_htab.c $(DEVICE_TABLE_H) $(BFD_H)
hw_ide.o: hw_ide.c $(DEVICE_TABLE_H)
-hw_init.o: hw_init.c $(DEVICE_TABLE_H)
+hw_init.o: hw_init.c $(DEVICE_TABLE_H) $(BFD_H) $(PSIM_H)
hw_iobus.o: hw_iobus.c $(DEVICE_TABLE_H)
hw_memory.o: hw_memory.c $(DEVICE_TABLE_H)
hw_nvram.o: hw_nvram.c $(DEVICE_TABLE_H)
hw_opic.o: hw_opic.c $(DEVICE_TABLE_H)
-hw_pal.o: hw_pal.c $(DEVICE_TABLE_H)
-hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) hw_phb.h
-hw_register.o: hw_register.c $(DEVICE_TABLE_H)
+hw_pal.o: hw_pal.c $(DEVICE_TABLE_H) $(CPU_H)
+hw_phb.o: hw_phb.c $(DEVICE_TABLE_H) $(HW_PHB_H) $(COREFILE_H)
+hw_register.o: hw_register.c $(DEVICE_TABLE_H) $(PSIM_H)
hw_trace.o: hw_trace.c $(DEVICE_TABLE_H)
-hw_vm.o: hw_vm.c $(DEVICE_TABLE_H)
+hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H)
# ignore this line, it stops make from getting confused
-e 's/^/extern package_create_instance_callback pk_/' \
-e 's/$$/_create_instance;/' \
> tmp-pk.h
- $(srcdir)/../../move-if-change tmp-pk.h pk.h
+ $(SHELL) $(srcdir)/../../move-if-change tmp-pk.h pk.h
touch tmp-pk
-pk_disklabel.o: pk.h $(DEVICE_TABLE_H)
+pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H)
# ignore this line, it stops make from getting confused
install: installdirs
n=`echo run | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
+ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
installdirs:
- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)