binutils: for some reason libiberty was not exported properly, fix that, because...
[openwrt/svn-archive/archive.git] / devel / binutils / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=binutils
10 PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
11 #"))
12 PKG_RELEASE:=1
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/
19
20 PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
21 PATCH_DIR:=$(TOPDIR)/toolchain/binutils/patches/$(PKG_VERSION)
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/binutils
27 SECTION:=devel
28 CATEGORY:=Development
29 TITLE:=binutils
30 DEPENDS:=+objdump
31 endef
32
33 define Package/objdump
34 SECTION:=devel
35 CATEGORY:=Development
36 TITLE:=objdump
37 DEPENDS:=+zlib
38 endef
39
40 define Package/binutils/description
41 The Binutils package contains a linker, an assembler, and other tools for handling object files
42 endef
43
44 define Package/libbfd
45 SECTION:=libs
46 CATEGORY:=Libraries
47 TITLE:=libbfd
48 endef
49
50 define Build/Configure
51 $(call Build/Configure/Default, \
52 --disable-werror \
53 --disable-nls \
54 )
55 endef
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/{lib,include}
59 $(CP) \
60 $(PKG_INSTALL_DIR)/usr/lib/* \
61 $(1)/usr/lib/
62 $(CP) \
63 $(PKG_BUILD_DIR)/include/*.h \
64 $(1)/usr/include/
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/include/* \
67 $(1)/usr/include/
68 endef
69
70 define Build/Compile
71 $(MAKE) -C $(PKG_BUILD_DIR)/bfd/doc/ CFLAGS="-I$(PKG_BUILD_DIR)/include" chew
72 $(call Build/Compile/Default)
73 endef
74
75 define Package/objdump/install
76 $(INSTALL_DIR) $(1)/usr/bin
77 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux/bin/objdump $(1)/usr/bin/
78 endef
79
80 define Package/binutils/install
81 $(INSTALL_DIR) $(1)/usr
82 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
83 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux $(1)/usr
84 rm -f $(1)/usr/bin/objdump
85 endef
86
87 define Package/libbdf/install
88 true
89 endef
90
91 $(eval $(call BuildPackage,binutils))
92 $(eval $(call BuildPackage,objdump))
93 $(eval $(call BuildPackage,libbfd))