+gentmap: Makefile $(srccom)/gentmap.c targ-vals.def
+ $(CC_FOR_BUILD) $(srccom)/gentmap.c -o gentmap $(BUILD_CFLAGS) $(NL_TARGET)
+
+targ-vals.h targ-map.c: stamp-tvals
+stamp-tvals: gentmap
+ rm -f tmp-tvals.h tmp-tmap.c
+ ./gentmap -h >tmp-tvals.h
+ $(SHELL) $(srcroot)/move-if-change tmp-tvals.h targ-vals.h
+ ./gentmap -c >tmp-tmap.c
+ $(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c
+ touch stamp-tvals
+
+#
+# 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 \
+ $(srccom)/sim-arange.c
+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 \
+ ../common/cconfig.h \
+ tconfig.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) \
+
+# FIXME: If this complicated way of building .o files from ../common is
+# necessary, the reason should be documented here.
+
+BUILT_SRC_FROM_COMMON= \
+ sim-inline.c
+
+sim-abort.o: $(srccom)/sim-abort.c \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-abort.c $(ALL_CFLAGS)
+
+sim-arange.o: $(srccom)/sim-arange.c $(sim-arange_h) $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-arange.c $(ALL_CFLAGS)
+
+sim-bits.o: $(srccom)/sim-bits.c $(sim-bits_h) $(sim-n-bits_h) \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-bits.c $(ALL_CFLAGS)
+
+sim-config.o: $(srccom)/sim-config.c $(sim-config_h) sim-main.h \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-config.c $(ALL_CFLAGS)
+
+sim-core.o: $(srccom)/sim-core.c $(sim_main_headers) \
+ $(sim-core_h) $(sim-n-core_h)
+ $(CC) -c $(srccom)/sim-core.c $(ALL_CFLAGS)
+
+sim-cpu.o: $(srccom)/sim-cpu.c $(sim_main_headers)
+ $(CC) -c $(srccom)/sim-cpu.c $(ALL_CFLAGS)
+
+sim-endian.o: $(srccom)/sim-endian.c $(sim-endian_h) $(sim-n-endian_h)
+ $(CC) -c $(srccom)/sim-endian.c $(ALL_CFLAGS)
+
+sim-engine.o: $(srccom)/sim-engine.c $(sim_main_headers) $(sim-engine_h)
+ $(CC) -c $(srccom)/sim-engine.c $(ALL_CFLAGS)
+
+sim-events.o: $(srccom)/sim-events.c $(sim-events_h) sim-main.h \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-events.c $(ALL_CFLAGS)
+
+sim-fpu.o: $(srccom)/sim-fpu.c $(sim-fpu_h) \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS)
+
+sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) $(remote_sim_h) \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-hload.c $(ALL_CFLAGS)
+
+sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) $(remote_sim_h) \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-hrw.c $(ALL_CFLAGS)
+
+sim-hw.o: $(srccom)/sim-hw.c $(sim_main_headers)
+ $(CC) -c $(srccom)/sim-hw.c $(ALL_CFLAGS)
+
+sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) $(remote_sim_h) \
+ $(SIM_EXTRA_DEPS)
+ $(CC) -c $(srccom)/sim-info.c $(ALL_CFLAGS)
+
+sim-inline.c: $(srccom)/sim-inline.c
+ rm -f $@ tmp-$@
+ echo "# 1 \"$(srccom)/$@\"" > tmp-$@
+ cat $(srccom)/$@ >> tmp-$@
+ $(SHELL) $(srcdir)/../../move-if-change tmp-$@ $@
+
+sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) $(remote_sim_h) \
+ targ-vals.h
+ $(CC) -c $(srccom)/sim-io.c $(ALL_CFLAGS)
+
+sim-memopt.o: $(srccom)/sim-memopt.c $(sim_main_headers) \
+ $(sim-io_h)
+ $(CC) -c $(srccom)/sim-memopt.c $(ALL_CFLAGS)
+
+sim-module.o: $(srccom)/sim-module.c $(sim_main_headers) \
+ $(sim-io_h)
+ $(CC) -c $(srccom)/sim-module.c $(ALL_CFLAGS)
+
+sim-options.o: $(srccom)/sim-options.c $(sim_main_headers) \
+ $(sim-options_h) $(sim-io_h)
+ $(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS)
+
+sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) $(remote_sim_h)
+ $(CC) -c $(srccom)/sim-reason.c $(ALL_CFLAGS)
+
+sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) $(remote_sim_h)
+ $(CC) -c $(srccom)/sim-reg.c $(ALL_CFLAGS)
+
+sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) $(remote_sim_h)
+ $(CC) -c $(srccom)/sim-resume.c $(ALL_CFLAGS)
+
+sim-run.o: $(srccom)/sim-run.c $(sim_main_headers)
+ $(CC) -c $(srccom)/sim-run.c $(ALL_CFLAGS)
+
+sim-signal.o: $(srccom)/sim-signal.c $(sim_main_headers) $(sim-signal_h)
+ $(CC) -c $(srccom)/sim-signal.c $(ALL_CFLAGS)
+
+sim-stop.o: $(srccom)/sim-stop.c $(sim_main_headers)
+ $(CC) -c $(srccom)/sim-stop.c $(ALL_CFLAGS)
+
+sim-trace.o: $(srccom)/sim-trace.c $(sim_main_headers) \
+ $(sim-options_h) $(sim-io_h)
+ $(CC) -c $(srccom)/sim-trace.c $(ALL_CFLAGS)
+
+sim-profile.o: $(srccom)/sim-profile.c $(sim_main_headers) \
+ $(sim-options_h) $(sim-io_h)
+ $(CC) -c $(srccom)/sim-profile.c $(ALL_CFLAGS)
+
+sim-model.o: $(srccom)/sim-model.c $(sim_main_headers) \
+ $(sim-io_h)
+ $(CC) -c $(srccom)/sim-model.c $(ALL_CFLAGS)
+
+sim-utils.o: $(srccom)/sim-utils.c $(sim_main_headers)
+ $(CC) -c $(srccom)/sim-utils.c $(ALL_CFLAGS)
+
+sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
+ $(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
+
+sim-load.o: $(srccom)/sim-load.c $(callback_h) $(sim-basics_h) $(remote_sim_h)
+ $(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)