diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-11-06 22:25:18 +0700 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-11-11 01:44:16 +0700 |
commit | 430e1e55171a132a21063393f883d060db525b21 (patch) | |
tree | cc93faea7f3bc9e9ae1f9fc8e401da7ed151420e | |
parent | ef3bd6c15e83b6446e8724c0deac8896b6efbb62 (diff) | |
download | gdb-430e1e55171a132a21063393f883d060db525b21.zip gdb-430e1e55171a132a21063393f883d060db525b21.tar.gz gdb-430e1e55171a132a21063393f883d060db525b21.tar.bz2 |
sim: aarch64: move libsim.a creation to top-level
-rw-r--r-- | sim/aarch64/Makefile.in | 8 | ||||
-rw-r--r-- | sim/aarch64/local.mk | 24 | ||||
-rw-r--r-- | sim/common/Make-common.in | 3 | ||||
-rw-r--r-- | sim/common/local.mk | 3 |
4 files changed, 30 insertions, 8 deletions
diff --git a/sim/aarch64/Makefile.in b/sim/aarch64/Makefile.in index 72a3705..e2c5cbc 100644 --- a/sim/aarch64/Makefile.in +++ b/sim/aarch64/Makefile.in @@ -21,13 +21,7 @@ ## COMMON_PRE_CONFIG_FRAG -SIM_OBJS = \ - $(SIM_NEW_COMMON_OBJS) \ - interp.o \ - cpustate.o \ - simulator.o \ - memory.o \ - sim-resume.o \ +SIM_LIBSIM = ## COMMON_POST_CONFIG_FRAG diff --git a/sim/aarch64/local.mk b/sim/aarch64/local.mk index 7e5a537..747ecc7 100644 --- a/sim/aarch64/local.mk +++ b/sim/aarch64/local.mk @@ -16,6 +16,20 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see <http://www.gnu.org/licenses/>. +%C%_libsim_a_SOURCES = +%C%_libsim_a_LIBADD = \ + $(common_libcommon_a_OBJECTS) \ + $(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \ + $(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \ + %D%/cpustate.o \ + %D%/interp.o \ + %D%/memory.o \ + %D%/modules.o \ + %D%/sim-resume.o \ + %D%/simulator.o + +noinst_LIBRARIES += %D%/libsim.a + %C%_run_SOURCES = %C%_run_LDADD = \ %D%/nrun.o \ @@ -23,3 +37,13 @@ $(SIM_COMMON_LIBS) noinst_PROGRAMS += %D%/run + +SIM_ALL_RECURSIVE_DEPS += %D%/modules.c + +$(%C%_libsim_a_LIBADD): | $(SIM_ALL_RECURSIVE_DEPS) + +%D%/%.o: %D%/%.c | $(SIM_ALL_RECURSIVE_DEPS) + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) + +%D%/%.o: common/%.c | $(SIM_ALL_RECURSIVE_DEPS) + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 52cc3c9..1b32841 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -100,6 +100,7 @@ SIM_EXTRA_CFLAGS = SIM_EXTRA_LIBS = # List of main object files for `run'. SIM_RUN_OBJS = nrun.o +SIM_LIBSIM = libsim.a # Dependency of `clean' to clean any extra files. SIM_EXTRA_CLEAN = # Likewise `distclean' @@ -165,7 +166,7 @@ LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ RUNTESTFLAGS = -all: libsim.a $(SIM_RUN_OBJS) +all: $(SIM_LIBSIM) $(LIB_OBJS) $(SIM_RUN_OBJS) libsim.a: $(LIB_OBJS) $(SILENCE) rm -f libsim.a diff --git a/sim/common/local.mk b/sim/common/local.mk index caffca9..9fdd8d8 100644 --- a/sim/common/local.mk +++ b/sim/common/local.mk @@ -52,6 +52,9 @@ noinst_LIBRARIES += $(SIM_COMMON_LIB) CLEANFILES += \ %D%/version.c %D%/version.c-stamp +%/modules.c: + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) + ## ## For subdirs. ## |