1
0

Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #
  2. # Copyright (C) 2006-2013 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. PKG_NAME:=binutils
  9. PKG_VERSION:=2.27
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=@GNU/binutils
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_VERSION:=$(PKG_VERSION)
  14. PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
  15. PKG_FIXUP:=autoreconf
  16. PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl
  17. PKG_REMOVE_FILES:=libtool.m4
  18. PKG_INSTALL:=1
  19. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  20. PKG_LICENSE:=GPL-3.0+
  21. PKG_CPE_ID:=cpe:/a:gnu:binutils
  22. PKG_BUILD_PARALLEL:=1
  23. PKG_USE_MIPS16:=0
  24. include $(INCLUDE_DIR)/nls.mk
  25. include $(INCLUDE_DIR)/package.mk
  26. define Package/libbfd
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE:=libbfd
  30. DEPENDS:=+zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
  31. endef
  32. define Package/libopcodes
  33. SECTION:=libs
  34. CATEGORY:=Libraries
  35. TITLE:=libbfd
  36. DEPENDS:=+libbfd
  37. endef
  38. define Package/binutils
  39. SECTION:=devel
  40. CATEGORY:=Development
  41. TITLE:=binutils
  42. DEPENDS:=+objdump +ar
  43. ALTERNATIVES:=200:/usr/bin/strings:/usr/bin/binutils-strings
  44. endef
  45. define Package/objdump
  46. SECTION:=devel
  47. CATEGORY:=Development
  48. TITLE:=objdump
  49. DEPENDS:=+libopcodes
  50. endef
  51. define Package/ar
  52. SECTION:=devel
  53. CATEGORY:=Development
  54. TITLE:=ar
  55. DEPENDS:=+zlib +libbfd
  56. endef
  57. define Package/binutils/description
  58. The Binutils package contains a linker, an assembler, and other tools for handling object files
  59. endef
  60. TARGET_CFLAGS += $(FPIC) -Wno-unused-value
  61. CONFIGURE_ARGS += \
  62. --host=$(REAL_GNU_TARGET_NAME) \
  63. --target=$(REAL_GNU_TARGET_NAME) \
  64. --enable-shared \
  65. --enable-install-libiberty \
  66. --enable-install-libbfd
  67. define Build/Install
  68. $(call Build/Install/Default)
  69. $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
  70. target_header_dir=libiberty \
  71. DESTDIR="$(PKG_INSTALL_DIR)" \
  72. MULTIOSDIR="" \
  73. install
  74. endef
  75. define Build/InstallDev
  76. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  77. endef
  78. define Package/libbfd/install
  79. $(INSTALL_DIR) $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/
  81. endef
  82. define Package/libopcodes/install
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/
  85. endef
  86. define Package/objdump/install
  87. $(INSTALL_DIR) $(1)/usr/bin
  88. $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/
  89. endef
  90. define Package/ar/install
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ar $(1)/usr/bin/
  93. endef
  94. define Package/binutils/install
  95. $(INSTALL_DIR) $(1)/usr $(1)/bin
  96. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
  97. mv $(1)/usr/bin/strings $(1)/usr/bin/binutils-strings
  98. rm -f $(1)/usr/bin/objdump
  99. rm -f $(1)/usr/bin/ar
  100. endef
  101. $(eval $(call BuildPackage,libbfd))
  102. $(eval $(call BuildPackage,libopcodes))
  103. $(eval $(call BuildPackage,binutils))
  104. $(eval $(call BuildPackage,objdump))
  105. $(eval $(call BuildPackage,ar))