2 # Copyright (C) 2006-2011 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
11 PKG_VERSION
:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
15 PKG_SOURCE_URL
:=@GNU
/binutils
16 PKG_SOURCE
:=binutils-
$(PKG_VERSION
).
tar.bz2
19 PATCH_DIR
:=$(TOPDIR
)/toolchain
/binutils
/patches
/$(PKG_VERSION
)
22 PKG_LIBTOOL_PATHS
:=. gas bfd opcodes gprof binutils
ld libiberty gold intl
23 PKG_REMOVE_FILES
:=libtool.m4
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/binutils
35 define Package
/objdump
42 define Package
/binutils
/description
43 The Binutils package contains a linker
, an assembler
, and other tools for handling object files
47 --target
=$(REAL_GNU_TARGET_NAME
) \
48 --host
=$(REAL_GNU_TARGET_NAME
) \
49 --build
=$(GNU_HOST_NAME
) \
50 --with-sysroot
=$(PKG_INSTALL_DIR
) \
56 $(SOFT_FLOAT_CONFIG_OPTION
) \
57 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
))
59 TARGET_CFLAGS
+= $(FPIC
)
61 define Build
/Configure
62 $(call Build
/Configure
/Default
)
63 $(call Build
/Compile
/Default
, \
74 $(MAKE
) CFLAGS
="$(TARGET_CFLAGS)"-C
$(PKG_BUILD_DIR
)/bfd
/po Makefile
77 define Build
/InstallDev
78 $(INSTALL_DIR
) $(1)/usr
/{lib
,include}
80 $(PKG_INSTALL_DIR
)/usr
/lib
/* \
83 $(PKG_BUILD_DIR
)/include/*.h \
86 $(PKG_INSTALL_DIR
)/usr
/include/* \
88 rm -f
$(1)/usr
/include/gdbm.h
92 $(MAKE
) -C
$(PKG_BUILD_DIR
)/bfd
/doc
/ CFLAGS
="-I$(PKG_BUILD_DIR)/include" chew
93 $(call Build
/Compile
/Default
)
96 define Package
/objdump
/install
97 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/lib
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/objdump
$(1)/usr
/bin
/
99 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopcodes
*.so
$(1)/usr
/lib
/
100 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbfd
*.so
$(1)/usr
/lib
/
103 define Package
/binutils
/install
104 $(INSTALL_DIR
) $(1)/usr
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ $(1)/usr
/
106 rm -f
$(1)/usr
/bin
/objdump
109 $(eval
$(call BuildPackage
,binutils
))
110 $(eval
$(call BuildPackage
,objdump
))