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
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/binutils
37 define Package
/objdump
44 define Package
/binutils
/description
45 The Binutils package contains a linker
, an assembler
, and other tools for handling object files
49 --target
=$(REAL_GNU_TARGET_NAME
) \
50 --host
=$(REAL_GNU_TARGET_NAME
) \
51 --build
=$(GNU_HOST_NAME
) \
57 $(SOFT_FLOAT_CONFIG_OPTION
) \
58 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
))
60 TARGET_CFLAGS
+= $(FPIC
)
61 TARGET_LDFLAGS
:= -L
$(PKG_BUILD_DIR
)/libiberty
$(TARGET_LDFLAGS
)
63 define Build
/Configure
64 $(call Build
/Configure
/Default
)
65 $(call Build
/Compile
/Default
, \
76 $(MAKE
) CFLAGS
="$(TARGET_CFLAGS)" -C
$(PKG_BUILD_DIR
)/bfd
/po Makefile
79 define Build
/InstallDev
80 $(INSTALL_DIR
) $(1)/usr
/{lib
,include}
82 $(PKG_INSTALL_DIR
)/usr
/lib
/* \
85 $(PKG_BUILD_DIR
)/include/*.h \
88 $(PKG_INSTALL_DIR
)/usr
/include/* \
90 rm -f
$(1)/usr
/include/gdbm.h
94 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/bfd
/doc
/ CFLAGS
="-I$(PKG_BUILD_DIR)/include" chew
95 $(call Build
/Compile
/Default
)
98 define Package
/objdump
/install
99 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/lib
100 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/objdump
$(1)/usr
/bin
/
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopcodes
*.so
$(1)/usr
/lib
/
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbfd
*.so
$(1)/usr
/lib
/
105 define Package
/binutils
/install
106 $(INSTALL_DIR
) $(1)/usr
$(1)/bin
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ $(1)/usr
/
108 mv
$(1)/usr
/bin
/strings
$(1)/bin
/strings
109 rm -f
$(1)/usr
/bin
/objdump
112 $(eval
$(call BuildPackage
,binutils
))
113 $(eval
$(call BuildPackage
,objdump
))