Browse Source

- binutils: rework build

master
vanhofen 3 years ago
parent
commit
90a63b8ff3
  1. 34
      package/binutils/binutils.mk

34
package/binutils/binutils.mk

@ -9,10 +9,11 @@ BINUTILS_DIR = binutils-$(BINUTILS_VERSION)
BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.bz2
BINUTILS_SITE = $(GNU_MIRROR)/binutils
$(DL_DIR)/$(BINUTILS_SOURCE):
$(download) $(BINUTILS_SITE)/$(BINUTILS_SOURCE)
BINUTILS_CONF_OPTS = \
--bindir=$(base_bindir).$(@F) \
--datarootdir=$(REMOVE_datarootdir) \
--libdir=$(REMOVE_libdir) \
--includedir=$(REMOVE_includedir) \
--disable-multilib \
--disable-werror \
--disable-plugins \
@ -22,14 +23,19 @@ BINUTILS_CONF_OPTS = \
BINUTILS_BINARIES = objdump objcopy
binutils: $(DL_DIR)/$(BINUTILS_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(PKG_DIR)
$(UNTAR)/$(PKG_SOURCE)
$(CHDIR)/$(PKG_DIR); \
$(CONFIGURE); \
$(MAKE); \
for bin in $($(PKG)_BINARIES); do \
$(INSTALL_EXEC) $(BUILD_DIR)/$(PKG_DIR)/binutils/$$bin $(TARGET_bindir)/; \
done
$(REMOVE)/$(PKG_DIR)
$(TOUCH)
define BINUTILS_INSTALL_BINARIES
$(foreach binary,$($(PKG)_BINARIES),\
$(INSTALL_EXEC) $(TARGET_base_bindir).$(@F)/$(binary) $(TARGET_bindir)/; \
rm -f $(TARGET_base_bindir).$(@F)/$(binary)$(sep) \
)
$(TARGET_RM) $(TARGET_base_bindir).$(@F)
endef
BINUTILS_TARGET_FINALIZE_HOOKS += BINUTILS_INSTALL_BINARIES
define BINUTILS_TARGET_CLEANUP
$(TARGET_RM) $(TARGET_prefix)/$(TARGET)
endef
BINUTILS_TARGET_FINALIZE_HOOKS += BINUTILS_TARGET_CLEANUP
binutils: | $(TARGET_DIR)
$(call autotools-package)

Loading…
Cancel
Save