Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.24
  10. PKG_RELEASE:=3
  11. PKG_SOURCE_URL:=@GNU/binutils
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_VERSION:=$(PKG_VERSION)
  14. PKG_MD5SUM:=e0f71a7b2ddab0f8612336ac81d9636b
  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@openwrt.org>
  20. PKG_LICENSE:=GPL-3.0+
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_USE_MIPS16:=0
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/libbfd
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=libbfd
  28. DEPENDS:=+zlib
  29. endef
  30. define Package/libopcodes
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. TITLE:=libbfd
  34. DEPENDS:=+libbfd
  35. endef
  36. define Package/binutils
  37. SECTION:=devel
  38. CATEGORY:=Development
  39. TITLE:=binutils
  40. DEPENDS:=+objdump +ar
  41. endef
  42. define Package/objdump
  43. SECTION:=devel
  44. CATEGORY:=Development
  45. TITLE:=objdump
  46. DEPENDS:=+libopcodes
  47. endef
  48. define Package/ar
  49. SECTION:=devel
  50. CATEGORY:=Development
  51. TITLE:=ar
  52. DEPENDS:=+zlib +libbfd
  53. endef
  54. define Package/binutils/description
  55. The Binutils package contains a linker, an assembler, and other tools for handling object files
  56. endef
  57. TARGET_CFLAGS += $(FPIC) -Wno-unused-value
  58. CONFIGURE_ARGS += \
  59. --host=$(REAL_GNU_TARGET_NAME) \
  60. --target=$(REAL_GNU_TARGET_NAME) \
  61. --enable-shared \
  62. --enable-install-libiberty \
  63. --enable-install-libbfd
  64. define Build/Install
  65. $(call Build/Install/Default)
  66. $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
  67. target_header_dir=libiberty \
  68. DESTDIR="$(PKG_INSTALL_DIR)" \
  69. MULTIOSDIR="" \
  70. install
  71. endef
  72. define Build/InstallDev
  73. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  74. endef
  75. define Package/libbfd/install
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/
  78. endef
  79. define Package/libopcodes/install
  80. $(INSTALL_DIR) $(1)/usr/lib
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/
  82. endef
  83. define Package/objdump/install
  84. $(INSTALL_DIR) $(1)/usr/bin
  85. $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/
  86. endef
  87. define Package/ar/install
  88. $(INSTALL_DIR) $(1)/usr/bin
  89. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ar $(1)/usr/bin/
  90. endef
  91. define Package/binutils/install
  92. $(INSTALL_DIR) $(1)/usr $(1)/bin
  93. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
  94. mv $(1)/usr/bin/strings $(1)/bin/strings
  95. rm -f $(1)/usr/bin/objdump
  96. rm -f $(1)/usr/bin/ar
  97. endef
  98. $(eval $(call BuildPackage,libbfd))
  99. $(eval $(call BuildPackage,libopcodes))
  100. $(eval $(call BuildPackage,binutils))
  101. $(eval $(call BuildPackage,objdump))
  102. $(eval $(call BuildPackage,ar))