$(BPF_GEN_OBJS) \
        $(BPF_HAND_OBJS)
 
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h \
-       bpf-sim.h \
-       eng-le.h eng-be.h \
-       $(srcdir)/../../opcodes/bpf-desc.h \
-       $(srcdir)/../../opcodes/bpf-opc.h
-
 SIM_EXTRA_CLEAN = bpf-clean
 
 ## COMMON_POST_CONFIG_FRAG
 
-# BPF headers
-
-BPF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       $(SIM_EXTRA_DEPS) \
-       cpu.h cpuall.h \
-        decode-le.h decode-be.h \
-        defs-le.h defs-be.h \
-        eng-le.h eng-be.h
-
 # Dependencies for binaries from CGEN generated source
 
 mloop-le.o: mloop-le.c
 decode-le.o: decode-le.c
        $(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/decode-le.c
        $(POSTCOMPILE)
-decode-be.o: decode-be.c $(BPF_INCLUDE_DEPS)
+decode-be.o: decode-be.c
        $(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/decode-be.c
        $(POSTCOMPILE)
 
 
        \
        $(SIM_HW_OBJS) \
 
-# cgen-sim.h and the headers it includes
-CGEN_SIM_DEPS = \
-       $(srccom)/cgen-sim.h \
-       $(srccom)/cgen-defs.h \
-       $(srccom)/cgen-scache.h \
-       $(srccom)/cgen-fpu.h \
-       $(srccom)/cgen-par.h \
-       $(srccom)/cgen-cpu.h \
-       $(srccom)/cgen-trace.h \
-       cpuall.h
-
-# Add this to SIM_EXTRA_DEPS.
-CGEN_INCLUDE_DEPS = \
-       $(CGEN_SIM_DEPS) \
-       $(srccom)/cgen-engine.h \
-       $(srccom)/cgen-types.h \
-       $(srcdir)/../../include/opcode/cgen.h
-
 ## End COMMON_PRE_CONFIG_FRAG
 
 ## COMMON_POST_CONFIG_FRAG
 
 RUNTESTFLAGS =
 
-callback_h = $(srcroot)/include/sim/callback.h
-remote_sim_h = $(srcroot)/include/sim/sim.h
-
 all: libsim.a run$(EXEEXT)
 
 libsim.a: $(LIB_OBJS)
          $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \
          $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
 
-#
-# Rules for building sim-* components.  Triggered by listing the corresponding
-# .o file in the list of simulator targets.
-#
-
-sim_main_headers = \
-       sim-main.h \
-       $(sim-assert_h) \
-       $(sim-base_h) \
-       $(sim-cpu_h) \
-       $(sim-engine_h) \
-       $(sim-events_h) \
-       $(sim-memopt_h) \
-       $(sim-model_h) \
-       $(sim-module_h) \
-       $(sim-profile_h) \
-       $(sim-trace_h) \
-       $(sim-watch_h) \
-       $(sim-basics_h) \
-       $(SIM_EXTRA_DEPS)
-
-# Exported version of sim_main_headers.
-SIM_MAIN_DEPS = \
-       $(sim_main_headers)
-
-sim-alu_h = $(srccom)/sim-alu.h
-sim-arange_h = $(srccom)/sim-arange.h
-sim-assert_h = $(srccom)/sim-assert.h
-sim-base_h = $(srccom)/sim-base.h \
-               $(sim-module_h) \
-               $(sim-trace_h) \
-               $(sim-core_h) \
-               $(sim-events_h) \
-               $(sim-profile_h) \
-               $(sim-model_h) \
-               $(sim-io_h) \
-               $(sim-engine_h) \
-               $(sim-watch_h) \
-               $(sim-memopt_h) \
-               $(sim-cpu_h)
-sim-basics_h = $(srccom)/sim-basics.h \
-               $(sim-config_h) \
-               $(callback_h) \
-               $(sim-inline_h) \
-               $(sim-types_h) \
-               $(sim-bits_h) \
-               $(sim-endian_h) \
-               $(sim-signal_h) \
-               $(sim-arange_h) \
-               $(sim-utils_h)
-sim-bits_h = $(srccom)/sim-bits.h \
-               $(srccom)/sim-bits.c
-sim-config_h = $(srccom)/sim-config.h
-sim-core_h = $(srccom)/sim-core.h
-sim-cpu_h = $(srccom)/sim-cpu.h
-sim-endian_h = $(srccom)/sim-endian.h \
-               $(srccom)/sim-endian.c
-sim-engine_h = $(srccom)/sim-engine.h
-sim-events_h = $(srccom)/sim-events.h
-sim-fpu_h = $(srccom)/sim-fpu.h
-sim-hw_h = $(srccom)/sim-hw.h
-sim-inline_h = $(srccom)/sim-inline.h
-sim-io_h = $(srccom)/sim-io.h
-sim-memopt_h = $(srccom)/sim-memopt.h
-sim-model_h = $(srccom)/sim-model.h
-sim-module_h = $(srccom)/sim-module.h
-sim-n-bits_h = $(srccom)/sim-n-bits.h
-sim-n-core_h = $(srccom)/sim-n-core.h
-sim-n-endian_h = $(srccom)/sim-n-endian.h
-sim-options_h = $(srccom)/sim-options.h
-sim-profile_h = $(srccom)/sim-profile.h
-sim-signal_h = $(srccom)/sim-signal.h
-sim-trace_h = $(srccom)/sim-trace.h
-sim-types_h = $(srccom)/sim-types.h
-sim-utils_h = $(srccom)/sim-utils.h
-sim-watch_h = $(srccom)/sim-watch.h
-
-hw-alloc_h = $(srccom)/hw-alloc.h
-hw-base_h = $(srccom)/hw-base.h
-hw-device_h = $(srccom)/hw-device.h
-hw-events_h = $(srccom)/hw-events.h
-hw-handles_h = $(srccom)/hw-handles.h
-hw-instances_h = $(srccom)/hw-instances.h
-hw-ports_h = $(srccom)/hw-ports.h
-hw-properties_h = $(srccom)/hw-properties.h
-hw-tree_h = $(srccom)/hw-tree.h
-
-hw_main_headers = \
-       $(srccom)/hw-main.h \
-       $(hw-alloc_h) \
-       $(hw-base_h) \
-       $(hw-device_h) \
-       $(hw-events_h) \
-       $(hw-instances_h) \
-       $(hw-handles_h) \
-       $(hw-ports_h) \
-       $(hw-properties_h) \
-
 #
 # Dependency tracking.  Most of this is conditional on GNU Make being
 # found by configure; if GNU Make is not found, we fall back to a
        $(SILENCE) rm -f $@.l-tmp $@.tmp
        $(SILENCE) touch $@
 
-# CGEN support.
-
-# For use in Makefile.in for cpu-specific files.
-CGEN_MAIN_CPU_DEPS = \
-       $(SIM_MAIN_DEPS) \
-       $(srccom)/cgen-ops.h \
-       $(srccom)/cgen-mem.h
-
 # Support targets.
 
 install: install-common $(SIM_EXTRA_INSTALL)
 
        table.o \
        simops.o
 
-SIM_EXTRA_DEPS = simops.h
-
 ## COMMON_POST_CONFIG_FRAG
 
 
 SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
 
-# Extra headers included by sim-main.h.
-# FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-       arch.h cpuall.h cris-sim.h engv10.h engv32.h
-
 SIM_EXTRA_CLEAN = cris-clean
 
 ## COMMON_POST_CONFIG_FRAG
        $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
          $(CC) $(ALL_CFLAGS) -o rvdummy$(EXEEXT) rvdummy.o $(EXTRA_LIBS)
 
-rvdummy.o: rvdummy.c $(remote_sim_h) $(callback_h)
-
-# CRISV10 objs
-
-CRISV10F_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpuv10.h decodev10.h engv10.h
-
-# CRISV32 objs
-
-CRISV32F_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpuv32.h decodev32.h engv32.h
-
 cris-clean:
        -rm -f stamp-arch
        -rm -f tmp-* rvdummy$(EXEEXT)
 
        simops.o \
        endian.o
 
-SIM_EXTRA_DEPS = simops.h
-
-INCLUDE = d10v_sim.h $(srcroot)/include/sim/callback.h endian.c \
-       $(srcroot)/include/gdb/sim-d10v.h
-
 ## COMMON_POST_CONFIG_FRAG
 
        profile.o profile-fr400.o profile-fr450.o profile-fr500.o profile-fr550.o options.o \
        reset.o registers.o
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h cpuall.h frv-sim.h $(srcdir)/../../opcodes/frv-desc.h cache.h \
-       registers.h profile.h eng.h \
-       $(sim-options_h)
-
 SIM_EXTRA_CFLAGS = @SIM_FRV_TRAPDUMP_FLAGS@
 
 SIM_EXTRA_CLEAN = frv-clean
 
 arch = frv
 
-# FRV objs
-
-FRVBF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       $(SIM_EXTRA_DEPS) \
-       cpu.h decode.h eng.h
-
 frv-clean:
        rm -f tmp-*
        rm -f stamp-arch stamp-cpu
 
        sim-if.o arch.o \
        $(IQ2000_OBJS)
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h cpuall.h $(srcdir)/../../opcodes/iq2000-desc.h eng.h
-
 ALL_CPU_CFLAGS = -DHAVE_CPU_IQ2000BF -DHAVE_CPU_IQ10BF
 
 SIM_EXTRA_CLEAN = iq2000-clean
 
 # IQ2000 objs
 
-IQ2000BF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpu.h decode.h eng.h
-
 iq2000-clean:
        rm -f tmp-*
        rm -f stamp-arch stamp-cpu
 
 
 SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart
 
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
-       eng.h
-
 SIM_EXTRA_CLEAN = lm32-clean
 
 ## COMMON_POST_CONFIG_FRAG
 
 arch = lm32 
 
-LM32BF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpu.h decode.h eng.h
-
 lm32-clean:
        rm -f stamp-arch stamp-cpu 
        rm -f tmp-*
 
 
 SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h cpuall.h m32r-sim.h $(srcdir)/../../opcodes/m32r-desc.h \
-       eng.h engx.h eng2.h
-
 SIM_EXTRA_CLEAN = m32r-clean
 
 # Some modules don't build cleanly yet.
 
 
 SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
 
-# Extra dependencies for "sim-main.h"
-SIM_EXTRA_DEPS = mn10300_sim.h itable.h idecode.h
-
 # List of extra flags to always pass to $(CC).
 SIM_EXTRA_CFLAGS = -DPOLL_QUIT_INTERVAL=0x20
 
 
 
 SIM_OBJS += $(OR1K_OBJS)
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       or1k-sim.h \
-       $(srcdir)/../../opcodes/or1k-desc.h \
-       arch.h \
-       cpuall.h \
-       decode.h
-
 ## COMMON_POST_CONFIG_FRAG
 
 arch = or1k
 
-# or1k32bf
-
-OR1K32BF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpu.h \
-       decode.h \
-       eng.h
-
-or1k.o: or1k.c $(OR1K32BF_INCLUDE_DEPS)
+or1k.o: or1k.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h eng.h
+sim-if.o: sim-if.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-traps.o: traps.c $(SIM_MAIN_DEPS) eng.h
+traps.o: traps.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
 
        interp.o \
        $(SIM_NEW_COMMON_OBJS) \
        table.o
-SIM_EXTRA_DEPS = table.c code.c ppi.c
 
 ## COMMON_POST_CONFIG_FRAG
 
        itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
        sim-resume.o
 
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = v850_sim.h sim-main.h
-
 ## COMMON_POST_CONFIG_FRAG