summaryrefslogtreecommitdiff
path: root/sim/mn10300
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-06 21:40:56 +0700
committerMike Frysinger <vapier@gentoo.org>2022-12-21 22:21:25 -0500
commit3d0421178673d74a790637e31fed944bf48aa3aa (patch)
tree39439636af47f282ad5ce4f71414ba369ab5e44b /sim/mn10300
parentd47ea1b9c1fb6d57271697f186f7141ef4aa41c4 (diff)
downloadbinutils-gdb-3d0421178673d74a790637e31fed944bf48aa3aa.tar.gz
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.
Diffstat (limited to 'sim/mn10300')
-rw-r--r--sim/mn10300/Makefile.in4
-rw-r--r--sim/mn10300/local.mk3
2 files changed, 5 insertions, 2 deletions
diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in
index 521f86c644b..0b3ebd5b74e 100644
--- a/sim/mn10300/Makefile.in
+++ b/sim/mn10300/Makefile.in
@@ -17,6 +17,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = mn10300
+
MN10300_OBJS = \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
$(SIM_NEW_COMMON_OBJS) \
@@ -25,8 +27,6 @@ MN10300_OBJS = \
SIM_OBJS = $(MN10300_OBJS) interp.o
-SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
-
# List of extra flags to always pass to $(CC).
SIM_EXTRA_CFLAGS = \
-DPOLL_QUIT_INTERVAL=0x20 \
diff --git a/sim/mn10300/local.mk b/sim/mn10300/local.mk
index 08a3d4dedc4..70b442fe1a0 100644
--- a/sim/mn10300/local.mk
+++ b/sim/mn10300/local.mk
@@ -24,6 +24,9 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
%C%_BUILT_SRC_FROM_IGEN = \
%D%/icache.h \
%D%/icache.c \