2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
:=@GNU
/binutils
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_VERSION
:=$(PKG_VERSION
)
17 PKG_HASH
:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
20 PKG_LIBTOOL_PATHS
:=. gas bfd opcodes gprof binutils
ld libiberty gold intl
21 PKG_REMOVE_FILES
:=libtool.m4
24 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
26 PKG_CPE_ID
:=cpe
:/a
:gnu
:binutils
30 include $(INCLUDE_DIR
)/nls.mk
31 include $(INCLUDE_DIR
)/package.mk
37 DEPENDS
:=+zlib
$(ICONV_DEPENDS
) $(INTL_DEPENDS
)
40 define Package
/libopcodes
47 define Package
/binutils
52 ALTERNATIVES
:=200:/usr
/bin
/strings
:/usr
/bin
/binutils-strings
55 define Package
/objdump
66 DEPENDS
:=+zlib
+libbfd
69 define Package
/binutils
/description
70 The Binutils package contains a linker
, an assembler
, and other tools for handling object files
73 TARGET_CFLAGS
+= $(FPIC
) -Wno-unused-value
76 --host
=$(REAL_GNU_TARGET_NAME
) \
77 --target
=$(REAL_GNU_TARGET_NAME
) \
79 --enable-install-libiberty \
80 --enable-install-libbfd
83 $(call Build
/Install
/Default
)
84 $(MAKE
) -C
$(PKG_BUILD_DIR
)/libiberty \
85 target_header_dir
=libiberty \
86 DESTDIR
="$(PKG_INSTALL_DIR)" \
91 define Build
/InstallDev
92 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
95 define Package
/libbfd
/install
96 $(INSTALL_DIR
) $(1)/usr
/lib
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbfd
*.so
$(1)/usr
/lib
/
100 define Package
/libopcodes
/install
101 $(INSTALL_DIR
) $(1)/usr
/lib
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopcodes
*.so
$(1)/usr
/lib
/
105 define Package
/objdump
/install
106 $(INSTALL_DIR
) $(1)/usr
/bin
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/objdump
$(1)/usr
/bin
/
110 define Package
/ar/install
111 $(INSTALL_DIR
) $(1)/usr
/bin
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ar $(1)/usr
/bin
/
115 define Package
/binutils
/install
116 $(INSTALL_DIR
) $(1)/usr
$(1)/bin
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ $(1)/usr
/
118 mv
$(1)/usr
/bin
/strings
$(1)/usr
/bin
/binutils-strings
119 rm -f
$(1)/usr
/bin
/objdump
120 rm -f
$(1)/usr
/bin
/ar
123 $(eval
$(call BuildPackage
,libbfd
))
124 $(eval
$(call BuildPackage
,libopcodes
))
125 $(eval
$(call BuildPackage
,binutils
))
126 $(eval
$(call BuildPackage
,objdump
))
127 $(eval
$(call BuildPackage
,ar))