Makefile 2.7 KB

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