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
37 define Package/libopcodes
44 define Package/binutils
51 define Package/objdump
62 DEPENDS:=+zlib +libbfd
65 define Package/binutils/description
66 The Binutils package contains a linker, an assembler, and other tools for handling object files
69 TARGET_CFLAGS += $(FPIC) -Wno-unused-value
73 --enable-install-libiberty \
74 --enable-install-libbfd
77 $(call Build/Install/Default)
78 $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
79 target_header_dir=libiberty \
80 DESTDIR="$(PKG_INSTALL_DIR)" \
85 define Build/InstallDev
86 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
89 define Package/libbfd/install
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/
94 define Package/libopcodes/install
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/
99 define Package/objdump/install
100 $(INSTALL_DIR) $(1)/usr/bin
101 $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/
104 define Package/ar/install
105 $(INSTALL_DIR) $(1)/usr/bin
106 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ar $(1)/usr/bin/
109 define Package/binutils/install
110 $(INSTALL_DIR) $(1)/usr $(1)/bin
111 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
112 mv $(1)/usr/bin/strings $(1)/bin/strings
113 rm -f $(1)/usr/bin/objdump
114 rm -f $(1)/usr/bin/ar
117 $(eval $(call BuildPackage,libbfd))
118 $(eval $(call BuildPackage,libopcodes))
119 $(eval $(call BuildPackage,binutils))
120 $(eval $(call BuildPackage,objdump))
121 $(eval $(call BuildPackage,ar))