2009-01-13 21:53:14 +00:00
|
|
|
#
|
2009-06-30 05:51:44 +00:00
|
|
|
# Copyright (C) 2006-2009 OpenWrt.org
|
2007-10-07 00:49:11 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=binutils
|
|
|
|
PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
|
|
|
|
#"))
|
2009-06-30 05:51:44 +00:00
|
|
|
PKG_RELEASE:=2
|
2009-06-13 17:01:55 +00:00
|
|
|
PKG_SOURCE_URL:=@GNU/binutils
|
2007-10-07 00:49:11 +00:00
|
|
|
PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
|
|
|
|
PATCH_DIR:=$(TOPDIR)/toolchain/binutils/patches/$(PKG_VERSION)
|
2010-02-19 00:14:01 +00:00
|
|
|
|
|
|
|
PKG_FIXUP:=libtool
|
|
|
|
PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld
|
2009-01-13 21:53:14 +00:00
|
|
|
PKG_INSTALL:=1
|
2007-10-07 00:49:11 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/binutils
|
2008-06-09 21:29:40 +00:00
|
|
|
SECTION:=devel
|
|
|
|
CATEGORY:=Development
|
2007-10-07 00:49:11 +00:00
|
|
|
TITLE:=binutils
|
2009-04-07 00:30:46 +00:00
|
|
|
DEPENDS:=+objdump
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/objdump
|
|
|
|
SECTION:=devel
|
|
|
|
CATEGORY:=Development
|
|
|
|
TITLE:=objdump
|
|
|
|
DEPENDS:=+zlib
|
2007-10-07 00:49:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/binutils/description
|
|
|
|
The Binutils package contains a linker, an assembler, and other tools for handling object files
|
|
|
|
endef
|
|
|
|
|
2009-06-18 13:42:43 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
2007-10-07 00:49:11 +00:00
|
|
|
define Build/Configure
|
2009-01-13 21:53:14 +00:00
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--disable-werror \
|
|
|
|
--disable-nls \
|
|
|
|
)
|
2010-02-19 00:14:01 +00:00
|
|
|
$(call Build/Compile/Default, \
|
|
|
|
configure-bfd \
|
|
|
|
configure-binutils \
|
|
|
|
configure-etc \
|
|
|
|
configure-gas \
|
|
|
|
configure-gprof \
|
|
|
|
configure-intl \
|
|
|
|
configure-ld \
|
|
|
|
configure-libiberty \
|
|
|
|
configure-opcodes \
|
|
|
|
)
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/bfd/po Makefile
|
2009-01-13 21:53:14 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/{lib,include}
|
2009-05-23 00:01:44 +00:00
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/* \
|
2009-01-13 21:53:14 +00:00
|
|
|
$(1)/usr/lib/
|
2009-05-23 00:01:44 +00:00
|
|
|
$(CP) \
|
|
|
|
$(PKG_BUILD_DIR)/include/*.h \
|
|
|
|
$(1)/usr/include/
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/include/* \
|
2009-01-13 21:53:14 +00:00
|
|
|
$(1)/usr/include/
|
2009-09-02 22:39:31 +00:00
|
|
|
rm -f $(1)/usr/include/gdbm.h
|
2007-10-07 00:49:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2009-05-23 00:01:44 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/bfd/doc/ CFLAGS="-I$(PKG_BUILD_DIR)/include" chew
|
2009-01-13 21:53:14 +00:00
|
|
|
$(call Build/Compile/Default)
|
2007-10-07 00:49:11 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-07 00:30:46 +00:00
|
|
|
define Package/objdump/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/*-linux/bin/objdump $(1)/usr/bin/
|
|
|
|
endef
|
|
|
|
|
2007-10-07 00:49:11 +00:00
|
|
|
define Package/binutils/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr
|
2007-12-10 14:09:11 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
|
2007-10-07 00:49:11 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/*-linux $(1)/usr
|
2009-04-07 00:30:46 +00:00
|
|
|
rm -f $(1)/usr/bin/objdump
|
2007-10-07 00:49:11 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,binutils))
|
2009-04-07 00:30:46 +00:00
|
|
|
$(eval $(call BuildPackage,objdump))
|