From aa0fca163e1736e158fd3922cbbc31b85c9c7df7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 May 2021 17:16:23 -0400 Subject: sim: add support for build-time ar & ranlib This is needed when building for a target whose ar & ranlib are incompatible with the current build system. For example, building for Windows on a Linux system. Then manually import the automake rule for libigen.a, but tweak the tool variables to use the FOR_BUILD variants. --- sim/igen/local.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sim/igen/local.mk') diff --git a/sim/igen/local.mk b/sim/igen/local.mk index 10f0f6d..f224572 100644 --- a/sim/igen/local.mk +++ b/sim/igen/local.mk @@ -48,6 +48,12 @@ noinst_LIBRARIES += %D%/libigen.a %C%_igen_SOURCES = %D%/igen.c %C%_igen_LDADD = %D%/libigen.a +# These rules are copied from automake, but tweaked to use FOR_BUILD variables. +igen/libigen.a: $(igen_libigen_a_OBJECTS) $(igen_libigen_a_DEPENDENCIES) $(EXTRA_igen_libigen_a_DEPENDENCIES) igen/$(am__dirstamp) + $(AM_V_at)-rm -f $@ + $(AM_V_AR)$(AR_FOR_BUILD) $(ARFLAGS) $@ $(igen_libigen_a_OBJECTS) $(igen_libigen_a_LIBADD) + $(AM_V_at)$(RANLIB_FOR_BUILD) $@ + %D%/igen$(EXEEXT): $(%C%_igen_OBJECTS) $(%C%_igen_DEPENDENCIES) %D%/$(am__dirstamp) $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_igen_OBJECTS) $(%C%_igen_LDADD) -- cgit v1.1