2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE_URL:=@GNU/binutils
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_VERSION:=$(PKG_VERSION)
17 PKG_MD5SUM:=e0f71a7b2ddab0f8612336ac81d9636b
20 PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl
21 PKG_REMOVE_FILES:=libtool.m4
24 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
28 include $(INCLUDE_DIR)/package.mk
30 define Package/binutils
37 define Package/objdump
44 define Package/binutils/description
45 The Binutils package contains a linker, an assembler, and other tools for handling object files
48 TARGET_CFLAGS += $(FPIC)
51 --enable-install-libiberty \
52 --enable-install-libbfd
55 $(call Build/Install/Default)
56 $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
57 target_header_dir=libiberty \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
63 define Build/InstallDev
64 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
67 define Package/objdump/install
68 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/
72 define Package/binutils/install
73 $(INSTALL_DIR) $(1)/usr $(1)/bin
74 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
75 mv $(1)/usr/bin/strings $(1)/bin/strings
76 rm -f $(1)/usr/bin/objdump
79 $(eval $(call BuildPackage,binutils))
80 $(eval $(call BuildPackage,objdump))