2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
10 PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
13 PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
14 ftp://gatekeeper.dec.com/pub/GNU/ \
15 ftp://ftp.uu.net/archive/systems/gnu/ \
16 ftp://ftp.eu.uu.net/pub/gnu/ \
17 ftp://ftp.funet.fi/pub/gnu/prep/ \
18 ftp://ftp.leo.org/pub/comp/os/unix/gnu/
20 PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
21 PATCH_DIR:=$(TOPDIR)/toolchain/binutils/patches/$(PKG_VERSION)
23 include $(INCLUDE_DIR)/package.mk
25 CONFIGURE_ARGS_XTRA+=--disable-werror \
28 define Package/binutils
35 define Package/binutils/description
36 The Binutils package contains a linker, an assembler, and other tools for handling object files
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR)/; \
41 $(TARGET_CONFIGURE_OPTS) \
44 $(CONFIGURE_ARGS_XTRA) \
50 make -C $(PKG_BUILD_DIR)/bfd/doc/ CFLAGS="-I$(PKG_BUILD_DIR)/include" chew
51 $(MAKE) -C $(PKG_BUILD_DIR) all
52 $(MAKE) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
55 define Package/binutils/install
56 $(INSTALL_DIR) $(1)/usr
57 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
58 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux $(1)/usr
61 $(eval $(call BuildPackage,binutils))