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/lm32/Makefile.in | 6 ++---- sim/lm32/local.mk | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'sim/lm32') diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in index 5d78e36..ea6601f 100644 --- a/sim/lm32/Makefile.in +++ b/sim/lm32/Makefile.in @@ -3,6 +3,8 @@ ## COMMON_PRE_CONFIG_FRAG +arch = lm32 + # List of object files, less common parts. SIM_OBJS = \ $(SIM_NEW_COMMON_OBJS) \ @@ -12,14 +14,10 @@ SIM_OBJS = \ cpu.o decode.o sem.o model.o mloop.o \ lm32.o traps.o user.o -SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart - SIM_EXTRA_CLEAN = lm32-clean ## COMMON_POST_CONFIG_FRAG -arch = lm32 - lm32-clean: rm -f stamp-arch stamp-cpu rm -f tmp-* diff --git a/sim/lm32/local.mk b/sim/lm32/local.mk index 7add85a..437ec09 100644 --- a/sim/lm32/local.mk +++ b/sim/lm32/local.mk @@ -24,6 +24,9 @@ noinst_PROGRAMS += %D%/run +%C%_SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart +AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)" + %C%_BUILD_OUTPUTS = \ %D%/eng.h \ %D%/mloop.c \ -- cgit v1.1