From 3d0421178673d74a790637e31fed944bf48aa3aa Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 Nov 2022 21:40:56 +0700 Subject: sim: build: hoist lists of hw devices up We need these in the top-level to generate libsim.a, but also in the subdirs to generate hw-config.h. Move it to the local.mk, and pass it down when running recursive make. This avoids duplication, and makes it available to both. We can simplify this once we move the various steps up to the top-level too. --- sim/m32r/Makefile.in | 6 ++---- sim/m32r/local.mk | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'sim/m32r') diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in index 6a0e2e5..97afd6e 100644 --- a/sim/m32r/Makefile.in +++ b/sim/m32r/Makefile.in @@ -19,6 +19,8 @@ ## COMMON_PRE_CONFIG_FRAG +arch = m32r + M32R_OBJS = m32r.o cpu.o decode.o sem.o model.o mloop.o M32RX_OBJS = m32rx.o cpux.o decodex.o modelx.o mloopx.o M32R2_OBJS = m32r2.o cpu2.o decode2.o model2.o mloop2.o @@ -33,8 +35,6 @@ SIM_OBJS = \ $(M32R2_OBJS) \ traps.o -SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart - SIM_EXTRA_CLEAN = m32r-clean # Some modules don't build cleanly yet. @@ -42,8 +42,6 @@ cpu.o cpu2.o cpux.o m32r.o m32r2.o m32rx.o mloop.o mloop2.o mloopx.o sem.o sim-i ## COMMON_POST_CONFIG_FRAG -arch = m32r - m32r-clean: rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu rm -f tmp-* diff --git a/sim/m32r/local.mk b/sim/m32r/local.mk index 51d9d34..dff09fb 100644 --- a/sim/m32r/local.mk +++ b/sim/m32r/local.mk @@ -24,6 +24,9 @@ noinst_PROGRAMS += %D%/run +%C%_SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart +AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)" + %C%_BUILD_OUTPUTS = \ %D%/eng.h \ %D%/mloop.c \ -- cgit v1.1