nuke $Id$ in /packages as well
[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 $(INSTALL_DATA) \
60 $(PKG_INSTALL_DIR)/usr/lib/libbfd.a \
61 $(1)/usr/lib/
62 $(INSTALL_DATA) \
63 $(PKG_INSTALL_DIR)/usr/include/{symcat,ansidecl,bfd,bfdlink}.h \
64 $(1)/usr/include/
65 endef
66
67 define Build/Compile
68 make -C $(PKG_BUILD_DIR)/bfd/doc/ CFLAGS="-I$(PKG_BUILD_DIR)/include" chew
69 $(call Build/Compile/Default)
70 endef
71
72 define Package/objdump/install
73 $(INSTALL_DIR) $(1)/usr/bin
74 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux/bin/objdump $(1)/usr/bin/
75 endef
76
77 define Package/binutils/install
78 $(INSTALL_DIR) $(1)/usr
79 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
80 $(CP) $(PKG_INSTALL_DIR)/usr/*-linux $(1)/usr
81 rm -f $(1)/usr/bin/objdump
82 endef
83
84 define Package/libbdf/install
85 true
86 endef
87
88 $(eval $(call BuildPackage,binutils))
89 $(eval $(call BuildPackage,objdump))
90 $(eval $(call BuildPackage,libbfd))