binutils: the shared variant of libbfd/libopcodes is being generated and used again...
[openwrt/svn-archive/archive.git] / devel / binutils / Makefile
index 9491d7f3d78ca51b06b8c718c8e902f866794ae5..8d0c7288d76c8e03701dbd3c176e1a12748f1cf8 100644 (file)
@@ -10,13 +10,25 @@ PKG_NAME:=binutils
 PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
 #"))
 PKG_RELEASE:=2
+
 PKG_SOURCE_URL:=@GNU/binutils
 PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=
+
 PATCH_DIR:=$(TOPDIR)/toolchain/binutils/patches/$(PKG_VERSION)
+
+PKG_FIXUP:=libtool
+PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+define Package/libbfd
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=libbfd
+endef
+
 define Package/binutils
   SECTION:=devel
   CATEGORY:=Development
@@ -28,7 +40,7 @@ define Package/objdump
   SECTION:=devel
   CATEGORY:=Development
   TITLE:=objdump
-  DEPENDS:=+zlib
+  DEPENDS:=+zlib +libbfd
 endef
 
 define Package/binutils/description
@@ -42,6 +54,18 @@ define Build/Configure
                --disable-werror \
                --disable-nls \
        )
+       $(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
 endef
 
 define Build/InstallDev
@@ -63,6 +87,14 @@ define Build/Compile
        $(call Build/Compile/Default)
 endef
 
+define Package/libbfd/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libopcodes-$(PKG_VERSION).so \
+               $(PKG_INSTALL_DIR)/usr/lib/libbfd-$(PKG_VERSION).so \
+               $(1)/usr/lib/
+endef
+
 define Package/objdump/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/*-linux/bin/objdump $(1)/usr/bin/
@@ -75,5 +107,6 @@ define Package/binutils/install
        rm -f $(1)/usr/bin/objdump
 endef
 
+$(eval $(call BuildPackage,libbfd))
 $(eval $(call BuildPackage,binutils))
 $(eval $(call BuildPackage,objdump))