From a59e7ea346729ee04a8adbcd148c64d1eb6962bc Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 12 Dec 2020 00:47:24 +0100 Subject: [PATCH] - better way to install static libs --- make/bootstrap.mk | 3 +-- make/helpers.mk | 5 ++--- make/target-libs-static.mk | 6 ++++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/make/bootstrap.mk b/make/bootstrap.mk index f73ba383..5c3a459c 100644 --- a/make/bootstrap.mk +++ b/make/bootstrap.mk @@ -14,8 +14,8 @@ BOOTSTRAP += $(UPDATE_DIR) BOOTSTRAP += host-tools # target related -BOOTSTRAP += libs-static BOOTSTRAP += target-dir +BOOTSTRAP += libs-static BOOTSTRAP += libs-cross ifeq ($(BOXTYPE), $(filter $(BOXTYPE), coolstream)) @@ -35,7 +35,6 @@ bootstrap: $(BOOTSTRAP) skeleton: | $(TARGET_DIR) $(INSTALL_COPY) --remove-destination $(SKEL-ROOT)/. $(TARGET_DIR)/ $(SED) 's|%(BOOT_PARTITION)|$(BOOT_PARTITION)|' $(TARGET_sysconfdir)/mdev.conf - $(INSTALL_COPY) $(STATIC_DIR)/. $(TARGET_DIR)/ # ----------------------------------------------------------------------------- diff --git a/make/helpers.mk b/make/helpers.mk index dce3e072..58909328 100644 --- a/make/helpers.mk +++ b/make/helpers.mk @@ -51,12 +51,11 @@ REWRITE_LIBTOOL_RULES = $(SED) "s,^libdir=.*,libdir='$(TARGET_libdir)',; \ s,\(^dependency_libs='\| \|-L\|^dependency_libs='\)/lib,\ $(TARGET_libdir),g" REWRITE_LIBTOOL = $(REWRITE_LIBTOOL_RULES) $(TARGET_libdir) -REWRITE_LIBTOOL_STATIC = $(REWRITE_LIBTOOL_RULES) $(STATIC_libdir) REWRITE_LIBTOOL_TAG = rewritten=1 define rewrite_libtool - cd $(TARGET_libdir); \ + @cd $(TARGET_libdir); \ LA=$$(find . -name "*.la" -type f); \ for la in $${LA}; do \ if ! grep -q "$(REWRITE_LIBTOOL_TAG)" $${la}; then \ @@ -84,7 +83,7 @@ REWRITE_PKGCONF = $(REWRITE_CONFIG_RULES) $(PKG_CONFIG_PATH) REWRITE_CONFIG_TAG = rewritten=1 define rewrite_pkgconf - cd $(PKG_CONFIG_PATH); \ + @cd $(PKG_CONFIG_PATH); \ PC=$$(find . -name "*.pc" -type f); \ for pc in $${PC}; do \ if ! grep -q "$(REWRITE_CONFIG_TAG)" $${pc}; then \ diff --git a/make/target-libs-static.mk b/make/target-libs-static.mk index a0755187..8d4bf30f 100644 --- a/make/target-libs-static.mk +++ b/make/target-libs-static.mk @@ -8,7 +8,10 @@ ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2 hd5x hd6x vusolo4k vuduo4k vuduo4 LIBS-STATIC += cortex-strings endif -libs-static: $(LIBS-STATIC) +libs-static: $(LIBS-STATIC) | $(TARGET_DIR) + $(INSTALL_COPY) $(STATIC_DIR)/. $(TARGET_DIR)/ + $(REWRITE_LIBTOOL_LA) + $(REWRITE_PKGCONF_PC) # ----------------------------------------------------------------------------- @@ -41,7 +44,6 @@ $(STATIC_libdir)/libcortex-strings.la: $(DL_DIR)/$(CORTEX-STRINGS_SOURCE) | $(ST ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(STATIC_DIR) - $(REWRITE_LIBTOOL_STATIC)/libcortex-strings.la $(REMOVE)/$(CORTEX-STRINGS_DIR) # -----------------------------------------------------------------------------