binutils: remove the empty package libbfd and fix all references to it
[openwrt/svn-archive/archive.git] / devel / binutils / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=2
13 PKG_SOURCE_URL:=@GNU/binutils
14 PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
15 PATCH_DIR:=$(TOPDIR)/toolchain/binutils/patches/$(PKG_VERSION)
16 PKG_INSTALL:=1
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/binutils
21 SECTION:=devel
22 CATEGORY:=Development
23 TITLE:=binutils
24 DEPENDS:=+objdump
25 endef
26
27 define Package/objdump
28 SECTION:=devel
29 CATEGORY:=Development
30 TITLE:=objdump
31 DEPENDS:=+zlib
32 endef
33
34 define Package/binutils/description
35 The Binutils package contains a linker, an assembler, and other tools for handling object files
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 define Build/Configure
41 $(call Build/Configure/Default, \
42 --disable-werror \
43 --disable-nls \
44 )
45 endef
46
47 define Build/InstallDev
48 $(INSTALL_DIR) $(1)/usr/{lib,include}
49 $(CP) \
50 $(PKG_INSTALL_DIR)/usr/lib/* \
51 $(1)/usr/lib/
52 $(CP) \
53 $(PKG_BUILD_DIR)/include/*.h \
54 $(1)/usr/include/
55 $(CP) \
56 $(PKG_INSTALL_DIR)/usr/include/* \
57 $(1)/usr/include/
58 endef
59
60 define Build/Compile
61 $(MAKE) -C $(PKG_BUILD_DIR)/bfd/doc/ CFLAGS="-I$(PKG_BUILD_DIR)/include" chew
62 $(call Build/Compile/Default)
63 endef
64
65 define Package/objdump/install
66 $(INSTALL_DIR) $(1)/usr/bin
67 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux/bin/objdump $(1)/usr/bin/
68 endef
69
70 define Package/binutils/install
71 $(INSTALL_DIR) $(1)/usr
72 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
73 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux $(1)/usr
74 rm -f $(1)/usr/bin/objdump
75 endef
76
77 $(eval $(call BuildPackage,binutils))
78 $(eval $(call BuildPackage,objdump))